color based on string
Because an MD5 hash is typically expressed as a hexadecimal number, 32 digits long *, all you need to do is cut 6 characters to get a color value. COLOR=`echo $SVG | md5sum | cut -c 1-6` To convert any string to a color value, just reduce it to the appropriate characters (= a-f and 0–9),...

collaborative indecision
A mini exercise for the ‘Badness & Conflict’ workshop, an initiative of Pierre Huyghebaert in collaboration with http://lgru.net and Constant. This setup allows to recombinate layers from multiple svg files to one svg file. How it works The svg files are separated in layers, each layer belonging to a type, defined in a custom svg attribute typus="XXXX00"....

different lgm characters
This script generates combination from layered inkscape svg files. Layers have special IDs and inkscapes --export-id=$ID option is used. First the svg is prepared for easier parsing by converting all spaces to newlines: cat $SVG | \ sed 's/display:none/display:inline/g' | \ sed 's/ /\n/g' > $TMPSVG Then for every ID containing the custom pattern ELEMENT-...

fontplate
import geomerative.*; import processing.pdf.*; RFont lfont; RShape lshape; RGroup lgroup; RPoint[][] lpoints; RMatrix mat; PShape[] ImaginaryTools; String ltext[] = loadStrings("i/free/voice/voice.txt"); String svglist[] = loadStrings("i/free/svg/load.list"); float x,y,xprev,yprev,randy,a; float scalefactor,lineheight; int indent; int textHeight = 800; int v; int[] alreadytaken = new int[svglist.length]; // NUMBER OF SIMPLE SVGS int sn = 20;...

asynchronous poster production
The rendering of the lgm posters is split into two asyncronous parts, because the actual poster generator involves some stuff that no administrator wants to have running on a stable web server. Part 1 is a simple input interface, that does nothing more than writing plain text files entered via a html textarea. This runs...

Bash substitution
Bash supports a surprising number of string manipulation operations. Unfortunately, these tools lack a unified focus. Some are a subset of parameter substitution, and others fall under the functionality of the UNIX expr command. This results in inconsistent command syntax and overlap of functionality, not to mention confusion. * This is a short explanation of...

Make pdf files
Two ways to combine existing pdf files stored in lists. pdfpages A simple solution to combine multiple pdf files is to use LaTeX respectively the pdfpages package. With this code you can layout pdf pages on a page according to some parametres. You need a working LaTeX installation, e.g. texlive on debian or ubuntu. You...