codimd-to-gitlab-sync/README.md

45 lines
985 B
Markdown
Raw Normal View History

2022-04-18 23:14:37 +02:00
A 'simple' collection of bash scripts that syncs CodiMD files with a certain metadata block to Gitlab
You need to put the following block somewhere in you CodiMD file.
```markdown
2022-04-18 23:14:59 +02:00
:::spoiler Gitlab sync
2022-04-18 23:14:37 +02:00
- sync-to: path/in/the/drive
:::
```
## Setup
Install the glab tool using a package manager of your choice.
Set environment variable in your shell profile:
```bash
export GITLAB_HOST=https://git.zeus.gent
2022-04-18 23:11:58 +02:00
export GITLAB_TOKEN_NAME=the-token-name-in-gitlab
export GITLAB_TOKEN=********
export CMD_SERVER_URL=https://codimd.zeus.gent
export CMD_EMAIL=codimd.zeus.gent@mcbloch.dev
export CMD_PASSWORD=*******
```
## TODO
- Add a way to discover new markdown files.
- Scraping Mattermost
2022-04-18 23:11:58 +02:00
- ? Providing an api endpoint to post an url to ?
2022-04-18 23:19:21 +02:00
## Used tech
- [GitLab CLI Tool](https://glab.readthedocs.io/en/latest/index.html)
- bash
- git
- curl
### References
- [CodiMD source code](https://github.com/hackmdio/codimd/tree/develop/lib). Usefull to find the api endpoints.