Skip to content

Commit 64d7c0d

Browse files
committed
Merged readthedocs branch
1 parent ce25cb4 commit 64d7c0d

File tree

13 files changed

+431
-3
lines changed

13 files changed

+431
-3
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1+
<!-- start intro -->
12
<p align="center">
23
<h1 align="center">Beets Flask</h1>
34
</p>
45

5-
![version number](https://img.shields.io/github/package-json/v/pspitzner/beets-flask/main?filename=frontend%2Fpackage.json&label=version&color=blue)
6+
[![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)
67
[![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)
78
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?label=license)](https://opensource.org/licenses/MIT)
89

910
<p align="center">
1011
<em><b>Opinionated web-interface around the music organizer <a href="https://beets.io/">beets</a></b></em>
1112
</p>
1213

14+
<!-- end intro -->
15+
1316
## Features
1417

18+
<!-- start features -->
19+
1520
- Autogenerate previews before importing
1621
- Import via GUI
1722
- Web-Terminal
1823
- Undo imports
1924
- Monitor multiple inboxes
2025
- Library view and search
2126

27+
<!-- end features -->
2228

2329
https://github.com/user-attachments/assets/dd526b9d-9351-4f7c-9034-1071e4ff66e6
2430

@@ -155,4 +161,4 @@ Currently planned:
155161

156162
# Developer Guide & Contribution
157163

158-
Please see [CONTRIBUTE.md](./CONTRIBUTE.md) for more information on how to contribute.
164+
Please see [CONTRIBUTE.md](.docs/contribution.md) for more information on how to contribute.

backend/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ test = ["pytest>=8.2.2", "pytest-asyncio>=0.23.8", "pytest-cov>=5.0.0"]
3939
dev = ["ruff>=0.6.5", "pre-commit>=3.8.0", "interactive_beets[typed]"]
4040
typed = ["types-cachetools", "types-requests", "mypy>=1.14.1", "types-cachetools","types-Flask-Cors"]
4141
all = ["interactive_beets[dev,test]"]
42+
docs = [
43+
"sphinx>=8.0.2",
44+
"furo>=2024.8.6",
45+
"sphinx-copybutton>=0.5.2",
46+
"sphinx-inline-tabs>=2023.4.21",
47+
"sphinxcontrib-typer[html]>=0.5.0",
48+
"myst-parser>=4.0.0",
49+
"myst-nb>=1.1.2",
50+
]
4251

4352
[build-system]
4453
requires = ["hatchling"]

docs/.readthedocs.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the OS, Python version and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.11"
13+
# You can also specify other tool versions:
14+
# nodejs: "19"
15+
# rust: "1.64"
16+
# golang: "1.19"
17+
18+
# Build documentation in the "docs/" directory with Sphinx
19+
sphinx:
20+
configuration: ./docs/conf.py
21+
# Optionally build your docs in additional formats such as PDF and ePub
22+
# formats:
23+
# - pdf
24+
# - epub
25+
26+
# Optional but recommended, declare the Python requirements required
27+
# to build your documentation
28+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
29+
python:
30+
install:
31+
- method: pip
32+
path: ./backend
33+
extra_requirements:
34+
- docs

docs/Makefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
22+
23+
clean:
24+
rm -rf $(BUILDDIR)/*
25+
rm -rf $(SOURCEDIR)/_autosummary/*

docs/_static/custom.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.table-wrapper table {
2+
width: 100%;
3+
}

docs/_templates/base.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. auto{{ objtype }}:: {{ objname }}

docs/_templates/class.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. autoclass:: {{ objname }}
6+
:members:
7+
:inherited-members:
8+
:special-members: __init__
9+
10+
{% block attributes %}
11+
{% if attributes %}
12+
.. rubric:: {{ _('Attributes') }}
13+
14+
.. autosummary::
15+
{% for item in attributes %}
16+
~{{ name }}.{{ item }}
17+
{%- endfor %}
18+
{% endif %}
19+
{% endblock %}
20+
21+
22+
{% block methods %}
23+
24+
{% if methods %}
25+
.. rubric:: {{ _('Methods') }}
26+
27+
.. autosummary::
28+
{% for item in methods %}
29+
~{{ name }}.{{ item }}
30+
{%- endfor %}
31+
{% endif %}
32+
{% endblock %}
33+
34+

docs/_templates/module.rst

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. automodule:: {{ fullname }}
4+
{% block attributes %}
5+
{%- if attributes %}
6+
.. rubric:: {{ _('Module Attributes') }}
7+
8+
.. autosummary::
9+
{% for item in attributes %}
10+
{{ item }}
11+
{%- endfor %}
12+
{% endif %}
13+
{%- endblock %}
14+
15+
{%- block functions %}
16+
{%- if functions %}
17+
.. rubric:: {{ _('Functions') }}
18+
19+
.. autosummary::
20+
{% for item in functions %}
21+
{{ item }}
22+
{%- endfor %}
23+
24+
{% endif %}
25+
{%- endblock %}
26+
27+
{%- block classes %}
28+
{%- if classes %}
29+
.. rubric:: {{ _('Classes') }}
30+
31+
.. autosummary::
32+
:toctree:
33+
:template: class.rst
34+
{% for item in classes %}
35+
{{ item }}
36+
{%- endfor %}
37+
{% endif %}
38+
{%- endblock %}
39+
40+
{%- block exceptions %}
41+
{%- if exceptions %}
42+
.. rubric:: {{ _('Exceptions') }}
43+
44+
.. autosummary::
45+
{% for item in exceptions %}
46+
{{ item }}
47+
{%- endfor %}
48+
{% endif %}
49+
{%- endblock %}
50+
51+
52+
{%- block modules %}
53+
{%- if modules %}
54+
.. rubric:: Modules
55+
56+
.. autosummary::
57+
:toctree:
58+
:template: module.rst
59+
:recursive:
60+
{% for item in modules %}
61+
{{ item }}
62+
{%- endfor %}
63+
{% endif %}
64+
{%- endblock %}
65+
66+
67+
{%- if attributes %}
68+
.. rubric:: {{ _('Module Attributes') }}
69+
{% for item in attributes %}
70+
.. autodata:: {{ item }}
71+
{%- endfor %}
72+
{% endif %}
73+
74+
{%- if functions %}
75+
.. rubric:: {{ _('Module Functions') }}
76+
{% for item in functions %}
77+
.. autofunction:: {{ item }}
78+
{%- endfor %}
79+
{% endif %}
80+
81+
{%- if exceptions %}
82+
.. rubric:: {{ _('Module Exceptions') }}
83+
{% for item in exceptions %}
84+
.. autoexception:: {{ item }}
85+
{%- endfor %}
86+
{% endif %}

docs/_templates/page.html

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{% extends "furo/page.html" %}
2+
3+
4+
5+
{% block footer %}
6+
<div class="related-pages">
7+
{% if next -%}
8+
<a class="next-page" href="{{ next.link }}">
9+
<div class="page-info">
10+
<div class="context">
11+
<span>{{ _("Next") }}</span>
12+
</div>
13+
<div class="title">{{ next.title }}</div>
14+
</div>
15+
<svg class="furo-related-icon">
16+
<use href="#svg-arrow-right"></use>
17+
</svg>
18+
</a>
19+
{%- endif %}
20+
{% if prev -%}
21+
<a class="prev-page" href="{{ prev.link }}">
22+
<svg class="furo-related-icon">
23+
<use href="#svg-arrow-right"></use>
24+
</svg>
25+
<div class="page-info">
26+
<div class="context">
27+
<span>{{ _("Previous") }}</span>
28+
</div>
29+
{% if prev.link == pathto(master_doc) %}
30+
<div class="title">{{ _("Home") }}</div>
31+
{% else %}
32+
<div class="title">{{ prev.title }}</div>
33+
{% endif %}
34+
</div>
35+
</a>
36+
{%- endif %}
37+
</div>
38+
<div class="bottom-of-page">
39+
<div class="left-details">
40+
{%- if show_copyright %}
41+
<div class="copyright">
42+
{%- if hasdoc('copyright') %}
43+
{% trans path=pathto('copyright'), copyright=copyright|e -%}
44+
<a href="{{ path }}">Copyright</a> &#169; {{ copyright }}
45+
{%- endtrans %}
46+
{%- else %}
47+
{% trans copyright=copyright|e -%}
48+
Copyright &#169; {{ copyright }}
49+
{%- endtrans %}
50+
{%- endif %}
51+
</div>
52+
{%- endif %}
53+
{%- if last_updated -%}
54+
<div class="last-updated">
55+
{% trans last_updated=last_updated|e -%}
56+
Last updated on {{ last_updated }}
57+
{%- endtrans -%}
58+
</div>
59+
{%- endif %}
60+
</div>
61+
<div class="right-details">
62+
{% if theme_footer_icons or READTHEDOCS -%}
63+
<div class="icons">
64+
{% if theme_footer_icons -%}
65+
{% for icon_dict in theme_footer_icons -%}
66+
<a class="muted-link {{ icon_dict.class }}" href="{{ icon_dict.url }}" aria-label="{{ icon_dict.name }}">
67+
{{- icon_dict.html -}}
68+
</a>
69+
{% endfor %}
70+
{%- else -%}
71+
{#- Show Read the Docs project -#}
72+
{%- if READTHEDOCS and slug -%}
73+
<a class="muted-link" href="https://readthedocs.org/projects/{{ slug }}" aria-label="On Read the Docs">
74+
<svg x="0px" y="0px" viewBox="-125 217 360 360" xml:space="preserve">
75+
<path fill="currentColor"
76+
d="M39.2,391.3c-4.2,0.6-7.1,4.4-6.5,8.5c0.4,3,2.6,5.5,5.5,6.3 c0,0,18.5,6.1,50,8.7c25.3,2.1,54-1.8,54-1.8c4.2-0.1,7.5-3.6,7.4-7.8c-0.1-4.2-3.6-7.5-7.8-7.4c-0.5,0-1,0.1-1.5,0.2 c0,0-28.1,3.5-50.9,1.6c-30.1-2.4-46.5-7.9-46.5-7.9C41.7,391.3,40.4,391.1,39.2,391.3z M39.2,353.6c-4.2,0.6-7.1,4.4-6.5,8.5 c0.4,3,2.6,5.5,5.5,6.3c0,0,18.5,6.1,50,8.7c25.3,2.1,54-1.8,54-1.8c4.2-0.1,7.5-3.6,7.4-7.8c-0.1-4.2-3.6-7.5-7.8-7.4 c-0.5,0-1,0.1-1.5,0.2c0,0-28.1,3.5-50.9,1.6c-30.1-2.4-46.5-7.9-46.5-7.9C41.7,353.6,40.4,353.4,39.2,353.6z M39.2,315.9 c-4.2,0.6-7.1,4.4-6.5,8.5c0.4,3,2.6,5.5,5.5,6.3c0,0,18.5,6.1,50,8.7c25.3,2.1,54-1.8,54-1.8c4.2-0.1,7.5-3.6,7.4-7.8 c-0.1-4.2-3.6-7.5-7.8-7.4c-0.5,0-1,0.1-1.5,0.2c0,0-28.1,3.5-50.9,1.6c-30.1-2.4-46.5-7.9-46.5-7.9 C41.7,315.9,40.4,315.8,39.2,315.9z M39.2,278.3c-4.2,0.6-7.1,4.4-6.5,8.5c0.4,3,2.6,5.5,5.5,6.3c0,0,18.5,6.1,50,8.7 c25.3,2.1,54-1.8,54-1.8c4.2-0.1,7.5-3.6,7.4-7.8c-0.1-4.2-3.6-7.5-7.8-7.4c-0.5,0-1,0.1-1.5,0.2c0,0-28.1,3.5-50.9,1.6 c-30.1-2.4-46.5-7.9-46.5-7.9C41.7,278.2,40.4,278.1,39.2,278.3z M-13.6,238.5c-39.6,0.3-54.3,12.5-54.3,12.5v295.7 c0,0,14.4-12.4,60.8-10.5s55.9,18.2,112.9,19.3s71.3-8.8,71.3-8.8l0.8-301.4c0,0-25.6,7.3-75.6,7.7c-49.9,0.4-61.9-12.7-107.7-14.2 C-8.2,238.6-10.9,238.5-13.6,238.5z M19.5,257.8c0,0,24,7.9,68.3,10.1c37.5,1.9,75-3.7,75-3.7v267.9c0,0-19,10-66.5,6.6 C59.5,536.1,19,522.1,19,522.1L19.5,257.8z M-3.6,264.8c4.2,0,7.7,3.4,7.7,7.7c0,4.2-3.4,7.7-7.7,7.7c0,0-12.4,0.1-20,0.8 c-12.7,1.3-21.4,5.9-21.4,5.9c-3.7,2-8.4,0.5-10.3-3.2c-2-3.7-0.5-8.4,3.2-10.3c0,0,0,0,0,0c0,0,11.3-6,27-7.5 C-16,264.9-3.6,264.8-3.6,264.8z M-11,302.6c4.2-0.1,7.4,0,7.4,0c4.2,0.5,7.2,4.3,6.7,8.5c-0.4,3.5-3.2,6.3-6.7,6.7 c0,0-12.4,0.1-20,0.8c-12.7,1.3-21.4,5.9-21.4,5.9c-3.7,2-8.4,0.5-10.3-3.2c-2-3.7-0.5-8.4,3.2-10.3c0,0,11.3-6,27-7.5 C-20.5,302.9-15.2,302.7-11,302.6z M-3.6,340.2c4.2,0,7.7,3.4,7.7,7.7s-3.4,7.7-7.7,7.7c0,0-12.4-0.1-20,0.7 c-12.7,1.3-21.4,5.9-21.4,5.9c-3.7,2-8.4,0.5-10.3-3.2c-2-3.7-0.5-8.4,3.2-10.3c0,0,11.3-6,27-7.5C-16,340.1-3.6,340.2-3.6,340.2z" />
77+
</svg>
78+
</a>
79+
{%- endif -%}
80+
{#- Show GitHub repository home -#}
81+
{%- if READTHEDOCS and display_github and github_user != "None" and github_repo != "None" -%}
82+
<a class="muted-link" href="https://github.com/{{ github_user }}/{{ github_repo }}" aria-label="On GitHub">
83+
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
84+
<path fill-rule="evenodd"
85+
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z">
86+
</path>
87+
</svg>
88+
</a>
89+
{%- endif -%}
90+
{%- endif %}
91+
</div>
92+
{%- endif %}
93+
</div>
94+
</div>
95+
{% endblock footer %}

0 commit comments

Comments
 (0)