Giter VIP home page Giter VIP logo

docs-for-carl's Introduction

Obsidian docs to json for Carl-bot

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.

Installation

  1. Clone this repo.
git clone https://github.com/obsidian-community/obsidian-jsons
  1. 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.

Usage

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.

Testing

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

docs-for-carl's People

Contributors

kometenstaub avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.