From 244c3fd68137a01f55eabcd06408d3c4cc557c10 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Thu, 26 Sep 2024 23:34:11 +0200 Subject: [PATCH] Additional documentation --- favro_sync/__init__.py | 12 +++++++++++- favro_sync/__main__.py | 6 +++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/favro_sync/__init__.py b/favro_sync/__init__.py index 0c45c69..9025fca 100644 --- a/favro_sync/__init__.py +++ b/favro_sync/__init__.py @@ -11,11 +11,21 @@ Uses [`python-fuse`](https://github.com/libfuse/python-fuse) library. Limitations: -- Only works for TODO files. +- Only cards in todolist is fetched at the moment. - Doesn't include title anywhere. - Tasks cannot be updated or changed. +- Slow, due to inefficient use of caches. A more complete implementation will probably require a Markdown parser, to parse the saved input, and distribute it across the various Card fields (card name, description, tasks, etc...) + +## Usage + +1. Install dependencies `pip install -r requirements.txt` +2. Setup [secrets](https://gitfub.space/Jmaa/secret_loader]): `FAVRO_ORGANIZATION_ID`, `FAVRO_USERNAME`, `FAVRO_PASSWORD`. +3. Run `python -m favro_sync `. Use the `--help` argument to get an + overview of all supported flags (there is a lot, because + [`python-fuse`](https://github.com/libfuse/python-fuse) implements a whole + bunch automatically.) """ diff --git a/favro_sync/__main__.py b/favro_sync/__main__.py index 67c735c..4d4ee48 100644 --- a/favro_sync/__main__.py +++ b/favro_sync/__main__.py @@ -1,4 +1,6 @@ +import tempfile + import requests_cache import secret_loader @@ -14,9 +16,7 @@ def main(): read_only = False - # with tempfile.TemporaryDirectory(prefix='favro_sync_') as tmpdirname: - tmpdirname = './output' # TODO - if True: + with tempfile.TemporaryDirectory(prefix='favro_sync_') as tmpdirname: session = requests_cache.CachedSession( tmpdirname + '/http-cache.sqlite', expire_after=360, )