A script to magically update your obsidian snippets hosted on github.
Project description
Obsidian Snippet Manager is a python script that git pull and move CSS file in your .obsidian/snippet
folder.
The goal is to provide a pratical way to get semi-auto-update from css snippet hosted on github, in waiting of an eventually BRAT update that support that.
Get started
Requirements
Environment
The plugin needs :
- The absolute path of your vault, as :
G:\Drive\Vault
- A folder that contains all the snippet you want to get the update.
This folder can be everywhere on your computer (yes, it can be in
.obsidian
too.). It will contain all folder of the snippet hosted on GitHub you want to use.
In case of the folder doesn't exist, the script will create it !
How to use
- Adding a new repo :
obsnipe clone repository_url
Additionnaly you can exclude a folder from update with adding the--exclude
command :obsnipe clone --excluded [repository_url]
- Updating everything :
obsnipe
- Updating only a repository :
obsnipe update folder_name
The foldername is the folder that you want to update the snippet !
The script will :
- Git pull
- Git move every
.css
file in your.obsidian/snippet
folder.
Other function
obsnipe list
: List all Github Repository you download.obsnipe exclude [folder_name]
: Exclude a folder from update. You can exclude multiple value using :obsnipe exclude [folder1] [folder2]
Note : You can exclude folder from auto update using the exclude.yml
file, placed in your Snipper Manager folder.
Example
Using Obsidian Snippets Collection
- Configuration :
- Vault is in :
G:/Drive/vault
- My Obsidian Manager Folder is in :
D:/Documents/Github/Snippets Manager
- Vault is in :
obsnipe --add https://github.com/Mara-Li/Obsidian-Snippet-collection
- Active the snippets 🎉
To update this specific snippet : obsnipe update Obsidian-Snippet-collection
In obsidian
You can create a commmand in Obsidian using Obsidian Shell.
Bonus, you can update your snippet everytime obsidian start, like BRAT !
⚠️ WARNING : Every edit on snippet downloaded by this way will break the script. Please, DON'T EDIT these file, and use another snippet ! (Or, use a fork and commit before !)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for Obsidian_Snippet_Manager-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 551f8303a4031f68ef9af5112aa0e839e0b7b2c32a3387eddfe804aac7481fd0 |
|
MD5 | 9fabe98e03bb1bd8ead88e1b0e2ab21d |
|
BLAKE2b-256 | e8ccbda440c015c041595119a6317922bd64c2edcb2d02bded4b761b22978bad |
Hashes for Obsidian_Snippet_Manager-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4acc122ec9e052ef5f5f4539e865da6d41d923c7b8f380e42cd65d869dbd1561 |
|
MD5 | c74f43a8016e5b9d46d464f55104936f |
|
BLAKE2b-256 | cbc64f544167352c6f06886d53dba9fe0b07b2cdf1eb6487913a23c80e1e0712 |