Nonsense for Poor People

Nonsense for poor people: test phase Print

Most of institutional API maintainers try to promote their ecosystem and motivate potential developers. Presseportal is not one of them. Being a subsidiary of the largest German press agency, it aggregates the majority of police press releases in the country and presents those chronologically ordered in real time. Written in best Prussian wording, provincial petty theft reports are shown next to announcements about large anti-crime operations, executed by federal authorities.

Nonsense For Poor People: IoT installation by Jana Bissdorf and Rost Likholat

This ever-growing (at a rate of 200-600 messages per day) tragicomic dataset sparked my and my co-autor’s inspiration to create an art piece corresponding to the macabre setting of our exhibition venue: the abandoned police headquarters building of South-East Hesse.

Since my repeated requests of an API key were met with silence, the less gentle way of DOM parsing had to be taken in order to reliably retrieve the “cop tweets”. While Jana conceptualized the exterior and presentation format of the piece, I started experimenting with the Beautiful Soup Python library. Dedicated to XML parsing, it delivered very quickly, making the whole work a true python experience.

Luckily the “Blaulicht” page has a print version with even parser friendlier structure: the DOM elements in question are pinpointed with a few child selectors. The collected data does not require much striping due to the sparse print version markup.

After accomplishing the parsing and reformatting of a single police story and its excerpt, the remaining parts of iterative refreshing and print job dispatching were coded in no time. Meanwhile a used Epson TM-T88 III thermal printer was acquired. An iconic piece that dominates the wold of POS since decades, it is a must-have for a lot of embedded projects. The remaining hardware parts of the installation were constituted by a passively cooled single board PC with LTE modem.

Upon download and parsing, the messages were saved as rich text files, a format both suitable for processing by thermal printer and the python environment. Most of the printing part was managed by the OS: shell command calls made by the script opened the RTF file thru MS Wordpad and sent them to the system print cue in order of occurrence.

Once default print configuration was manually set, the produced pages were automatically matched to the dimensions of the paper roll. The network connection was also taken care of by the system, allowing me to focus on crucial parts of the endeavour. The creation of this artwork was an all-over painless high-level programming experience with luxuries of remote control, debugging and monitoring.