37 lines
1.4 KiB
Markdown
37 lines
1.4 KiB
Markdown
# file-organizer
|
|
|
|
This is a custom made software to perform maintenance on downloaded files for DarkBird's anime website.
|
|
|
|
# System Overview
|
|
|
|

|
|
|
|
The application consist of a simple API with a single endpoint which starts a job and returns its ID. Then the job is orchestrated on a different thread following these steps:
|
|
|
|
1. Filtering:\
|
|
Fetch from the qbittorrent API the files that are currently being downloaded in order to filter them out of the process.
|
|
2. Deduplication:\
|
|
Invoke a [Czkawka](https://github.com/qarmin/czkawka) process to identify duplicate files, keep the appropiate version for each episode.
|
|
3. Moving:\
|
|
Using regex, identify the directory where each file should be located, and the new name it should have.
|
|
4. Log storage:\
|
|
Store all the logs for the current job in order to be able to debug and keep trazability of the process.
|
|
|
|
# Development
|
|
|
|
```bash
|
|
git clone https://github.com/Jose134/file-organizer.git
|
|
cd file-organizer
|
|
pip install -r requirements.txt[dev]
|
|
```
|
|
|
|
# Roadmap:
|
|
- [x] Be able to move and rename files based on a regex
|
|
- [x] Read qbittorrent credentials from .env file
|
|
- [x] Implement API endpoint using FastAPI
|
|
- [x] Run organization job on a separate thread
|
|
- [x] Deduplicate files using Czkawka
|
|
- [ ] Add unit tests
|
|
- [ ] Add logging
|
|
- [ ] Make it run in docker
|
|
- [ ] Create another endpoint to retrieve the logs of a job |