Contributing¶
Contributions to Inkfeed are welcome! Here's how to get set up.
Development Setup¶
-
Clone the repository:
-
Create a virtual environment:
-
Install in editable mode with dev dependencies:
-
(Optional) Install Sleepscreen dependencies:
Project Structure¶
See the Architecture Overview for a detailed breakdown.
The key directories are:
inkfeed/archiver/— Source fetchersinkfeed/output/— Format writersinkfeed/templates/— Jinja2 templatesinkfeed/utils/— Shared utilitiestests/— Test suite
Code Style¶
- Python 3.11+ with type hints
- Use
from __future__ import annotationsfor modern type syntax - Follow existing patterns in the codebase
- Keep functions focused and well-documented
Adding a New Source¶
- Create
inkfeed/archiver/your_source.py - Implement a class with
__init__(source, output_dir)andrun()methods - Return an
ArchiveResultfromrun() - Register in
ARCHIVER_MAPinmain.py - Add tests in
tests/
Adding a New Output Format¶
- Create
inkfeed/output/your_format.py - Implement a
FormatWritersubclass - Register in
WRITER_MAPinmain.py - Add tests in
tests/
Pull Requests¶
- Keep PRs focused on a single change
- Include tests for new functionality
- Update documentation if applicable
- Ensure all tests pass before submitting