Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/artainmo/github_to_obsidian

Personal project. Program to transfer and synchronize all my github repositories into my obsidian.
https://github.com/artainmo/github_to_obsidian

github-actions github-api obsidian

Last synced: about 2 months ago
JSON representation

Personal project. Program to transfer and synchronize all my github repositories into my obsidian.

Awesome Lists containing this project

README

        

# github_to_obsidian
Personal project. Program to transfer and synchronize all my public github repositories into my obsidian.

If a new file has been created or an existing file updated, the program will synchronize this in Obsidian repo, but it won't delete files in Obsidian that have been deleted in github. This is why repositories should only be made public once the code inside is finished to avoid syncronization problems with files deleted on github.

## Steps to create
1. Be able to collect all repository links from a user. \
2. Iterate over all projects, to get all its files and then files inside their directory. \
3. Remove in github itself, files or directories that should not be there. \
4. Skip certain directories and files such as .git or submodules or ones related to external library or config files. \
5. Create the markdown and code files. \
6. For synchronization, verify if each file already exists, and if it exists see if its contents are similar and tags are similar. \
7. Use github actions to do the verification once a day. \

## File management
##### Naming
Use github repository path as file name in obsidian.

Transform '/' into '~'.

Remove '.' if file name starts with that.

Add '.md' extension in the end for obsidian.

##### Tags
Give tags of project to its root README.

Give the 'from-github' tag to all files that come from github.

If on a page of code you can detect the programming language via its extension, add this programming language as a tag.

##### Content
All files' content should be between backtilts as this is how code is displayed in obsidian markdown.

Only README.md files' content should not be between backtilts. And also README.md files, if at root of repository, should start with the tags.

The \
HTML tags can be removed from README.md files for obsidian's markdown.

All files should have the 'from-github' tag.

All files should after the tags and before the content have a line saying: 'View this page on [github](appropriate_link). Only edit this page on github.'.

##### Files to skip
```
Files with no extension besides if makefile/Makefile/dockerfile/Dockerfile
.gitkeep
*.swp
a.out
.env
*.txt
*.zip
*.csv
*.svg
*.png
*.jpg
*.ico
*.json
*.storyboard
*.plist
telegraf.conf
grafana.db
wordpress.sql
.eslintrc.js
.prettierrc
*.lock
*.options
*.conf.in
*.map
*.pdf
*.bmp
*.rt
*.names
*.pkl
*.log
reportWebVitals.js
app.e2e-spec.ts
```

##### Directories to skip
```
*/*.xcworkspace
*/*.xcodeproj
*/utils/ft_printf
*/utils/get_next_line
*/utils/libft
*/libs/get_next_line
*/libs/libft
*/utils/minilibX
inception-of-things/p1
inception-of-things/p2
matcha/frontend
minishell-unittest/test/test
*/data
*/node_modules
*/js/vendor
webserv/conf
webserv/webserv/frontend
ft_printf/ft_printf
```