A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 31 lines 711 B view raw
1#!/usr/bin/env python 2import sys 3import librbpms 4 5 6def usage(): 7 print "" 8 print "Please provide a command and (if needed) parameters as command line arguments" 9 print "" 10 print "Available commands:" 11 print "" 12 print " download <address> <size> <file>" 13 print " Downloads <size> bytes of data from the specified address on the device," 14 print " and stores it in the specified file." 15 print "" 16 print "All numbers are hexadecimal!" 17 exit(2) 18 19 20def parsecommand(dev, argv): 21 if len(argv) < 2: usage() 22 23 elif argv[1] == "download": 24 if len(argv) != 5: usage() 25 dev.download(int(argv[2], 16), int(argv[3], 16), argv[4]) 26 27 else: usage() 28 29 30dev = librbpms.rbpms() 31parsecommand(dev, sys.argv)