c-ancia / diskplayer Goto Github PK
View Code? Open in Web Editor NEWReads and writes floppy disks to play Spotify albums and playlists using a Raspberry Pi 4.
Reads and writes floppy disks to play Spotify albums and playlists using a Raspberry Pi 4.
When accessing the virtual host at http://RASPPI IP/diskplayer/ I try to write a spotify album URL to the floppy and it properly writes the diskplayer.contents file into tmp, but it doesn't properly move the file to the floppy disk.
My floppy drive mounts to /media/pi/Floppy Disk/
not sure if there's a way to change it to /media/floppy/
Here is my copyfiles.sh code:
#!/bin/sh
# /etc/init.d/copyfiles.sh
### BEGIN INIT INFO
# Provides: copyfiles.sh
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Copies file to the floppy
# Description: Copies specific file from tmp folder to the mounted floppy once created
### END INIT INFO
inotifywait -m /home/pi/diskplayer/tmp -e create @__init__.py |
while read path action file; do
if [ "$file" = "diskplayer.contents" ]; then
sudo chown root:root "${path}/${file}"
sudo chmod 777 "${path}/${file}"
sudo mv "${path}/${file}" /media/pi/Floppy Disk/diskplayer.contents
fi
done
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.