#ft_42
Useful 42 info from your command line.
Note: Look for me in the lab if you have any questions.
-
Create your own 42 application
- Go to: https://profile.intra.42.fr/oauth/applications/new
- You just need a name and a redirect_uri. You may use the following:
- Name: ft_42 [YOUR_42_USERNAME]
- Redirect_URI: https://ft42.us
-
Place your app's UID and SECRET keys in your local environment by opening your
/.bash_profile (./zshrc if using zsh) and adding the following code:export PATH=$HOME/.gem/ruby/2.0.0/bin:$PATH export FT42_UID=[YOUR_UID_HERE] export FT42_SECRET=[YOUR_SECRET_HERE]
-
Reload your bash profile by running
source ~/.bash_profile
orzsh
if you're using zsh. -
Then run
gem install --user-install ft_42
Once you have it set up, you can use it like this:
# shows user info
ft_42 [42_USERNAME]
# shows user info with picture (only iTerm, only Fremont)
ft_42 [42_USERNAME] pic
# shows user info with progress bars
ft_42 [42_USERNAME] progress
# shows user sessions this week, starting last monday.
ft_42 [42_USERNAME] sessions
# shows user sessions, starting 3 weeks ago
ft_42 [42_USERNAME] sessions 3 weeks ago
ft_42 [42_USERNAME] sessions 3
# shows all users currently working on project ("status = in_progress")
ft_42 project fract-ol in fremont
ft_42 project ft_ls in paris
# you can also filter by date subscribed range
ft_42 project wolf3d in fremont after November 1, 2016
ft_42 project wolf3d in fremont between November 1, 2016 and November 20, 2016
Make sure you have the latest version by running gem update --user-install ft_42
There's lots of ways you can contribute. Hit me up on slack, fork it, play around with the implementation, or improve the docs.
You could also grab something from the todo list.
To-do List:
- Use the much cleaner
gem fortytwo
for making requests. ft_42_cli should only contain the printers. - Improve option parser. Possibly using OptionParser tool.
- Add usage help for
ft_42
andft_42 help
. - Make configuration file to improve installation process and save certain values.