Skip to content

Commit 0bffa5c

Browse files
pSpitznersemohr
andauthored
A bit of updates to documentation and readme. Let's merge this last. (#71)
* A bit of updates to documentation and readme. Let's merge this last. * Update README.md * Added timezone to dockerfile and use import in getting started docs to dedupe docker content. * Added lucide icons to docs. Sneaker icon is a bit is just inlined as lucide lab does not has a cdn source afaics. * Update README.md with new demo vid * Updated logo, but kept the beet only one for favicon (the flask one is too crowded at this size) * some small fixes. * added link to relevant macos section * Bumped changelog v1 with date --------- Co-authored-by: Sebastian Mohr <sebastian@mohrenclan.de>
1 parent 2161107 commit 0bffa5c

File tree

21 files changed

+268
-59
lines changed

21 files changed

+268
-59
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [1.0.0] - upcoming
8+
## [1.0.0] - 25-07-06
99

1010
This is a breaking change, you will need to update your configs and delete your beets-flask
1111
database (**not** the beets db!).
1212

13+
This marks a major milestone for beets-flask, as we now pretty happy with the current features
14+
and the overall architecture.
15+
1316
### Changed
1417

1518
- Migrated backend to quart (the async version of flask)
@@ -23,8 +26,11 @@ database (**not** the beets db!).
2326
- Terminal now has a bit of scroll-back and history.
2427
- Much better test coverage.
2528
- Now using [py2ts](https://github.com/semohr/py2ts) to automatically generate frontend (typescript) types from their backend (python) equivalents.
29+
- New and improved logo.
30+
31+
## [0.1.1] - 25-06-08
2632

27-
## [0.1.1] - unreleased
33+
Small version bump with fixes before jumping to 1.0.0.
2834

2935
### Added
3036

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<!-- start intro -->
22
<p align="center">
3-
<h1 align="center">Beets Quart</h1>
3+
<h1 align="center">Beets-flask</h1>
44
</p>
55

66
[![version number](https://img.shields.io/github/package-json/v/pspitzner/beets-flask/main?filename=frontend%2Fpackage.json&label=version&color=blue)](https://github.com/pSpitzner/beets-flask/blob/main/CHANGELOG.md)
7-
[![docker-hub status](https://img.shields.io/github/actions/workflow/status/pSpitzner/beets-flask/docker_hub.yml?label=docker%20build)](https://github.com/pSpitzner/beets-flask/pkgs/container/beets-flask)
7+
[![Docker Pulls](https://img.shields.io/docker/pulls/pspitzner/beets-flask)](https://hub.docker.com/r/pspitzner/beets-flask/tags)
88
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?label=license)](https://opensource.org/licenses/MIT)
9+
[![docker-hub build status](https://img.shields.io/github/actions/workflow/status/pSpitzner/beets-flask/docker_hub.yml?label=docker%20build)](https://github.com/pSpitzner/beets-flask/pkgs/container/beets-flask)
910
[![Documentation Status](https://readthedocs.org/projects/beets-flask/badge/?version=latest)](https://beets-flask.readthedocs.io/en/latest/?badge=latest)
1011

1112
<p align="center">
@@ -19,16 +20,16 @@
1920
<!-- start features -->
2021

2122
- Autogenerate previews before importing
23+
- Auto-Import good matches
2224
- Import via GUI
23-
- Web-Terminal
2425
- Undo imports
26+
- Web-Terminal
2527
- Monitor multiple inboxes
2628
- Library view and search
2729

2830
<!-- end features -->
2931

30-
https://github.com/user-attachments/assets/dd526b9d-9351-4f7c-9034-1071e4ff66e6
31-
32+
https://github.com/user-attachments/assets/b7c7ae32-36ac-4950-b2ed-186b80d7075b
3233

3334
## Motivation
3435

@@ -38,7 +39,7 @@ Autotagging music with beets is great. Beets identifies metadata correctly _most
3839

3940
However, if you do want a bit more control, things could be more convenient.
4041

41-
This is the main idea with beets-flask: For all folders in your inbox, we generate a preview of what beets _would do_ and show you those previews. Then it's easy to go through them and import the correct ones, while falling back to terminal for those that were not to your liking.
42+
This is the main idea with beets-flask: For all folders in your inbox, we generate a preview of what beets _would do_ and show you those previews. Then it's easy to go through them and import the correct ones, or pick other candidates for those that were not to your liking.
4243

4344
<!-- end motivation -->
4445

@@ -50,8 +51,11 @@ We provide a docker image with the full beeets-flask setup. You can run it with
5051

5152
**Using docker**
5253

54+
<!-- start setup container -->
55+
5356
```sh
5457
docker run -d -p 5001:5001 \
58+
-e TZ=Europe/Berlin \
5559
-e USER_ID=1000 \
5660
-e GROUP_ID=1000 \
5761
-v /wherever/config/:/config \
@@ -61,6 +65,8 @@ docker run -d -p 5001:5001 \
6165
pspitzner/beets-flask:stable
6266
```
6367

68+
<!-- end setup container -->
69+
6470
**Using docker compose**
6571

6672
```yaml
@@ -72,6 +78,7 @@ services:
7278
- "5001:5001"
7379
environment:
7480
# 502 is default on macos, 1000 on linux
81+
TZ: Europe/Berlin
7582
USER_ID: 1000
7683
GROUP_ID: 1000
7784
volumes:

backend/beets_flask/server/routes/frontend.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,19 @@ async def reverse_proxy(path):
1414
# not include assets
1515
if (
1616
not "assets" in path
17-
and not "logo.png" in path
17+
and not "logo_beets.png" in path
18+
and not "logo_flask.png" in path
1819
and not path.startswith("favicon.ico")
1920
):
2021
path = "index.html"
2122

2223
# Remove everything infront of assets
2324
if "assets" in path:
2425
path = path[path.index("assets") :]
25-
if "logo.png" in path:
26-
path = path[path.index("logo.png") :]
26+
if "logo_beets.png" in path:
27+
path = path[path.index("logo_beets.png") :]
28+
if "logo_flask.png" in path:
29+
path = path[path.index("logo_flask.png") :]
2730

2831
r = await send_from_directory(current_app.config["FRONTEND_DIST_DIR"], path)
2932
return r

demo.mp4

-791 KB
Binary file not shown.

docker/docker-compose.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ services:
55
ports:
66
- "5001:5001"
77
environment:
8+
# Change to your timezone
9+
TZ: "Europe/Berlin"
810
# 502 is default on macos, 1000 on linux
911
USER_ID: 1000
1012
GROUP_ID: 1000

docs/_static/custom.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
.table-wrapper table {
22
width: 100%;
33
}
4+
5+
.icon {
6+
vertical-align: middle;
7+
}

docs/_templates/base.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{% extends "furo/base.html" %}
2+
3+
{%- block scripts %}
4+
5+
<script src="https://unpkg.com/lucide@latest"></script>
6+
<script>
7+
lucide.createIcons({
8+
attrs: {
9+
class: ['icon'],
10+
11+
},
12+
nameAttr: 'data-lucide'
13+
});
14+
</script>
15+
16+
{% endblock %}

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@
7777
html_css_files = [
7878
"custom.css",
7979
]
80-
html_logo = "../frontend/public/logo.png"
80+
html_logo = "../frontend/public/logo_flask.png"

docs/develop/contribution.md

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,41 @@ We are always happy to see new contributors! If small or large, every contributi
66

77
Some technical knowledge for the following tools is required to get started with the project. If you are not familiar with them, please check out the documentation for each tool and make sure you have them installed.
88

9-
- [Docker](https://docs.docker.com/get-started/)
10-
- [Docker Compose](https://docs.docker.com/compose/)
11-
- [Python](https://www.python.org/downloads/) 3.10 or higher
12-
- [Node.js](https://nodejs.org/en/download/) 18 or higher
13-
- [git](https://git-scm.com/downloads)
14-
- [pnpm](https://pnpm.io/installation) (or any other package manager)
9+
- [Docker](https://docs.docker.com/get-started/)
10+
- [Docker Compose](https://docs.docker.com/compose/)
11+
- [Python](https://www.python.org/downloads/) 3.10 or higher
12+
- [Node.js](https://nodejs.org/en/download/) 18 or higher
13+
- [git](https://git-scm.com/downloads)
14+
- [pnpm](https://pnpm.io/installation) (or any other package manager)
1515

1616
## Setting Up the Development Environment
1717

1818
1. **Clone the repository:**
19+
1920
```bash
2021
git clone https://github.com/pSpitzner/beets-flask
2122
cd beets-flask
2223
```
2324

2425
2.1 **Install the dependencies (backend):**
2526
We recommend using a virtual environment to manage the dependencies.
27+
2628
```bash
2729
cd backend
2830
pip install -e .[dev]
2931
```
3032

3133
2.2 **Install the dependencies (frontend):**
32-
We use (pnpm)[https://pnpm.io/] to manage the frontend dependencies. You may use any other package manager.
34+
We use [pnpm](https://pnpm.io/) to manage the frontend dependencies. You may use any other package manager. On macOS you might want to run this command inside the container ([see here](resources/macos)).
35+
3336
```bash
3437
cd frontend
3538
pnpm install --frozen-lockfile
3639
```
3740

3841
3. **Run the application in dev mode:**
39-
Check the docker compose file and edit if necessary.
42+
Check the docker compose file and edit if necessary.
43+
4044
```bash
4145
cd ../
4246
# We recommend to create a copy of the docker compose file
@@ -46,6 +50,7 @@ docker compose -f ./docker/docker-compose.dev-local.yaml up --build
4650
```
4751

4852
## Install pre-commit hooks
53+
4954
We automatically check for code style and formatting issues using pre-commit hooks. To install the hooks, run the following command (optional):
5055

5156
```bash
@@ -78,3 +83,48 @@ pnpm check-types
7883
## Submitting a Pull Request
7984

8085
Fork the repository and create a new branch for your changes. Feel free to follow [this guide](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) for more information on how to create a pull request. Once you are done we will review your changes as soon as possible. Please be patient, as we are a small team and may not be able to review your changes immediately.
86+
87+
## Example docker compose
88+
89+
```bash
90+
git clone https://github.com/pSpitzner/beets-flask.git ./beets_flask_dev
91+
cd ./beets_flask_dev
92+
mkdir local
93+
```
94+
95+
Tweak `docker/docker-compose.dev.yaml` to your needs. Important is to live mount your repo folder:
96+
97+
```yaml
98+
services:
99+
beets-flask:
100+
container_name: beets-flask
101+
hostname: beets-container
102+
build:
103+
context: ..
104+
dockerfile: docker/Dockerfile
105+
target: dev
106+
image: beets-flask
107+
restart: unless-stopped
108+
ports:
109+
- "5001:5001"
110+
- "5173:5173"
111+
environment:
112+
USER_ID: 1000
113+
GROUP_ID: 1000
114+
LOG_LEVEL_BEETSFLASK: DEBUG
115+
LOG_LEVEL_OTHERS: WARNING
116+
volumes:
117+
- ../local/music/:/music/
118+
- ../local/config/:/config
119+
- ../:/repo/
120+
```
121+
122+
After first launch you will need to install the frontend packages:
123+
124+
```bash
125+
docker exec -it -u beetle beets-flask-dev bash
126+
cd /repo/frontend
127+
pnpm i
128+
```
129+
130+
Check the viteserver at `localhost:5173`

docs/develop/resources/docker.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# Docker
22

3-
We use docker for containerization and deployment of our application. You can find the files needed to build the docker images in the `docker` folder.
3+
We use docker for containerization and deployment of our application. You can find the files needed to build the docker images in the [`docker`](https://github.com/pSpitzner/beets-flask/tree/main/docker) folder.
44

55
Redis-Caching seems to be very persistent and we have not figured out how to completely reset it without _rebuilding_ the container.
66
Thus, currently, after code changes that run inside a redis worker `docker-compose up --build` is needed even when live-mounting the repo.
77

8-
98
## Entrypoints
109

11-
We use different entrypoints for the different environments. You can find all scripts in the `docker/entrypoints` folder.
10+
We use different entrypoints for the different environments. You can find all scripts in the [`docker/entrypoints`](https://github.com/pSpitzner/beets-flask/tree/main/docker/entrypoints) folder.

0 commit comments

Comments
 (0)