Inspiration - Why did we create this script?

Due to COVID-19, most of our day-to-day tasks are conducted online. Online working culture has impacted academics and children's lives, both positively and negatively. They are facing medical problems like headaches and weak eyesight problems. As responsible parents, it is necessary to keep track of control of their children's screen time. To refresh their senses, they play multimedia games or watch movies and cartoons, but it should be within a limit. To tackle this situation, we have created the Sleepy Script .

What it does?

Parents/Users need to run this script for browsing the website. It provides a user to input the URL which he wants to surf. Parents set the timer and the operation (Lock, Restart, and Shutdown) they can execute. So they can restrict the screen time of their children effectively.

How do we build it?

We have used the Python programming language to create this script. For accessibility of the browser, we have imported a selenium web driver. The time module is used for time management and setting up the alarm. To execute system commands, we have used the subprocess.

Challenges we ran into:

The major challenge we ran into was that system commands like shutdown requires sudo permission and, initially, the script was not working. But we tackled this situation by performing research and thanks to this Ubuntu Help page.

Accomplishments that we're proud of!

The accomplishment that we are proud of is that it fulfills its motive fruitfully. Even when you are watching a movie at night, you want to set an automatic shutdown in case, you fall asleep, it can easily handle this. A multi-purpose script.

What we learned?

1) We learned how to set up a selenium web driver with a Firefox browser and its operations. 2) We learned to execute system commands like shutdown and reboot using python and subprocess. 3) Playing with errors and selenium get requests.

What's next for Sleepy Script - Parental Control & Timer?

The next step for the Sleep Script is to enhance its capabilities by controlling the browser with CLI and more system commands that we can run.

Built With

Share this project: