- Concept
- Configuration
- Projects file
- Get your own .project-provider
- Run the .project-provider locally
The .project-provider provides some meta information about your projects. The informations are stored in a json file that will be updated by a github actions workflow.
You can set the configuration in the .conf
file. The configuration file is a simple key-value file. The key is the name of the configuration and the value is the value of the configuration.
Specify the github username you want to get the projects from.
Specify the path to the output file. The path is relative to the root directory of the project.
Specify a comma separated list of file names that the project provider should look for in the root directory of your projects. The file itself can contain some more meta information about your project. Take a look at the Projects file section to see how a project file looks like.
A path to a file where the timestamp of the last update will be stored. The path is relative to the root directory of the project.
A path to a file where the log of the last update will be stored. The path is relative to the root directory of the project.
The maximum length of the log file. If the log file is longer than the specified length, the log file will be truncated.
Path to the banner file. The path is relative to the root directory of the project.
A project file contains some more meta information about your project and is there so the project is recognized by the .project-provider. The file has to be stored in the root directory of your project and has to follow the naming convention of the project_files
configuration. The file is a simple key-value file, where the key is the name of the meta information and the value is the value of the meta information.
All properties are optional!
- logo: The path to the logo of the project. The path is relative to the root directory of the project. This property will be used by the project provider to generate a url to the logo.
- logo_small: The path to the logo of the project. The path is relative to the root directory of the project. This property will be used by the project provider to generate a url to the logo.
- description_translate: A comma separated list of languages. The description of your github project will be translated to the languages specified in this property. The languages have to be specified in the ISO 639-1 format.
- version: The version of the project.
- ignore: If you want that the project-provider ignores the project, without deleting the project file, you can add a simple ignore property to the project file. The value of the property doesn't matter. If the property is present, the project will be ignored.
Take a look at the example project file to see how a project file looks like.
By default the project file is a simple key-value file in the format key:value
. You can configure the divider by adding a line with the #?<divider>
syntax. The divider
is the string that will be used as divider.
Example:
#?=
logo=assets/logo.png
logo_small=assets/logo_small.png
description_translate=de
version=1.0
If you want to automate your project management, you can use the .project-provider. To get your own .project-provider you can follow these steps:
- Fork this repository
- Create a new github repository with the forked repository as template
- Edit the
.conf
file to your needs - Set write permissions for the github actions workflow to the repository:
- Go to the settings of your repository
- Navigate to Actions > General and enable Read and write permissions
- Click on Save
The last thing to do is to set up the project files in your projects, so the project provider can find them. Take a look at the Projects file section to see how a project file looks like.
If you want you can set the update time to your needs. Go to the get_projects_schedule.yaml file and edit the cron expression.
If you want to run the project provider locally, you can follow these steps:
- Download the latest release
- Make sure you have python installed
- Install the dependencies with
pip install -r requirements.txt
- Run the project provider with
python main.py
If you need help run
python main.py -help
- Get Projects (PUSH) - This workflow will be triggered if you push to the repository. It will update the projects file and push the changes to the repository when there are changes.
- Get Projects (SCHEDULE) - This workflow will be triggered every night. It will update the projects file and push the changes to the repository when there are changes.
- Get Projects (FORCE) - This workflow will be triggered manually. It will update the projects file and push the changes to the repository (even if there are no changes detected).
by Philipp B.
https://raw.githubusercontent.com/cophilot/.project-provider/main/projects.json