Built a Text2Schedule Program!
the_Grinch
Member Posts: 4,165 ■■■■■■■■■■
in Off-Topic
At work we have a van and mainly two units utilize (one more than the other). For the one unit we have to drive for them (management decision). The issue is scheduling the van for use by either unit. Typically it's a phone call to us and then we have to chase down one unit or the other to see if they have anything scheduled for it. Originally I was going to create an Android app for the scheduling (which I might still do), but there are a number of problems with that. First, getting IT to approve apps is a bit of a process. Second, if/when approved, sometimes our device management tool causes issues with installing apps and they end up not working. Third, the other unit has their own IT and I don't know the process for them. Finally, I don't want to support it.
As I was thinking about the problem I thought "wouldn't it be nice if they could just text the date they want it and get a response saying yes or no". I started to do some research and remembered Twilio. So got to work and today I finished the bulk of the work!
What the app currently does:
User sends text with a date (in a MM-DD-YYYY format). The program queries an sqlite database to confirm the user is on the list, if they aren't a text is sent saying you aren't a valid user and to contact us to be added. If you are a valid user, the program queries the database and checks to see if the date is available. If it is, it writes it to the database and texts the user back stating they are scheduled. It also writes a column with a status showing the text was sent. If the date isn't available, it texts the user that. It also keeps a record of all the texts sent to ensure repeats don't happen
What's left to be done:
Daemonize it - program needs to query Twilio and I planned to set it to do so every 30 seconds to a minute
Build a web interface - something I can log into and add users with, check the status and possibly for users to see their schedule
Add "schedule" text - make it so a user can send the word schedule and see all the dates they have scheduled
More notifications - send a text to us when something is scheduled and text each member of the unit when something is scheduled
Android App - still want to build it
Switch to Postgres - thinking I might move from sqlite to postgres
Thank you Python!!
As I was thinking about the problem I thought "wouldn't it be nice if they could just text the date they want it and get a response saying yes or no". I started to do some research and remembered Twilio. So got to work and today I finished the bulk of the work!
What the app currently does:
User sends text with a date (in a MM-DD-YYYY format). The program queries an sqlite database to confirm the user is on the list, if they aren't a text is sent saying you aren't a valid user and to contact us to be added. If you are a valid user, the program queries the database and checks to see if the date is available. If it is, it writes it to the database and texts the user back stating they are scheduled. It also writes a column with a status showing the text was sent. If the date isn't available, it texts the user that. It also keeps a record of all the texts sent to ensure repeats don't happen
What's left to be done:
Daemonize it - program needs to query Twilio and I planned to set it to do so every 30 seconds to a minute
Build a web interface - something I can log into and add users with, check the status and possibly for users to see their schedule
Add "schedule" text - make it so a user can send the word schedule and see all the dates they have scheduled
More notifications - send a text to us when something is scheduled and text each member of the unit when something is scheduled
Android App - still want to build it
Switch to Postgres - thinking I might move from sqlite to postgres
Thank you Python!!
WIP:
PHP
Kotlin
Intro to Discrete Math
Programming Languages
Work stuff
PHP
Kotlin
Intro to Discrete Math
Programming Languages
Work stuff
Comments
-
TheFORCE Member Posts: 2,297 ■■■■■■■■□□that's really cool man! You making progress with Python.
not very font of Postgres though. -
the_Grinch Member Posts: 4,165 ■■■■■■■■■■Yeah slow and steady with Python for sure! What's your hang up with Postgres?WIP:
PHP
Kotlin
Intro to Discrete Math
Programming Languages
Work stuff