api/README.md

48 lines
2.4 KiB
Markdown
Executable File

# Almond API
**TODO:** Complete this README.
Almond is a suite of tools that let you archive videos into a database, originally written in Python several years ago with a friend, it now has revamped code and support for many more features.
Almond v2 now uses an API instead of being merged as frontend routes in a web app.
This allows developers to create custom clients for it.
## Getting started
You can get a binary build in the [Releases](https://git.roaming97.com/Almond/api/releases) page, just download it and run it either in your server or locally.
However, if no release build is compatible with your system, you can build one yourself by following the [Building](#building) guide.
To learn how to use the Almond API, you can read the documentation [here](todo) (TODO: Generate OpenAPI docs).
## Requirements
> [!IMPORTANT]
> To run the Almond API, you **must** have these installed on your system:
- **[yt-dlp](https://github.com/yt-dlp/yt-dlp/)** - for downloading YouTube videos, does most of the heavy lifting. Install options are listed [there too](https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#installation).
- **[yt-dlp-returnyoutubedislike](https://github.com/pukkandan/yt-dlp-returnyoutubedislike)** - for adding ReturnYouTubeDislike information to a video's information JSON instead of adding an additional request to the API.
- **[ffmpeg](https://ffmpeg.org/)** - for video processing in some cases.
### Nice to have
- **An HTTP client like wget, curl, or [HTTPie](https://httpie.io/)** - to request the API without needing an existing front-end, ideal for using the API as a local archiver.
- **[DB Browser for SQLite](https://sqlitebrowser.org/)** - to view the contents of your tables inside the Almond database.
> [!WARNING]
> The database currently runs on SQLite, but it may change in the future so the requirements might be different.
## Building
Since this project is written in Rust, you will need [Rust](https://rust-lang.org/) installed on your system. The site has an [installation](https://www.rust-lang.org/tools/install) page that includes instructions for macOS, Linux, Windows, and more.
If you have Git installed on your system and are comfortable using a terminal, you can clone the repository with the following command:
```bash
$ git clone https://git.roaming97.com/Almond/api.git
```
If not, you can download a file by clicking on the "Code" button at the top and extract the source code.
TODO: Finish build guide