panik
clone your own copy | download snapshot

About

Radio Panik

OSP has designed the 2012 program for Brussels based alternative radio station, Radio Panik. The program (‘the grille’) is constructed through what is considered a type crime— horizontally squashing the text to make it fit. We debuted our new typeface Reglo for this job.

Next to the design of the program, we constructed a web interface that provides a means for the employees of Radio Panik to generate cd covers and posters in the same style.

The web interface allows one to browse and choose from the various image categories of Wikimedia Commons, input a text and choose a paper size, after which it will generate a design in a vector file format. The output is an SVG file which can be further edited in proprietary and libre image editors.

Snapshots | iceberg

Inside this repository

Log

 

codingisacopingstrategydiscovered

— Add the grille
formerly known as grille111004.html

is commit #1

Monday, 17th October 2011 - 15:43

 

codingisacopingstrategysaid

— A first selection of images that deal (loosely) with sound

Tuesday, 18th October 2011 - 15:36

 

codingisacopingstrategyexposed

— Tracing script

Tuesday, 18th October 2011 - 17:00

 

Gijs de Heijblabbed out

— Added the first sketch for the panik
Also added it's pythonscript and the sfd file

Tuesday, 18th October 2011 - 18:06

 

codingisacopingstrategypeached

— The SwarmGenerator 1st proof of concept

Wednesday, 26th October 2011 - 18:05

 

codingisacopingstrategyrendered

— Black and white conversion in the SwarmGenerator

Thursday, 27th October 2011 - 15:16

 

codingisacopingstrategyspoke

— Website to choose category

(right now it just allows you to browse through different categories)

Flask is a prerequisite:

$ sudo easy_install flask

then: python get_category_members.py

This will start the app at
http://127.0.0.1:5000/

Friday, 28th October 2011 - 10:43

 

codingisacopingstrategybrought out

— the SwarmGenerator now actually creates the svg images

We embedded the shoebot script.

It does take a long while to download the images though…
even though the files are tiny…

Maybe wikipedia throttles us becuse of the large amount of requests?
Have to look into this.

many thanks to tian2992 for helping me out with embedding Shoebot

Friday, 28th October 2011 - 20:04

 

Sebastien Sanfilippoexpressed

— test typo.svg

Tuesday, 1st November 2011 - 14:53

 

codingisacopingstrategybrought out

— Select a color for the swarm

(and framework to use text too!)

Uses farbtastic plugin (GPL) for jQuery.

Tuesday, 1st November 2011 - 15:44

 

codingisacopingstrategylet loose

— It works with text

Thursday, 3rd November 2011 - 09:24

 

Sebastien Sanfilippoexpressed

— reglo

Monday, 7th November 2011 - 17:11

 

Sebastien Sanfilipporendered

— grille.sla

Wednesday, 9th November 2011 - 12:43

 

codingisacopingstrategyrevealed

— Text squashed/stretched to predetermined width

Also, more complete test in swarm_bot.py
! And set to use the Reglo font !

Monday, 7th November 2011 - 17:18

 

Sebastian Olivatold

— fixed error when using text, and added basic .gitignore

Signed-off-by: codingisacopingstrategy <eric@ericschrijver.nl>

Tuesday, 8th November 2011 - 10:19

 

Sebastien Sanfilippoblabbed out

— Merge branch 'master' of git.constantvzw.org:osp.work.panik

Wednesday, 9th November 2011 - 12:43

 

Sebastien Sanfilippoconfessed

— info .odt

Wednesday, 9th November 2011 - 12:44

 

Sebastien Sanfilippoverbalised

— update grille

Friday, 11th November 2011 - 17:40

 

Gijs de Heijemited

— Added this little script that can be used to size and VScale the
text in the grille.sla

Friday, 11th November 2011 - 12:44

 

Sebastien Sanfilippocomitted

— Merge branch 'master' of git.constantvzw.org:osp.work.panik

Friday, 11th November 2011 - 17:41

 

codingisacopingstrategyargued

— Copied the grid of the grille so I can do some work on the cover

Scribus it will be…

Friday, 11th November 2011 - 18:44

 

codingisacopingstrategydiscovered

— Radio Panik

Friday, 11th November 2011 - 18:58

 

