1
0
favro-sync/setup.py

133 lines
3.6 KiB
Python
Raw Permalink Normal View History

# WARNING
#
# THIS IS AN AUTOGENERATED FILE.
#
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN.
import re
from setuptools import setup
PACKAGE_NAME = 'favro_sync'
PACKAGE_DESCRIPTION = """
# Favro Sync.
Filesystem in User Space for Favro.
Synchronize your local notes and your Favro.
Uses the [Favro API](https://favro.com/developer/). Rate limiting depends upon
your organization's payment plan.
Uses [`python-fuse`](https://github.com/libfuse/python-fuse) library.
2024-09-30 10:50:43 +00:00
Features:
- Local access to cards in todolist.
- Read card features:
- Title
- Description
- Tags
- Assignees
- Dependencies
- Custom fields
2024-09-30 10:50:43 +00:00
- Change card features:
- Title
- Description
- [Obsidian](https://obsidian.md/) compatibility:
- Mountable within your vault.
- Link to cards by either card number or card title.
- Tags and dependencies are integrated.
Limitations:
- Only cards in todolist is fetched at the moment.
2024-09-30 10:50:43 +00:00
- Tasks (checklists on cards) cannot be updated or changed.
- Images cannot be updated or changed.
- You cannot create new cards, nor any other files.
## 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 <MOUNT_DIR>`. 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.)
2024-09-30 10:50:43 +00:00
## Architecture
- `FavroFuse`
- Markdown Parser/Renderer
- `FavroClient`
- `CardCache`
## Work in Progress
Following features are work in progress:
- [ ] Frontmatter: Writable Tags
- [ ] Frontmatter: Writable assigned members
- [ ] Frontmatter: Writable Tasks.
1. Save updated TaskList along with card (using `PUT cards`)
2. Get the Card's TaskList.
3. Remove all TaskList's except for the latest (how to determine latest?)
4. That's three requests just to save a freaking list of tasks!
- [ ] Frontmatter: Writable Dependencies.
- [ ] Usability: Richer directory structure
- [ ] Usability: Allow users to toggle Obsidian mode, instead of being default.
- [ ] Precision: Get the correct last-modified date.
- [ ] Performance: Improve cache behaviour. User and tags can have much longer cache times.
- [ ] Performance: Parallelize requests.
* Paginated pages can be easily parallelize.
- [X] Frontmatter: Arbitrary structured data (Custom Fields)? Read-only.
- [X] Frontmatter: Readable Dependencies. As vault links in Obsidian mode.
""".strip()
PACKAGE_DESCRIPTION_SHORT = """
Filesystem in User Space for Favro.""".strip()
def parse_version_file(text: str) -> str:
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
if match is None:
msg = 'Malformed _version.py file!'
raise Exception(msg)
return match.group(2)
with open(PACKAGE_NAME + '/_version.py') as f:
version = parse_version_file(f.read())
REQUIREMENTS_MAIN = [
'requests',
'requests-cache',
'fuse-python',
'secret_loader @ git+https://gitfub.space/Jmaa/secret_loader',
2024-09-30 10:50:43 +00:00
'marko',
'python-frontmatter',
]
REQUIREMENTS_TEST = [
'pytest',
]
setup(
name=PACKAGE_NAME,
version=version,
description=PACKAGE_DESCRIPTION_SHORT,
long_description=PACKAGE_DESCRIPTION,
long_description_content_type='text/markdown',
author='Jon Michael Aanes',
author_email='jonjmaa@gmail.com',
url='https://gitfub.space/Jmaa/' + PACKAGE_NAME,
packages=[PACKAGE_NAME],
install_requires=REQUIREMENTS_MAIN,
extras_require={
'test': REQUIREMENTS_TEST,
},
python_requires='>=3.9',
)