Both scripts use MySQL to put/pull the state of the hackerspace.
The schema can be found in hackerspace_status.sql
.
Implements the Space API.
- Needs python-mysqldb and python-vobject
- Adds
ext_duration
field, the number of hour(s) the space will be open fromlastchange
- Uses the events in ical format downloaded from a cron
Used by the RFID doorlock and our
trigger webapp to tweet the hackerspace status.
The script is authenticated to twitter using OAuth
. It saves the
status in a mysql database and a lock file. It does a simple IP check to
authorize the change of status.
- ?do=close[d] Close the space,
- ?do=open Open the space,
- ?do=custom&hours=x Open the space for a specific amount of time in hour,
- ?request Request the state of the hackerspace, using the lock file
cpan 'install Net::Twitter' apt-get install fortune
Drupal module to show an image in a block of the status from spaceapi.py