codingisacopingstrategytalked

— First try cover of Grille

Monday, 14th November 2011 - 16:07

 

Sebastien Sanfilippodeclared

— textscaler update

Monday, 14th November 2011 - 15:28

 

codingisacopingstrategytalked

— Merge branch 'master' of git.constantvzw.org:osp.work.panik

Monday, 14th November 2011 - 16:23

 

codingisacopingstrategycomplained

— My 90ies cover

Monday, 14th November 2011 - 17:24

 

codingisacopingstrategystated

— Logo typography earlier in the process

Monday, 14th November 2011 - 17:27

 

codingisacopingstrategybrought out

— Fixed 404 error (1st of possible Errors)

Monday, 14th November 2011 - 18:25

 

codingisacopingstrategybrought out

— SwarmGenerator refactored: more modular

Should be more easy to bugfix and reuse now.
The refactoring solved none of the bugs of the script though.

Also: user/agent Ḿozilla -> Mozilla
& skip corrupt image files

Tuesday, 15th November 2011 - 10:25

 

codingisacopingstrategywhispered

— High resolution bi-maps

import json
from urllib import quote
import urllib2

from retrieve import retrieve_uris
from convert_images import convert_images

path = '/home/e/Dropbox/osp/osp.work.panik/Grille'

files = [i for i in os.listdir(path) if 'png' in i and '120' in i]
files = [i.replace("120px-", "File:") for i in files]
files = [i.replace("png", "jpg") for i in files]

titles = '|'.join(files)

def make_api_query(q_continue="", thumbnail_size=120):
# titles = 'File:%27Dix_heures_en_chasse%27_by_G%C3%A9d%C3%A9on_Baril_28.jpg|File:Traps-drumset.jpg|File:Mats_antennes_01.jpg|File:Blured_black_keyboard.jpg|File:Reifpilz-1.jpg|File:Braunschweig_Brunswick_Eulenspiegel_Altstadtmarkt_1519.jpg|Britannica_Guitar.jpg|File:Copernican_heliocentrism_diagram-2.jpg|File:Hentz_Plate_17.jpg|File:Aratura_g3.jpg|File:Green-red_in_Lab.jpg|File:Fr%C3%BChjahrslorchel-1.jpg|File:Sch%C3%A9ma_champignon.jpg|File:Avicularia_versicolor_5FH_beim_fressen.jpg|File:Kantarell%2C_Iduns_kokbok.jpg|File:144MHz_EME.jpg|File:Falscher_Pfifferling-2.jpg|File:Pakhavaj.jpg|File:Wykres_sprzezniowcow.jpg|File:Kuniyoshi%2C_Minamoto_no_Yorimitsu_Battlling_an_Earth_Spider.jpg|File:136_to_174_MHz_base_station_antennas.jpg|File:K%C3%B6rnchenr%C3%B6hrling-1.jpg|File:Noinstrument.jpg'
url = 'http://commons.wikimedia.org/w/api.php?action=query&titles=' + titles + '&prop=imageinfo&iiprop=url&iiurlwidth=' + str(thumbnail_size) + '&format=json'
response = json.loads(urllib2.urlopen(url).read())
if response:
response['url'] = url
return response

response = make_api_query()

uris = []
try:
for i in response['query']['pages'].values():
uris.append(i['imageinfo'][0]['url'])
except:
pass

convert_images(retrieve_uris(path, uris))

Tuesday, 15th November 2011 - 15:41

 

codingisacopingstrategydivulged

— Screenshots of currrent look of SwarmGenerator

Tuesday, 15th November 2011 - 19:18

 

codingisacopingstrategysaid

— Text input via webinterface works now!

The errors were in the line bot.text(etc.)

Somehow Shoebot doesn’t throw errors here…
There was a division by zero among other errors

A good moment to throw in the new code that works a bit differently:
Type size is vertical space divided by number of lines,
than the lines of the text are stretched horizontally to fit.

Tuesday, 15th November 2011 - 23:44

 

codingisacopingstrategyinterpreted

— Proper user interface Swarm Generator

Built with the nifty Twitter Bootstrap css:
http://twitter.github.com/bootstrap/

