A raspberry pi controller with year, month, date knobs to stream shows from audio collections on archive.org.
It also contains a simple, command-line-interface to the collections on archive.org, which can be used to see what's available and play a given tape.
A Simple example for the python script:
import os
from timemachine import GD
metadata_path = os.path.join(GD.ROOT_DIR,'metadata')
a = GD.GDArchive(metadata_path)
#dates = a.dates # shows a list of all dates on which there are tapes.
tape = a.best_tape('1979-11-02')
player = GD.GDPlayer(tape)
player.play()
player.next()
player.seek(100)
player.pause()
player.play()
player.stop()
pip3 install .
or
python3 setup.py install
pip3 uninstall timemachine
This will put the module in build/lib
.
python3 setup.py build
To be able to run unit tests, install the requirements.
pip3 install -r requirements
python3 -m pytest
Using tox will test the whole build pipeline using setup.py and run the unit tests using pytest.
tox
runs at bootup, before the WiFi is even turned on. This reads the orientation of the knobs, tests the buttons and sound, and configures a default COLLECTION. Exits when finished.
runs after calibrate.service, when the WiFi radio is on. Checks if connected to the internet and if not, allows the user to select WiFi and enter passkey. Exits with a status when finished.
runs upon successful completion of connect_network.service. This is the main program to play shows. This should run as long as the machine is up, or until it is restarted.
runs on bootup and stays running all the time.
serve_options runs the web server, allowing you to configure some things that are too hard to do through the Time Machine itself.
Such as setting the COLLECTIONS list, and the Time Zone and stuff like that.
You can access this server from a browser on the same WiFi with
runs on demand. The user can ask for an update in the timemachine service by pressing and holding the "stop" button. Update will check if there is a new tag on github, and if so, download, install, and test the latest code in a virtual environment. If the code passes the test, then it will put the new virtual environment in place, and retain the previous 8 virtual environments for rollback if needed. Note: The factory environment is also retained.
The code was developed by Steve Eichblatt, with key guidance from Derek Wisong.