Git Product home page Git Product logo

woffu-autologin-script's Introduction

woffu-autologin-script

This is a small script that auto checks you into your Woffu organization.

The point is to schedule this script so that it runs every day at the times you check in and out of work (i.e, 9 and 17)

I don't use it myself at the moment, and I only built it as a fun proof of concept - there are definitely a lot of improvements that could be made, rather easily too. However, it does work.

Why?

A new law in my country is forcing people to check in and out of their jobs, every day at the same hours. Sounds to me like a boring, useless chore that could be automated, and what is programming if not automating tasks to make our lifes easier.

How to use

You need Python 3.6+ (f-strings rock!), the requests library and the holidays library.

pip install -r requirements.txt

You've to configure a data.json file with the following data:

{
  "username": "<YOUR WOFFU USERNAME>",
  "password": "<YOUR WOFFU PASSWORD>",
  "user_id": <YOUR WOFFU USER ID>,
  "company_id": <YOUR COMPANY ID>,
  "company_country": "<YOUR COMPANY COUNTRY>",
  "company_subdivision": "<YOUR COMPANY SUBDIVISION>",
  "domain": "<YOUR COMPANY WOFFU DOMAIN>"
}

If you don't have login data in your data.json you'll be prompted to enter your user and password the first time it starts, and that's it, you don't have to do anything else but to execute the script whenever you want to log in or out.

Caveats

Passwords

Be aware, though, this script STORES YOUR PASSWORD IN PLAIN TEXT IN YOUR COMPUTER, which is something you should normally never ever ever do, ever. However, to fully automate the task, I do need the password to send it to the Woffu servers, so I'm afraid there's no way to work around this problem.

Woffu does have an API your organization can probably use to log you in, or enable so that your user can have an API Key or something. The organization I used to test this script doesn't so this script is the only way to do it, to my knowledge. If you want to use this script and you want it to be compatible with your API Key instead of using your password (you should want to!), open an issue and I'll probably do it, it should be really easy.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.