Small script for Ecole 42 students to get the total intranet log time of the current month.
(Linux / MacOS) Run ./logtime.sh
.
Example:
$>./logtime.sh
Logtime = 57:12:50
-
(Linux / MacOS) Run
./install.sh
. -
Get your API credentials from the intranet.
a) Go to intranet profile > your name on top right > Settings > API > Register New API. Now you should be at the URL
https://profile.intra.42.fr/oauth/applications/new
.b) Fill out the name field with a name of your choice.
c) Fill out the "Redirect URI" field with a valid URI like
https://www.google.com/
.d) Click "Submit". You should be seeing your credentials now, proceed to the next step.
-
Go to
credentials.py
and fill it with the template below whereUID
andSECRET
are your 42 API credentials and save it.UID = "your 42 API UID from intranet API page" SECRET = "your 42 API SECRET from intranet API page" USERNAME = "your intra nickname"
WARNING: Don't share these credentials!
Neither the API or script is guaranteed to be acurrate. This script comes with no warranty.