Gallery-Archivist/README.md

186 lines
3.4 KiB
Markdown
Raw Normal View History

2022-09-03 17:06:44 +02:00
# Gallery-Archivist
---
2023-10-20 10:22:21 +02:00
[![Please don't upload to GitHub](https://nogithub.codeberg.page/badge.svg)](https://nogithub.codeberg.page)
2022-09-03 17:06:44 +02:00
2022-09-20 12:35:48 +02:00
My try to make a Social media archiving web tool with django and gallery-dl
2022-09-22 14:06:56 +02:00
2023-08-02 15:59:03 +02:00
## Features / Roadmap
2023-10-21 21:27:31 +02:00
2023-08-24 17:33:37 +02:00
*Note!* This is still in early development so stuff **will** change.
2023-08-02 15:59:03 +02:00
2023-10-21 21:27:31 +02:00
- [ ] Scraping sites
- [ ] Scheduled tasks
- [ ] Site support
- [ ] [Furaffinity](https://www.furaffinity.net)
- [ ] [Twitter/X](https://twitter.com/)
2024-03-01 19:00:59 +01:00
- [x] User import With profile/banner images
- [ ] Import images from timeline
2023-10-21 21:27:31 +02:00
- [ ] Media support and previews
- [x] Flash (With [Ruffle](https://github.com/ruffle-rs/ruffle/))
- [x] PDF (With HTML embed tag)
- [X] Image (With HTML img tag)
2024-03-01 19:00:59 +01:00
- [ ] Compressed archive previews
2023-10-21 21:27:31 +02:00
- [ ] other text documents
2024-03-01 19:00:59 +01:00
- [ ] Easy download list of all files of post and user
2022-09-22 14:06:56 +02:00
---
2023-10-06 10:09:01 +02:00
## Usage
2023-10-21 21:27:31 +02:00
2023-10-06 10:09:01 +02:00
### Run without Docker
2023-10-21 21:27:31 +02:00
- **Step 1:** Clone repo
2023-10-06 10:09:01 +02:00
```bash
git clone https://git.aroy-art.com/Aroy/Gallery-Archivist.git
```
2023-10-21 21:27:31 +02:00
- **Step 2:** Change dir to the new cloned repo
2023-10-06 10:09:01 +02:00
```bash
cd Gallery-Archivist
```
2023-10-21 21:27:31 +02:00
- **Step 3:** Make a python environment
2023-10-06 10:09:01 +02:00
```bash
python3 -m venv venv
```
2023-10-21 21:27:31 +02:00
- **Step 4:** Activate the new python environment
2023-10-06 10:09:01 +02:00
```bash
source ./venv/bin/activate
```
2023-10-21 21:27:31 +02:00
- **Step 5:** Install python dependencies
2023-10-06 10:09:01 +02:00
```bash
pip install -r requirements.txt
```
2023-10-21 21:27:31 +02:00
- **Step 6:** Copy environment config file and change it to your liking
2023-10-06 10:09:01 +02:00
```bash
cp env-sample .env
```
2023-10-21 21:27:31 +02:00
- **Step 7:** Change directory to `./archivist`
2023-10-06 10:09:01 +02:00
```bash
cd ./archivist
```
2023-10-21 21:27:31 +02:00
- **Step 8:** Run django server
2023-10-06 10:09:01 +02:00
```bash
python3 manage.py runserver
```
### Manual Import Data
It is possible to import data from saved gallery-dl json files
2023-10-21 21:27:31 +02:00
- **Step 1:** Make sure that you are in the root folder of the project.
- **Step 2:** Make sure to activate the python environment.
2023-10-06 10:09:01 +02:00
```bash
source ./venv/bin/activate
```
2023-10-21 21:27:31 +02:00
- **Step 3:** Change directory to `./archivist`
2023-10-06 10:09:01 +02:00
```bash
cd ./archivist
```
2023-10-21 21:27:31 +02:00
- **Step 4:** Import the json data and media file from gallery-dl
2023-10-06 10:09:01 +02:00
replace `<path>` with the path of the folder or json file to import
```bash
python manage.py import_data <path>
```
2022-09-22 14:06:56 +02:00
## Development
2023-10-21 21:27:31 +02:00
### Without Docker
2022-09-22 14:06:56 +02:00
*Note!* Instructions are made for a modern linux environment.
- **Step 0:** Make sure that you have installed the dependencies.
You need `git, python, python-virtualenv, redis`
2023-10-21 21:27:31 +02:00
- **Step 1:** Clone repo
2022-09-22 14:06:56 +02:00
```bash
git clone https://git.aroy-art.com/Aroy/Gallery-Archivist.git
```
2023-10-21 21:27:31 +02:00
- **Step 2:** Change dir to the new cloned repo
2022-09-22 14:06:56 +02:00
```bash
cd Gallery-Archivist
```
2023-10-21 21:27:31 +02:00
- **Step 3:** Make a python environment
2022-09-22 14:06:56 +02:00
```bash
python3 -m venv venv
```
2023-10-21 21:27:31 +02:00
- **Step 4:** Activate the new python environment
2022-09-22 14:06:56 +02:00
```bash
source ./venv/bin/activate
```
2023-10-21 21:27:31 +02:00
- **Step 5:** Install python dependencies
2022-09-22 14:06:56 +02:00
```bash
pip install -r requirements.txt
```
2023-10-21 21:27:31 +02:00
- **Step 6:** Copy environment config file and change it to your liking
2022-09-22 14:06:56 +02:00
```bash
cp env-sample archivist/.env
```
- **Step 7:** Change directory to archivist
```bash
cd archivist
```
- **Step 8:** Run django database migrations
```bash
python manage.py migrate
```
- **Step 9:** Start the redis server
```bash
redis-server
```
2023-10-21 22:24:33 +02:00
- **Step :10** Open another shell inside of `archivist/` folder and start the django server
```bash
python3 manage.py runserver
```
- **Step :11** Open another shell inside of `archivist/` folder and start the celery worker
```bash
celery -A core worker -l info
2022-09-22 14:06:56 +02:00
```
2023-10-21 22:24:33 +02:00
- **Step :12** Open another shell inside of `archivist/` folder and start the celery beat
2023-10-21 21:27:31 +02:00
2022-09-22 14:06:56 +02:00
```bash
celery -A core beat -l info
2023-10-21 21:27:31 +02:00
```