Skip to main content

Syncs md obsidian documents to outline wiki

Project description

obsout

obsout is an Obsidian to Outline Wiki connector written in Python. It will sync local markdown files to Outline via API requests (and sync to local computer), show status of sync, and aid in deleting documents between both Outline and local Obsidian vault.

Installation

obsout can be installed from PyPI:

pipx install obsout

Vault Structure

- Collection1
    - Document1
    - Document2
    ...
- Collection2

Outline is relatively simple wiki, with only high level collections, which contain any number of documents. Outline also provides the functionality of nested documents, however I'm not sure how to implement this from the perspective of files/directories.

This structure means that any files found in the root directory will be ignored, so keep that in mind.

Configuration

Use the provided example.env to make a .env file. Note the path to this file (I recommend placing it in your wiki directory, you won't be able to see it in Obsidian). In addition to the .env file, a conf.yml file is also needed - again, use the provided example. Private directories can be added as shown:

wiki:
    path: "your path"
    exclude:
        - directory1
        - direcotry2

Once you have provided the path to the .env and conf.yml files, the paths will be stored in a json file at the path /home/user/.config/obsout/conf.json.

On the first run of obsout, use the following options to specify paths:

  -c, --config TEXT  Specify config file, defaults to current directory
  -e, --env TEXT     Specify .env file, defaults to current directory

Again, after first run these options are not necessary unless you have moved the path of the .env and conf.yml files.

Commands

status will show modified/missing files by default compared to the local vault. Using the --local flag, you can see the status in the opposite direction (file missing from vault compared to Outline).

obsout status [OPTIONS]

  View local sync status

Options:
  --local  Show status of local files compared to remote

sync will sync files bi-directionally between Outline and the local Obsidian vault based on modification date (older files will be overwritten). No files will be deleted in the sync.

Usage: obsout sync [OPTIONS]

  Sync local and client markdown files

delete will delete a collection, or a document, based on the collection/document name provided. The entire collection will be deleted if the --all flag is provided.

Usage: obsout delete [OPTIONS]

  Delete a document from vault and Outline

Options:
  -c, --collection TEXT  Collection name  [required]
  -d, --document TEXT    Document name, without '.md' extension
  --all                  Delete entire collection

Contributing

Pull requests are more than welcome. If you have major changes slated, please open an issue instead.

To set up a development environment with poetry (on Linux):

# Install poetry
pipx install poetry
# Create virtual environemnt
python -m venv venv
source venv/bin/activate
# Install dependencies
poetry install

For more information on working with Outline Wiki API, see the documentation

Credits

Thanks to jaypyles and his project obsidian-to-bookstack for the inspiration. His approach to syncing between obsidian and bookstack provided a lot of inspiration to my approach in this project.

License

GPL3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

obsout-0.1.3.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

obsout-0.1.3-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file obsout-0.1.3.tar.gz.

File metadata

  • Download URL: obsout-0.1.3.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/6.6.9-100.fc38.x86_64

File hashes

Hashes for obsout-0.1.3.tar.gz
Algorithm Hash digest
SHA256 95e73b1d7d197d3a9d33df0524c0f1ef4ada2331058b5a8f3268d4aab644097a
MD5 96581476a5f337f892100f0a2c4e36ad
BLAKE2b-256 a9161e216607cd343b68169c0139e8070f0592cfa13d003fe20afc58968b06ec

See more details on using hashes here.

File details

Details for the file obsout-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: obsout-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/6.6.9-100.fc38.x86_64

File hashes

Hashes for obsout-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e76b115f1e34ae893d3da503c7e4964e928bc57010e4fb318d7178dd70cb9931
MD5 a15bc43c5b73a38be7c9d1d541ffd7e5
BLAKE2b-256 fe96ee92799600a4cf76583484d5fbb21ccdb75ea8821987b73060f91f527690

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page