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

 

codingisacopingstrategyrendered

— Add the grille
formerly known as grille111004.html

is commit #1

Monday, 17th October 2011 - 15:43

 

codingisacopingstrategyemited

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

Tuesday, 18th October 2011 - 15:36

 

codingisacopingstrategydisclosed

— Tracing script

Tuesday, 18th October 2011 - 17:00

 

Gijs de Heijuttered

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

Tuesday, 18th October 2011 - 18:06

 

codingisacopingstrategycomitted

— The SwarmGenerator 1st proof of concept

Wednesday, 26th October 2011 - 18:05

 

codingisacopingstrategylet on

— Black and white conversion in the SwarmGenerator

Thursday, 27th October 2011 - 15:16

 

codingisacopingstrategysang

— 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

 

codingisacopingstrategysaid

— 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 Sanfilipposang

— test typo.svg

Tuesday, 1st November 2011 - 14:53

 

codingisacopingstrategylet the cat out of the bag

— Select a color for the swarm

(and framework to use text too!)

Uses farbtastic plugin (GPL) for jQuery.

Tuesday, 1st November 2011 - 15:44

 

codingisacopingstrategyconfessed

— It works with text

Thursday, 3rd November 2011 - 09:24

 

Sebastien Sanfilippolet out

— reglo

Monday, 7th November 2011 - 17:11

 

Sebastien Sanfilippocomitted

— grille.sla

Wednesday, 9th November 2011 - 12:43

 

codingisacopingstrategypublished

— 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 Sanfilipposaid

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

Wednesday, 9th November 2011 - 12:43

 

Sebastien Sanfilipposhouted

— info .odt

Wednesday, 9th November 2011 - 12:44

 

Sebastien Sanfilippospoke

— update grille

Friday, 11th November 2011 - 17:40

 

Gijs de Heijsaid

— 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 Sanfilipporendered

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

Friday, 11th November 2011 - 17:41

 

codingisacopingstrategysaid

— 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

 

codingisacopingstrategywhistled

— Radio Panik

Friday, 11th November 2011 - 18:58

 

codingisacopingstrategyunwrapped

— First try cover of Grille

Monday, 14th November 2011 - 16:07

 

Sebastien Sanfilipposaid

— textscaler update

Monday, 14th November 2011 - 15:28

 

codingisacopingstrategylet the cat out of the bag

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

Monday, 14th November 2011 - 16:23

 

codingisacopingstrategylet the cat out of the bag

— My 90ies cover

Monday, 14th November 2011 - 17:24

 

codingisacopingstrategybabbled

— Logo typography earlier in the process

Monday, 14th November 2011 - 17:27

 

codingisacopingstrategytalked

— Fixed 404 error (1st of possible Errors)

Monday, 14th November 2011 - 18:25

 

codingisacopingstrategylet the cat out of the bag

— 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

 

codingisacopingstrategytalked

— 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

 

codingisacopingstrategygave away

— Screenshots of currrent look of SwarmGenerator

Tuesday, 15th November 2011 - 19:18

 

codingisacopingstrategyshouted

— 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

 

codingisacopingstrategybabbled

— Proper user interface Swarm Generator

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

Wednesday, 16th November 2011 - 00:05

 

codingisacopingstrategygave away

— 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

 

codingisacopingstrategydivulged

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

Tuesday, 29th November 2011 - 14:25

 

codingisacopingstrategyironized

— 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 Schrijververbalized

— 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 Schrijvercried

— 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 Sanfilippolet on

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

Monday, 12th December 2011 - 14:02

 

Eric Schrijverdivulged

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

Tuesday, 13th December 2011 - 13:39

 

Eric Schrijvershouted

— 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 Schrijveremited

— 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 Schrijverspilled the beans

— 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 Schrijverunwrapped

— Usability tweaks for the app

Only one field for specifying paper size,
some help messages

Thursday, 15th December 2011 - 18:55

 

codingisacopingstrategydiscovered

— Petit typo in README.txt

Friday, 16th December 2011 - 00:04

 

Eric Schrijverunwrapped

— First Panik Iceberg

Monday, 9th January 2012 - 18:59

 

Eric Schrijverunwrapped

— Prettier pictures for the iceberg

Wednesday, 11th January 2012 - 00:45

 

Sebastien Sanfilippowhistled

— recto flyer jpg

Wednesday, 11th January 2012 - 11:35

 

Sebastien Sanfilippopeached

— verso flyer jpg

Wednesday, 11th January 2012 - 11:36