Wednesday, 16th November 2011 - 00:05

 

codingisacopingstrategysaid

— Quite some bug fixes, SVG output still broken—switch to PNG
It currently outputs PNG.

View:

Make all the input UPPERCASE

Swarmbot:

Added square option (defaults to true).
When True, will output a 1:1 aspect ratio.
When False, will output a 1:sqr(2) ratio.

2 text splitlines bugs fixed
Use .splitlines() instead of .split('\n') to allow different control characters
Remove empty lines to avoid divisionbyzero error

Smaller lineheight

Fill up collage:
If there are less than 32 source images, repeat existing up until 32

Text over image, instead of the other way around

TODO: text stil appears grey
TODO: fix unicode bug in urlquoting http://127.0.0.1:5000/Category%3ABook%20illustrations
TODO: when svg works, add thing to view that chances output size:
-<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"432pt\" height=\"432pt\" viewBox=\"0 0 432 432\" version=\"1.1\">
+<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"3cm\" height=\"3cm\" viewBox=\"0 0 432 432\" version=\"1.1\">
TODO: disable client caching (so resizing etc. works without reloading twice)

Tuesday, 29th November 2011 - 14:11

 

codingisacopingstrategyadmitted

— Rename main app to panik_app.py
Run with: python panik_app.py

Tuesday, 29th November 2011 - 14:25

 

codingisacopingstrategyinterpreted

— Fix unicode bug with url-quoting accented characters

cf http://stackoverflow.com/questions/4924273/how-to-properly-url-encode-accents

Tuesday, 29th November 2011 - 14:26

 

Eric Schrijverbabbled out

— Don’t cache.

Not caching makes it possible for you to change output size
and text, and not having to reload twice.
Yet changing the collage colour is still not updated.

It is updated on the server though. So apparently the swarmbot
script uses a cached representation of these images?

Also, Pango requires an integer image size

Also, I’m now using my given name in git

Tuesday, 29th November 2011 - 14:59

 

Eric Schrijverironized

— Fix bug: text now black
(as opposed to gray)

Tuesday, 29th November 2011 - 15:14

 

Sebastien Sanfilipporevealed

— grille front 03

Monday, 12th December 2011 - 14:02

 

Sebastien Sanfilippoexpressed

— Merge branch 'master' of git.constantvzw.org:osp.work.panik

Monday, 12th December 2011 - 14:02

 

Eric Schrijvertold

— Merge branch 'master' of git.constantvzw.org:osp.work.panik

Tuesday, 13th December 2011 - 13:39

 

Eric Schrijverrendered

— The only way to fix the svg bug is to write around it

So we kept running into svg bugs.
The bug report:
http://bugs.shoebot.net/issue25

We did not have time to wait for it to be fixed—
and due to the tight coupling with Cairo Shoebot
is too complicated for us to fix.

So for now we wrote around it, using another library,
svgwrite, to generate the SVG. Since we still
use Shoebot to calculate the textwidth, our
solution is quite convoluted now.
But it will have to do for now!

In this version I also added proper sizing according
to the size parameters given in the interface.

Thursday, 15th December 2011 - 15:21

 

Eric Schrijverdiscovered

— Organised for distribution

Added license info, moved things around for more apparent
folder layout, added README with install instructions

Thursday, 15th December 2011 - 16:49

 

Eric Schrijverwhistled

— The Reglo font in the interface as well

+some spacing etc.

And I forgot a command in the README

Thursday, 15th December 2011 - 18:30

 

Eric Schrijvertweeted

— Usability tweaks for the app

Only one field for specifying paper size,
some help messages

Thursday, 15th December 2011 - 18:55

 

codingisacopingstrategystated

— Petit typo in README.txt

Friday, 16th December 2011 - 00:04

 

Eric Schrijververbalised

— First Panik Iceberg

Monday, 9th January 2012 - 18:59

 

Eric Schrijverrendered

— Prettier pictures for the iceberg

Wednesday, 11th January 2012 - 00:45

 

Sebastien Sanfilippoadmitted

— recto flyer jpg

Wednesday, 11th January 2012 - 11:35

 

Sebastien Sanfilipposaid

— verso flyer jpg

Wednesday, 11th January 2012 - 11:36