https://github.com/encryptex/archiver
Python script to organize your folders
https://github.com/encryptex/archiver
archive downloads organizer script tool
Last synced: 9 days ago
JSON representation
Python script to organize your folders
- Host: GitHub
- URL: https://github.com/encryptex/archiver
- Owner: EncryptEx
- Created: 2021-08-14T10:28:37.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-06-19T19:31:09.000Z (about 2 years ago)
- Last Synced: 2025-06-05T05:48:17.209Z (about 1 year ago)
- Topics: archive, downloads, organizer, script, tool
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Archiver
A script to organize all your files from your Downloads folder.

## Pre-requisites
[Python 3.x Installed](https://www.python.org/downloads/)
[Node.js 18+ Installed](https://nodejs.org/)
Install backend dependencies:
```sh
pip install -r requirements.txt
```
Install web UI dependencies:
```sh
cd web-ui
npm install
```
## Tutorial
1. Start backend API.
```sh
python3 oneclick.py
```
2. In another terminal, start the web UI.
```sh
cd web-ui
npm run dev
```
3. Open `http://127.0.0.1:5173`.
4. In the web UI:
- Set the folder path (for example your Downloads path).
- Add or edit rules to map extensions to folders.
- Click `Save Settings`.
- Click `Archive Now`.
## Rule Configuration
Rules are stored in [archiver_settings.json](archiver_settings.json).
Each rule looks like:
```json
{
"folder": "scripts",
"extensions": [".ps1", ".bat", ".sh"]
}
```
Unknown extensions can still be auto-grouped into `_ext_` folders when enabled.
## Build Frontend
To build a production bundle:
```sh
cd web-ui
npm run build
```
The output is created in `web-ui/dist` and is automatically served by FastAPI when present.
## Standalone Binaries (No Python/Node needed on target machine)
Native binaries must be built on each target OS:
- Build Linux binary on Linux.
- Build Windows binary on Windows.
### Linux build
```sh
chmod +x scripts/package_linux.sh
./scripts/package_linux.sh
```
Output:
```sh
dist/archiver
```
Run:
```sh
./dist/archiver
```
### Windows build (PowerShell)
```powershell
./scripts/package_windows.ps1
```
Output:
```powershell
dist/archiver.exe
```
Run:
```powershell
./dist/archiver.exe
```
### Build both automatically (CI)
This repo includes GitHub Actions workflow at `.github/workflows/build-binaries.yml`.
Trigger it from GitHub Actions and download:
- `archiver-ubuntu-latest`
- `archiver-windows-latest`
### Runtime behavior
- Binary starts local server at `http://127.0.0.1:8000`.
- Browser opens automatically.
- Use env vars if needed:
- `ARCHIVER_HOST`
- `ARCHIVER_PORT`
- `ARCHIVER_NO_BROWSER=1`
