This repo contains a python script that will transform some of the Obsidian docs into json files. The content is either limited to the first 10 lines of each file or all the headings, if any, which are linked to the published help vault. This script is for use with Carl-bot tags.
- Clone this repo.
git clone https://github.com/obsidian-community/obsidian-jsons
cd
into the cloned folder and run
git clone [email protected]:obsidianmd/obsidian-docs.git
if you want to use SSH or
git clone https://github.com/obsidianmd/obsidian-docs.git
if you want to use HTTPS.
If you want to create the json files:
python3 make_jsons.py <api_dev_key> <api_user_key>
All files will be uploaded, the old files will be deleted on Pastebin.
The tagscript
file is updated every time, so is the paste_ids.py
file.
The paste api_paste_private
key is set to 1, so pastes are unlisted. Keep in mind the limit of 10 unlisted pastes for free accounts. Set it to 0 to upload public pastes.
For testing, I have left in the counter variable. You need to uncomment it in three places if you want to limit uploads:
#counter : int = 0
for dirpath, dirnames, files in os.walk("./obsidian-docs/en/"):
for file_name in files:
if file_name.endswith(".md"):
normalised_path = os.path.normpath(dirpath + "/" + file_name)
if file_name in included_files:# and counter < 3:
#counter += 1