Skip to content

A simple (unofficial) CLI interface for the Firefly schools platform

License

Notifications You must be signed in to change notification settings

PartyWumpus/FireflySimpleCLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

SimpleFireflyCLI

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

Setup

  1. Make sure python 3 is installed on your system

  2. Modify the url variable so it points to your school's website (something like https://school.fireflycloud.net)

  3. 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:image

  4. Stay on that page and copy the secret field (something like tsgT9UVHKlcIlbAPjqq5_Q8yx8wLlGGEBzojCTROLyv3Oz3ZXecW6Nvz3mWZkSB2I1) into the secret variable

  5. 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. image

Further tweaking

  • 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 run timetable instead

Doing all of these will make it look much nicer, but none are mandatory:

image

Usage

There are 5 commands:

timetable.py lessons

Tells you which lessons you have (parameters are today, tomorrow or the date as dd/mm/yyyy)

image

timetable.py timetable

Tells you what rooms you need to go to (parameters are today, tomorrow or the date as dd/mm/yyyy)

image

timetable.py tasks

Gives you a list of all your tasks (parameters are todo, done or both)

image

timetable.py colors

Lists off all the lessons you have given custom colours to

image

timetable.py help

Gives a help prompt explaining the same information as is available here

About

A simple (unofficial) CLI interface for the Firefly schools platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages