Giter Club home page Giter Club logo

logtime-42's Introduction

Logtime 42

View logtime of a 42 school student

Usage

USAGE:
    logtime42 [FLAGS] [OPTIONS]

FLAGS:
    -d, --day        Logtime of the current day
    -h, --help       Prints help information
    -m, --month      Logtime of the current month
    -V, --version    Prints version information
    -w, --week       Logtime of the current week

OPTIONS:
    -c, --config <FILE>        Explicit path of config file
    -f, --from <YYYY-MM-DD>    Beginning of date span
    -t, --to <YYYY-MM-DD>      End of date span
    -l, --login <LOGIN>        42 login of the user

NOTE: if no date span is found in config file and the --month flag is not used, --month will be used by default

Build

  • Download rust
  • Clone project
  • cargo build --release (binary will be in target/release)
  • Create an API key pair (42 API)
  • Create config.json file with key pair

Config

You will need an API public/private key pair for the 42 API

The program checks first for the file passed with -c, if none, looks in the current working directory.

config.json file example:

{
    "client_id": "42_Application_UID",
    "secret": "42_Application_SECRET_KEY",
    "from": "2021-10-21", // Optional
    "to": "2021-10-22", // Optional
    "login": "your_login" // Optional if passed with -l
}

I suggest creating an alias to run it from anywhere
alias="PATH_TO_PROJECT_DIR/target/release/logtime42 --config PATH_TO_CONFIG_FILE"

Screenshot

Screenshot

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.