Guillaume Falourd
Posted on January 28, 2021
We have been able to create a custom profile for our Github 🐙 account for a while now, creating a repository with our username.
Here is a step by step to create and customize this profile, to obtain a result like the following one:
Premisses:
Python should be installed on the computer (it's native on Unix OS)
Step 1 - Installation
To do so, we'll use an open source CLI tool named Ritchie.
It allows the user to create, store and share any kind of automations (called formulas), executing them through command lines.
One of them will provide us with the README.md file we'll use on our Github account.
To install Ritchie:
Unix: On the terminal:
curl -fsSL https://commons-repo.ritchiecli.io/install.sh | bash
Windows: Download the .msi
from:
https://commons-repo.ritchiecli.io/latest/ritchiecli.msi
Step 2 - Initialization
Run the following command to initialize Ritchie:
rit init
This command will ask 3 questions:
- If you wants to contribute anonymously to Ritchie metrics.
- If you wants to add the community formulas locally.
- If you wants the default formula execution method to be local or through docker. (Here, choose
LOCAL
)
Step 3 - Add a Ritchie formulas repository
To create the README.md for our profile, we need to import the repository containing the formula we plan to use: https://github.com/GuillaumeFalourd/formulas-github
Do to so, execute the command below:
rit add repo --provider="Github" --name="formulas-github" --repoUrl="https://github.com/GuillaumeFalourd/formulas-github" --priority=1
Step 4 - Create the Github profile
If you already have a Github profile repository, do directly to step 4.2.
Step 4.1 - Create the Github repository
Step 4.1.1 - With the Github interface
Create the repository with your Github username here: https://github.com/new
Then, clone the Github repository on your computer.
Step 4.1.2 - With Ritchie
Create a Github Token following https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
Then execute the following command:
rit github create repo
The repository will be created on the directory where you executed the command above.
Step 4.2 - Create the README file
- On the terminal, go to the repository you just created:
cd <username>
- Then execute the following command:
rit github create profile
This command will overwrite the current README.md file according to the datas you'll inform.
Step 4.3 - Commit your code
git add . ; git commit -m "first commit"
git push origin main
That's it ✅
Your profile is now online on your Github Account.
This README.md file is not very sophisticated yet, but it is evolving through time.
Here is the first formula code version in Python:
And the current version is available here: https://github.com/GuillaumeFalourd/formulas-github/blob/master/github/create/profile/src/formula/formula.py
It is possible to improve this formula to add other features on the file. You can do it manually, or contribute to the repository to improve the template and/or other formulas!
Thank you for reading 🙂
Posted on January 28, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.