Skip to content

Allows personalized sorting of documents downloaded with pytr

License

Notifications You must be signed in to change notification settings

ExploracuriousAlex/pytr_custom_sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytr_custom_sort

Personalized sorting of documents downloaded with pytr from Trade Republic.

Overview

If you want to organize your Trade Republic documents downloaded with pytr in your own custom way, this tool provides a flexible, rule-based sorting system. Define your sorting rules in YAML format and let the tool automatically organize your documents.

Prerequisites

  • Python with uv package manager (recommended for easier dependency management)
  • pytr for downloading Trade Republic documents

💡 Tip: I recommend using the uv package manager for a more comfortable Python experience. It's fast, reliable, and handles dependencies seamlessly. If you don't have it yet, install it with:

# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# Windows (WinGet)
winget install --id=astral-sh.uv  -e

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

Installation

Clone the repository:

git clone https://github.com/ExploracuriousAlex/pytr_custom_sort.git
cd pytr_custom_sort

Install dependencies:

uv sync

Usage

1. Download Documents with pytr

First, download your Trade Republic documents using pytr's --flat option:

uvx pytr dl_docs <your_download_folder> --flat

For more details about pytr, visit: https://github.com/pytr-org/pytr

2. Configure Sorting Rules

Adapt the config/tr_sorting_rules.yaml file to define your preferred sorting rules.

For detailed information on how to configure sorting rules, see docs/rules_documentation.md.

3. Run the Sorting Tool

Execute the sorting script on your downloaded documents:

uv run sort_tr_docs.py <your_download_folder>

Documentation

Project Structure

pytr_custom_sort/
├── rule_based_sort/           # Generic rule-based sorting module
│   ├── __init__.py
│   └── rule_based_sorter.py   # Sorting business logic
├── tests/                     # Test suite
│   └── test_rule_based_sorter.py
├── config/                    # Configuration files
│   ├── tr_sorting_rules.yaml
│   └── tr_sorting_rules.schema.json
├── docs/                      # Documentation
│   └── rules_documentation.md
├── sort_tr_docs.py            # Main CLI script
├── README.md
├── LICENSE
└── pyproject.toml

License

See LICENSE for details.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

About

Allows personalized sorting of documents downloaded with pytr

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages