A simple (unofficial) CLI interface for the Firefly schools platform
Most of this tool was built using the info from the unofficial API wiki by JoshHeng
-
Make sure python 3 is installed on your system
-
Modify the
url
variable so it points to your school's website (something like https://school.fireflycloud.net) -
Go to https://school.fireflycloud.net/Login/api/gettoken?ffauth_device_id=SimpleFireflyCLI&ffauth_secret=&device_id=SimpleFireflyCLI&app_id=SimpleFireflyCLI on a browser where you're logged in to firefly. This will create your API secret and return a page that looks something like this:
-
Stay on that page and copy the secret field (something like
tsgT9UVHKlcIlbAPjqq5_Q8yx8wLlGGEBzojCTROLyv3Oz3ZXecW6Nvz3mWZkSB2I1
) into thesecret
variable -
Then, copy the GUID into the
pupil_guid
variable.
At this point, it should just about work, but will need further tweaking to get all the features.
- Set
jsonfile
to a file location on your computer to enable caching, although it'll only be helpful if you're on a device that may not be connected to wifi, like a phone using Termux (my main usecase) - Set
time_names
to the times of each of your lessons, so they can be labelled instead of just using the time. - Set
lesson_colors
to some different colours for each of your lessons so you can more easily tell which lessons you have at a glance. The colours are set using ANSI escape codes, this page by Haoyi should help explain how to use them. - Use the
maths_teachers
variable as an example on how to make it work if you have a single lesson with multiple teachers, and each teacher teaches a different part of the course. - Run
alias "timetable"="python3 path/to/timetable.py"
so you can just runtimetable
instead
Doing all of these will make it look much nicer, but none are mandatory:
There are 5 commands:
Tells you which lessons you have (parameters are today
, tomorrow
or the date as dd/mm/yyyy
)
Tells you what rooms you need to go to (parameters are today
, tomorrow
or the date as dd/mm/yyyy
)
Gives you a list of all your tasks (parameters are todo
, done
or both
)
Lists off all the lessons you have given custom colours to
Gives a help prompt explaining the same information as is available here