This repo allows the user to quickly generate attractive custom README files for their github profile (or whatever) based on a simple template.
Huge thanks/acknowledement Sidney Arcidiacono for the original design!
The template should be a json file containing a single json object. Top level keys should be in the format "section_x" and are used to order the sections in the final README.
The corresponding values for each key should also be json objects, although their contents will vary depending on section type. All section types support an optional "title"
field (key) which can be set to create a title/header for the given section
This repo is built around badges, each of which can be assigned an icon. These icons are set with an <ICON_ID>
from Simple Icons, but can also be set as custom icons if a base64-encoded string for the desired image is provided instead of an id.
A filled template example is provided in ./template.json
Currently supported section types and their usage:
"image"
An image. Originally intended to be used for banners/headers.
Keys:
* "src" - A path to image file to be used
* "alt" - Alternate text if file is missing
Example:
{
"format": "image",
"src": "/header_1.png",
"alt": ""
}
"badge_group_linked"
A group of badges with links.
Keys:
* "badges" - A list of lists. Each sub-list contains info for a given badge. Sub-list format : [<TEXT>, <HEX_COLOR>, <ICON_ID>, <LINK>]
Example:
{
"format": "badge_group_linked",
"badges": [
["Website", "#005A9C", "w3c", "https://ianwu13.github.io/"],
["GitHub", "#100000", "github", "https://www.github.com/ianwu13"]
]
}
"table"
A table of badges. Originally intended to be used as a skills table.
Keys:
* "col_types" - The type of content in each column. Currently supported content types:
* "text"
* "badge_group"
* "cols" - Heading text for each column. This is an optional field.
* "rows" - A list of lists. Each sub-list contains the info for a single row. Sub-list contents should correspond to the content type specified for each index.
* "text" - Content should be a string
* "badge_group" - Content should be a list of lists. Each sub-list corresponds to a badge. Sub-list format : [<TEXT>, <HEX_COLOR>, <ICON_ID>, ?<USE_BLACK_TEXT>]
Example:
{
"col_types": ["text", "badge_group"],
"cols": ["Type", "Technologies"],
"rows": [
["Operating Systems", [
["Linux", "#FCC624", "linux", "black"],
["Ubuntu", "#E95420", "ubuntu"],
["MacOS", "#000000", "macos"],
["Windows", "#0078D6", "windows"]]]
]
}
"bullets"
A list of bullet points.
Keys:
* "items" - A list of strings corresponding to each bullet point
Example:
{
"format": "bullets",
"items": [
"bullet 1",
"bullet 2"
]
}
The script ./gen_readme_from_template.py
is used to generate the actual markdown file from the template.
The script has 2 command line arguments (--template and --outfile) which the user can set to use specific template files or destinations.
An example call can be seen below:
python3 gen_readme_from_template.py --template customized_template.json --outfile custom_readme.md
Type | Technologies |
---|---|
Programming Languages | |
Data Science and Machine Learning | |
Databases | |
Data Visualization | |
Web Development | |
DevOps/MLOps and Deployment | |
Code Collaboration | |
Operating Systems | |
Other |
- If you'd like to create a similar README for your own profile, I have a repository which generates them from a json template.
- Huge thanks to Sidney Arcidiacono for the original design!