github-stats
github-stats copied to clipboard
Improved functionality
This PR contains some simple changes consisting on a file creation and a modification:
A config.py file was added, whose objective is to provide with a "friendlier" and unified interface for the stats card generation process variables, such as EXCLUDED, EXCLUDE_LANGS or EXCLUDE_FORKED_REPOS that are defined in a separate way, which difficults the customization process. This config file uses variables in order to modify these parameters, which are then passed into the generate_images.py script (original functionality is not modified in an extensive way, though).
It also implements some new functionality: say that someone decided to use the original repository's template (using the corresponding license), but did not want the original files to be all spread over their own repository. There is a variable defined in the config file (import_path) that allows the user to enclose the original files in a custom directory and create a pointer to it in the generate_images.py script.
There are other variables such as enclosing_directory or export_path, which set the name of the folder that enloses output svg files and the relative export path from the main directory of the repository (for selecting output folders, in which the enclosing_directory one will be contained).
Tests have been run and no issues related to the scripts were raised.