uEdition 0.7.0__tar.gz → 0.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of uEdition might be problematic. Click here for more details.
- {uedition-0.7.0 → uedition-0.8.0}/.github/workflows/codestyle.yml +1 -1
- {uedition-0.7.0 → uedition-0.8.0}/.github/workflows/coverage.yml +3 -3
- uedition-0.8.0/.github/workflows/release.yml +37 -0
- {uedition-0.7.0 → uedition-0.8.0}/.github/workflows/tests.yml +2 -2
- uedition-0.8.0/.readthedocs.yml +16 -0
- uedition-0.8.0/.vscode/settings.json +3 -0
- {uedition-0.7.0 → uedition-0.8.0}/PKG-INFO +5 -4
- uedition-0.8.0/docs/.gitignore +5 -0
- uedition-0.8.0/docs/.uEdition.answers +9 -0
- uedition-0.8.0/docs/de/.uEdition.answers +5 -0
- uedition-0.8.0/docs/de/index.md +55 -0
- uedition-0.8.0/docs/de/user/configuration.md +29 -0
- uedition-0.8.0/docs/de/user/content.md +55 -0
- uedition-0.8.0/docs/de/user/create.md +13 -0
- uedition-0.8.0/docs/de/user/index.md +7 -0
- uedition-0.8.0/docs/de/user/installation.md +37 -0
- uedition-0.8.0/docs/de/user/language-add.md +14 -0
- uedition-0.8.0/docs/de/user/language-update.md +12 -0
- uedition-0.8.0/docs/de/user/publish.md +33 -0
- uedition-0.8.0/docs/de/user/update.md +13 -0
- uedition-0.8.0/docs/en/.uEdition.answers +5 -0
- uedition-0.8.0/docs/en/index.md +55 -0
- uedition-0.8.0/docs/en/user/configuration.md +29 -0
- uedition-0.8.0/docs/en/user/content.md +55 -0
- uedition-0.8.0/docs/en/user/create.md +13 -0
- uedition-0.8.0/docs/en/user/index.md +7 -0
- uedition-0.8.0/docs/en/user/installation.md +37 -0
- uedition-0.8.0/docs/en/user/language-add.md +14 -0
- uedition-0.8.0/docs/en/user/language-update.md +12 -0
- uedition-0.8.0/docs/en/user/publish.md +33 -0
- uedition-0.8.0/docs/en/user/update.md +13 -0
- uedition-0.8.0/docs/pyproject.toml +34 -0
- uedition-0.8.0/docs/toc.yml +13 -0
- uedition-0.8.0/docs/uEdition.yml +18 -0
- {uedition-0.7.0 → uedition-0.8.0}/pyproject.toml +12 -20
- uedition-0.8.0/tests/conftest.py +156 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/basic/uEdition.yml +1 -1
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/invalid_core_files/uEdition.yaml +1 -1
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/missing_core_files/uEdition.yaml +1 -1
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/missing_files/uEdition.yaml +1 -1
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/missing_toc_root/uEdition.yaml +1 -1
- uedition-0.8.0/tests/fixtures/missing_toc_root_file/uEdition.yaml +9 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/uEdition.yaml +1 -1
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/yaml/uEdition.yaml +1 -1
- {uedition-0.7.0 → uedition-0.8.0}/uedition/__about__.py +1 -1
- {uedition-0.7.0 → uedition-0.8.0}/uedition/cli/__init__.py +2 -2
- uedition-0.8.0/uedition/settings.py +152 -0
- uedition-0.7.0/.github/workflows/release.yml +0 -37
- uedition-0.7.0/tests/conftest.py +0 -136
- uedition-0.7.0/tests/fixtures/missing_toc_root_file/uEdition.yaml +0 -9
- uedition-0.7.0/uedition/settings.py +0 -104
- {uedition-0.7.0 → uedition-0.8.0}/.github/dependabot.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/.gitignore +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/.pre-commit-config.yaml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/LICENSE.txt +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/README.md +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/__init__.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/empty/.gitkeep +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/invalid_core_files/en/_config.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/invalid_core_files/en/_toc.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/missing_files/.gitignore +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/missing_files/en/_config.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/missing_files/en/_toc.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/missing_files/en/intro.md +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/missing_files/references.bib +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/missing_toc_root/en/_config.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/missing_toc_root/en/_toc.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/missing_toc_root_file/en/_config.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/missing_toc_root_file/en/_toc.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/.gitignore +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/de/_config.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/de/_toc.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/de/a-1-page.md +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/de/a-2-page.md +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/de/a-page.md +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/de/b-page.md +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/de/intro.md +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/en/_config.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/en/_toc.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/en/a-1-page.md +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/en/a-2-page.md +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/en/a-page.md +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/en/b-page.md +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/en/intro.md +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/references.bib +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/fixtures/multilang/toc.yml +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/test_about.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/test_build.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/test_check.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tests/test_settings.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/tox.ini +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/__init__.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/__main__.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/cli/build.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/cli/check.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/cli/create.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/cli/language.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/cli/serve.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/cli/update.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/ext/__init__.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/ext/config.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/ext/language_switcher.css +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/ext/language_switcher.js +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/ext/language_switcher.py +0 -0
- {uedition-0.7.0 → uedition-0.8.0}/uedition/ext/tei.py +0 -0
|
@@ -9,9 +9,9 @@ jobs:
|
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
|
|
11
11
|
steps:
|
|
12
|
-
- uses: actions/checkout@
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
13
|
|
|
14
|
-
- uses: actions/setup-python@
|
|
14
|
+
- uses: actions/setup-python@v5
|
|
15
15
|
with:
|
|
16
16
|
python-version: |
|
|
17
17
|
3.10
|
|
@@ -40,7 +40,7 @@ jobs:
|
|
|
40
40
|
echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY
|
|
41
41
|
|
|
42
42
|
- name: "Make badge"
|
|
43
|
-
uses: schneegans/dynamic-badges-action@v1.
|
|
43
|
+
uses: schneegans/dynamic-badges-action@v1.7.0
|
|
44
44
|
with:
|
|
45
45
|
auth: ${{ secrets.GIST_TOKEN }}
|
|
46
46
|
gistID: 13b76c3c8e59fa624d03918fafde3f2d
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pypi:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
environment:
|
|
13
|
+
name: pypi
|
|
14
|
+
url: https://pypi.org/project/uedition
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: |
|
|
25
|
+
3.11
|
|
26
|
+
|
|
27
|
+
- name: Install Base Dependencies
|
|
28
|
+
run: |
|
|
29
|
+
sudo apt-get install python3-venv
|
|
30
|
+
sudo pip install hatch
|
|
31
|
+
|
|
32
|
+
- name: Build the package
|
|
33
|
+
run: |
|
|
34
|
+
hatch build
|
|
35
|
+
|
|
36
|
+
- name: Publish package distributions to PyPI
|
|
37
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
build:
|
|
4
|
+
os: ubuntu-22.04
|
|
5
|
+
tools:
|
|
6
|
+
python: "3.11"
|
|
7
|
+
commands:
|
|
8
|
+
- "pip install hatch"
|
|
9
|
+
- "cd docs && hatch run build"
|
|
10
|
+
- "mkdir $READTHEDOCS_OUTPUT"
|
|
11
|
+
- "mv docs/site $READTHEDOCS_OUTPUT/html"
|
|
12
|
+
|
|
13
|
+
python:
|
|
14
|
+
install:
|
|
15
|
+
- method: pip
|
|
16
|
+
path: .
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: uEdition
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Project-URL: Documentation, https://github.com/unknown/uedition#readme
|
|
5
5
|
Project-URL: Issues, https://github.com/unknown/uedition/issues
|
|
6
6
|
Project-URL: Source, https://github.com/unknown/uedition
|
|
@@ -14,11 +14,12 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
14
14
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
15
15
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
|
-
Requires-Dist: copier<
|
|
17
|
+
Requires-Dist: copier<10.0.0,>=9.0.0
|
|
18
18
|
Requires-Dist: jupyter-book<1.0.0,>=0.15.1
|
|
19
19
|
Requires-Dist: livereload
|
|
20
|
-
Requires-Dist: lxml<
|
|
21
|
-
Requires-Dist: pydantic
|
|
20
|
+
Requires-Dist: lxml<6.0.0,>=4.9.2
|
|
21
|
+
Requires-Dist: pydantic-settings<3.0.0,>=2.0.0
|
|
22
|
+
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
22
23
|
Requires-Dist: pyyaml<7.0.0,>=6.0.0
|
|
23
24
|
Requires-Dist: typer[all]<1.0.0
|
|
24
25
|
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changes here will be overwritten by Copier
|
|
2
|
+
_commit: v0.0.11-2-gf9997e6
|
|
3
|
+
_src_path: ../uEdition-project-template/
|
|
4
|
+
author_email: mark.hall@work.room3b.eu
|
|
5
|
+
author_name: Mark Hall
|
|
6
|
+
edition_name: μEdition
|
|
7
|
+
publishing: ''
|
|
8
|
+
repository_branch: main
|
|
9
|
+
repository_url: https://github.com/uEdition/uEdition
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# μEdition
|
|
2
|
+
|
|
3
|
+
Das Erstellen einer kritischen, digitalen Edition bringt mit sich eine Reihe signifikanter Hürden, besonders wenn es um
|
|
4
|
+
die technischen Anforderungen und Hostingkosten geht. Die μEdition bietet ein Gerüst um diese Hürden zu reduzieren, indem
|
|
5
|
+
es ein einfaches Werkzeug anbietet, welches Projekte darin unterstützt einfach (multilinguale) digitale Editionen zu
|
|
6
|
+
erstellen, welche dann über gratis oder billige Hostinglösungen online verfügbar gemacht werden können.
|
|
7
|
+
|
|
8
|
+
## Inhaltsverzeichnis
|
|
9
|
+
|
|
10
|
+
:::{tableofcontents}
|
|
11
|
+
:::
|
|
12
|
+
|
|
13
|
+
## Schnellstart
|
|
14
|
+
|
|
15
|
+
Für einen Schnellstart mit der μEdition, folgens sie diesen Schritten (Python 3.10 oder nuer muss bereits installiert sein):
|
|
16
|
+
|
|
17
|
+
:::{code} console
|
|
18
|
+
$ pipx install hatch copier
|
|
19
|
+
$ copier copy https://github.com/uEdition/uEdition-project-template my-edition
|
|
20
|
+
🎤 What is the name of your μEdition?
|
|
21
|
+
My Edition
|
|
22
|
+
🎤 What is the μEdition author's name?
|
|
23
|
+
A.N. Editor
|
|
24
|
+
🎤 What is the μEdition author's address?
|
|
25
|
+
a.n.editor@example.com
|
|
26
|
+
🎤 Do you wish to automatically publish your μEdition?
|
|
27
|
+
(Use arrow keys)
|
|
28
|
+
» Disable automatic publishing
|
|
29
|
+
Via GitHub Pages
|
|
30
|
+
Via Read the Docs
|
|
31
|
+
🎤 What is the URL of the repository containing your μEdition?
|
|
32
|
+
https://github.com/aneditor/my-edition
|
|
33
|
+
🎤 What is the repository branch containing your μEdition?
|
|
34
|
+
main
|
|
35
|
+
|
|
36
|
+
Copying from template version 0.0.10
|
|
37
|
+
create .
|
|
38
|
+
create toc.yml
|
|
39
|
+
create uEdition.yml
|
|
40
|
+
create .uEdition.answers
|
|
41
|
+
create .github
|
|
42
|
+
create .github/workflows
|
|
43
|
+
create .github/workflows/pages.yml
|
|
44
|
+
create .gitignore
|
|
45
|
+
create pyproject.toml
|
|
46
|
+
$ cd my-edition
|
|
47
|
+
$ hatch run uEdition language add cy
|
|
48
|
+
🎤 What is the language code?
|
|
49
|
+
cy
|
|
50
|
+
🎤 What is the name of the language?
|
|
51
|
+
Cymraeg
|
|
52
|
+
$ hatch run serve
|
|
53
|
+
:::
|
|
54
|
+
|
|
55
|
+
Die neue, digitale Edition ist dann unter http://localhost:8000 verfügbar.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Configuring the μEdition
|
|
2
|
+
|
|
3
|
+
The μEdition and Jupyter Book are highly configurable and in the μEdition both are configured via the {file}`uEdition.yml`
|
|
4
|
+
file in the μEdition root. The block below shows the available configuration options that can be used in that file:
|
|
5
|
+
|
|
6
|
+
:::{code-block} yaml
|
|
7
|
+
author: # The author information consisting of:
|
|
8
|
+
name: # The name to display
|
|
9
|
+
email: # The e-mail address to use
|
|
10
|
+
jb_config: # Can contain any valid Jupyter Book configuration settings
|
|
11
|
+
languages: # The languages configured for the μEdition. A list, where each item consists of:
|
|
12
|
+
- code: # The ISO 639-1 two-letter language code
|
|
13
|
+
label: # The label to display for this language
|
|
14
|
+
path: # The path that contains the language-specific Jupyter Book
|
|
15
|
+
output: # The output directory for the complete μEdition
|
|
16
|
+
repository: # The repository that contains this μEdition, configured via:
|
|
17
|
+
url: # The URL to the repository
|
|
18
|
+
branch: # The branch containing the μEdition
|
|
19
|
+
title: # The title of the μEdition in all configured languages. Each configured language code must have a key in this mapping:
|
|
20
|
+
en: # Mapping from ISO 639-1 language code to the human-readable title
|
|
21
|
+
version: '1' # The version of the μEdition configuration, which must be set to "1"
|
|
22
|
+
:::
|
|
23
|
+
|
|
24
|
+
All elements of this file are optional and working defaults will be substituted.
|
|
25
|
+
|
|
26
|
+
All elements of the Jupyter Book can be configured via the `jb_config` settings ([see here for a full list](https://jupyterbook.org/en/stable/customize/config.html)).
|
|
27
|
+
These values will be used as they are for all configured language-specific Jupyter Books. The only exception to this is
|
|
28
|
+
the `title` configuration setting, for which the μEdition will always use the language-specific value configured in the
|
|
29
|
+
{file}`uEdition.yml`.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Writing Content
|
|
2
|
+
|
|
3
|
+
The μEdition uses [Jupyter Book](https://jupyterbook.org) as its underlying technology for turning your text into a
|
|
4
|
+
publishable website. Each language in the μEdition is a separate Jupyter Book and the μEdition provides the glue that
|
|
5
|
+
merges the individual outputs together into a single site. This is achieved by moving the Jupyter Book configuration
|
|
6
|
+
into shared configuration files. When the μEdition builds the final website, language-specific versions of the
|
|
7
|
+
configurations are added to each language-specific Jupyter Book, before the Jupyter Book build process is then run
|
|
8
|
+
for each language. Due to this structure, most of the guidance that the Jupyter Book project provides for writing
|
|
9
|
+
and configuring Jupyter Book projects can be used in the μEdition.
|
|
10
|
+
|
|
11
|
+
## Structuring the μEdition
|
|
12
|
+
|
|
13
|
+
The structure of the μEdition is defined via its table of contents, which is configured in the {file}`toc.yml` file
|
|
14
|
+
in the μEdition root folder. The {file}`toc.yml` file uses the same format as [defined by the Jupyter Book project](https://jupyterbook.org/en/stable/structure/toc.html).
|
|
15
|
+
The only difference is that where the standard Jupyter Book table of contents has a single `title` or `caption`,
|
|
16
|
+
in the μEdition these entries can contain a mapping of language code to text. When generating the language-specific
|
|
17
|
+
table of contents the μEdition ensures that the correct language value is used for the caption or title for that
|
|
18
|
+
language:
|
|
19
|
+
|
|
20
|
+
:::{code-block} yaml
|
|
21
|
+
format: jb-book
|
|
22
|
+
root: index
|
|
23
|
+
parts:
|
|
24
|
+
- caption:
|
|
25
|
+
en: Name of Part 1
|
|
26
|
+
de: Name von Teil 1
|
|
27
|
+
chapters:
|
|
28
|
+
- title:
|
|
29
|
+
en: Chapter 1
|
|
30
|
+
de: Chapter 2
|
|
31
|
+
file: path/to/part1/chapter1
|
|
32
|
+
- file: path/to/part1/chapter2
|
|
33
|
+
:::
|
|
34
|
+
|
|
35
|
+
## Writing text content
|
|
36
|
+
|
|
37
|
+
Jupter Book primarily uses MyST or Markedly Structured Text for writing text content, which is an extension of Markdown
|
|
38
|
+
designed for publishable content. A good overview over the core functionality can be found
|
|
39
|
+
[here](https://myst-parser.readthedocs.io/en/latest/syntax/typography.html). Jupyter Book provides a range of extensions
|
|
40
|
+
built upon the core MySQ structure, which are documented [here](https://jupyterbook.org/en/stable/content/index.html)
|
|
41
|
+
and which include useful things like glossaries, indices, citations, footnotes, plus elements for structuring the layout
|
|
42
|
+
of the page and its content.
|
|
43
|
+
|
|
44
|
+
## Local server
|
|
45
|
+
|
|
46
|
+
While writing it can be helpful to see what the result will look like. To simplify this, the μEdition provides a built-in
|
|
47
|
+
web-server that automatically re-generates the website when you edit the content. To start this server, run the
|
|
48
|
+
following command:
|
|
49
|
+
|
|
50
|
+
:::{code-block} console
|
|
51
|
+
$ hatch run serve
|
|
52
|
+
:::
|
|
53
|
+
|
|
54
|
+
This will build the μEdition and then make it available at http://localhost:8000. When you make changes to the content,
|
|
55
|
+
the μEdition will automatically re-build the website and automatically reload the view in the browser.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Creating a μEdition
|
|
2
|
+
|
|
3
|
+
With all the pre-requisites installed correctly, you are now ready to create your first μEdition. On the commandline
|
|
4
|
+
navigate to the folder where you want to create your μEdition and run:
|
|
5
|
+
|
|
6
|
+
:::{code-block} console
|
|
7
|
+
$ copier copy https://github.com/uEdition/uEdition-project-template my-edition
|
|
8
|
+
:::
|
|
9
|
+
|
|
10
|
+
Replace `my-edition` with the name of the folder you want your edition to be created in. The setup process will ask
|
|
11
|
+
you a few questions about your new μEdition and create a skeleton μEdition in the folder you specified.
|
|
12
|
+
|
|
13
|
+
On the commandline, navigate into that new folder and all further commands are to be run inside that folder.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# User Guide
|
|
2
|
+
|
|
3
|
+
Welcome to the μEdition User Guide, which guides you, the editor, through the process of {doc}`creating a new μEdition <create>`,
|
|
4
|
+
{doc}`adding languages <language-add>` and {doc}`content <content>` to it, and {doc}`publishing it to GitHub Pages <publish>`.
|
|
5
|
+
|
|
6
|
+
The user guide tries to assume as little prior knowledge as possible, but you are expected to be able to navigate the
|
|
7
|
+
command-line. Additionally, for publishing via GitHub Pages, basic Git knowledge is also required.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
The μEdition is built on top of a set of other tools and in order to create our first μEdition, it is necessary to first
|
|
4
|
+
install these dependencies.
|
|
5
|
+
|
|
6
|
+
The μEdition is built in Python and supports version 3.10 and 3.11 [^python-version]. In order to use it, please
|
|
7
|
+
[install an appropriate version of Python for your operating system](https://python.org/downloads).
|
|
8
|
+
|
|
9
|
+
For the initial creation of a new μEdition, the μEdition uses a tool called [Copier](https://copier.readthedocs.io/en/stable/).
|
|
10
|
+
To install all required μEdition dependencies and to run the various μEdition tools, [Hatch](https://hatch.pypa.io)
|
|
11
|
+
is used.
|
|
12
|
+
|
|
13
|
+
The easiest way to install both Copier and Hatch is via [pipx](https://pypa.github.io/pipx/), which you can
|
|
14
|
+
[install from here](https://pypa.github.io/pipx/installation/). When you have pipx installed, then on the commandline
|
|
15
|
+
run the following command to install Copier:
|
|
16
|
+
|
|
17
|
+
:::{code} console
|
|
18
|
+
$ pipx install copier
|
|
19
|
+
$ pipx install hatch
|
|
20
|
+
:::
|
|
21
|
+
|
|
22
|
+
You can test that your installation has been successful by running
|
|
23
|
+
|
|
24
|
+
:::{code} console
|
|
25
|
+
$ copier
|
|
26
|
+
$ hatch
|
|
27
|
+
:::
|
|
28
|
+
|
|
29
|
+
If the two commands show you a summary of the available options and commands, then the core tools are installed correctly.
|
|
30
|
+
|
|
31
|
+
In order to work collaboratively and for the GitHub Pages publishing functionality to work, you also need to install the
|
|
32
|
+
version control system [Git](https://git-scm.com/downloads). Providing you with a full intro to using git exceeds the
|
|
33
|
+
space we have here, but there are many good git tutorials out there and there is also the
|
|
34
|
+
[official documentation](https://git-scm.com/doc).
|
|
35
|
+
|
|
36
|
+
[^python-version]: The μEdition is tested using Python 3.10 and 3.11. It may also work on newer Python version,
|
|
37
|
+
it just hasn't been tested on those.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Adding a Language
|
|
2
|
+
|
|
3
|
+
The μEdition has multi-language support as a core principle. Thus, even if you are planning to release your edition in
|
|
4
|
+
a single language only, you need to explicitly configure this one language.
|
|
5
|
+
|
|
6
|
+
To add a language to your μEdition, run the following command:
|
|
7
|
+
|
|
8
|
+
:::{code-block} console
|
|
9
|
+
$ hatch run uEdition language add FOLDER_NAME
|
|
10
|
+
:::
|
|
11
|
+
|
|
12
|
+
Replace `FOLDER_NAME` with the name of the folder that the μEdition content for that language is to be placed in. The
|
|
13
|
+
process will ask you for some detail about the language you are adding and will then create skeleton in the folder,
|
|
14
|
+
which is then ready for editing.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Updating a Language
|
|
2
|
+
|
|
3
|
+
The μEdition uses the same template approach for each language that you set up and these need to be updated separately
|
|
4
|
+
from the main update. Run the following command to update a single language:
|
|
5
|
+
|
|
6
|
+
:::{code-block} console
|
|
7
|
+
$ hatch run uEdition language update PATH
|
|
8
|
+
:::
|
|
9
|
+
|
|
10
|
+
Replace `PATH` with the name of the folder of the language you wish to update.
|
|
11
|
+
|
|
12
|
+
As with updating the main μEdition, check all files, before continuing with your work.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Publishing the μEdition
|
|
2
|
+
|
|
3
|
+
When you have your μEdition in a state that you want to publish it, then run the following command to generate the
|
|
4
|
+
publishable version:
|
|
5
|
+
|
|
6
|
+
:::{code-block} console
|
|
7
|
+
$ hatch run publish
|
|
8
|
+
:::
|
|
9
|
+
|
|
10
|
+
The μEdition will build the site into the configured output folder, which by default is {file}`site`. You can then
|
|
11
|
+
copy the content of this folder to your chosen hosting solution.
|
|
12
|
+
|
|
13
|
+
## Publishing to GitHub Pages
|
|
14
|
+
|
|
15
|
+
The μEdition comes with built-in support for publishing your μEdition via [GitHub Pages](https://pages.github.com/).
|
|
16
|
+
To do this, you need to have
|
|
17
|
+
|
|
18
|
+
* The μEdition set up to use git.
|
|
19
|
+
* An account on [GitHub](https://www.github.com).
|
|
20
|
+
* A repository set up on GitHub and the μEdition pushed to that repository
|
|
21
|
+
|
|
22
|
+
Then on GitHub in your repository navigate to {guilabel}`Settings` and then {guilabel}`Pages`. On the {guilabel}`Pages`
|
|
23
|
+
page ensure that under the {guilabel}`Build and deployment` heading, the {guilabel}`Source` dropdown is set to
|
|
24
|
+
"GitHub Actions".
|
|
25
|
+
|
|
26
|
+
To run the build manually, on GitHub navigate to {guilabel}`Actions` in your repository and then select the
|
|
27
|
+
{guilabel}`Publish the site` workflow on the left. This workflow can be triggered manually. Click on the
|
|
28
|
+
{guilabel}`Run workflow` button and then on the green {guilabel}`Run workflow` button in the popup. This will start
|
|
29
|
+
the build and deployment process and when the workflow is completed, you can access your μEdition at the URL that
|
|
30
|
+
is shown at the top of the {guilabel}`Settings` > {guilabel}`Pages` page.
|
|
31
|
+
|
|
32
|
+
The workflow is also set to automatically rebuild and deploy the μEdition whenever you push a change to the main
|
|
33
|
+
branch.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Updating the μEdition
|
|
2
|
+
|
|
3
|
+
The μEdition template is updated from time to time. In order to ensure that your μEdition is up-to-date with the latest
|
|
4
|
+
release, simply run
|
|
5
|
+
|
|
6
|
+
:::{code-block} console
|
|
7
|
+
$ hatch run update
|
|
8
|
+
:::
|
|
9
|
+
|
|
10
|
+
This will apply all the changes that were made to the template since you created the μEdition or since you last performed
|
|
11
|
+
an update.
|
|
12
|
+
|
|
13
|
+
It is recommended that you check the files that the update marks as "changed", before moving on with your work.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# μEdition
|
|
2
|
+
|
|
3
|
+
The process of creating and making available a (critical) digital edition often presents projects with a range of significant
|
|
4
|
+
hurdles, particularly around technical knowledge and hosting costs. The μEdition is a framwork that lowers these barriers by
|
|
5
|
+
providing a simple tool that supports users in easily building (multi-lingual) digital editions that can then easily be made
|
|
6
|
+
available online using free or low-cost hosting solutions.
|
|
7
|
+
|
|
8
|
+
## Contents
|
|
9
|
+
|
|
10
|
+
:::{tableofcontents}
|
|
11
|
+
:::
|
|
12
|
+
|
|
13
|
+
## Quickstart
|
|
14
|
+
|
|
15
|
+
To quickly get started with the μEdition, follow these steps (assuming you already have Python 3.10 or newer installed):
|
|
16
|
+
|
|
17
|
+
:::{code} console
|
|
18
|
+
$ pipx install hatch copier
|
|
19
|
+
$ copier copy https://github.com/uEdition/uEdition-project-template my-edition
|
|
20
|
+
🎤 What is the name of your μEdition?
|
|
21
|
+
My Edition
|
|
22
|
+
🎤 What is the μEdition author's name?
|
|
23
|
+
A.N. Editor
|
|
24
|
+
🎤 What is the μEdition author's address?
|
|
25
|
+
a.n.editor@example.com
|
|
26
|
+
🎤 Do you wish to automatically publish your μEdition?
|
|
27
|
+
(Use arrow keys)
|
|
28
|
+
» Disable automatic publishing
|
|
29
|
+
Via GitHub Pages
|
|
30
|
+
Via Read the Docs
|
|
31
|
+
🎤 What is the URL of the repository containing your μEdition?
|
|
32
|
+
https://github.com/aneditor/my-edition
|
|
33
|
+
🎤 What is the repository branch containing your μEdition?
|
|
34
|
+
main
|
|
35
|
+
|
|
36
|
+
Copying from template version 0.0.10
|
|
37
|
+
create .
|
|
38
|
+
create toc.yml
|
|
39
|
+
create uEdition.yml
|
|
40
|
+
create .uEdition.answers
|
|
41
|
+
create .github
|
|
42
|
+
create .github/workflows
|
|
43
|
+
create .github/workflows/pages.yml
|
|
44
|
+
create .gitignore
|
|
45
|
+
create pyproject.toml
|
|
46
|
+
$ cd my-edition
|
|
47
|
+
$ hatch run uEdition language add cy
|
|
48
|
+
🎤 What is the language code?
|
|
49
|
+
cy
|
|
50
|
+
🎤 What is the name of the language?
|
|
51
|
+
Cymraeg
|
|
52
|
+
$ hatch run serve
|
|
53
|
+
:::
|
|
54
|
+
|
|
55
|
+
Your new digital edition will be available at http://localhost:8000.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Configuring the μEdition
|
|
2
|
+
|
|
3
|
+
The μEdition and Jupyter Book are highly configurable and in the μEdition both are configured via the {file}`uEdition.yml`
|
|
4
|
+
file in the μEdition root. The block below shows the available configuration options that can be used in that file:
|
|
5
|
+
|
|
6
|
+
:::{code-block} yaml
|
|
7
|
+
author: # The author information consisting of:
|
|
8
|
+
name: # The name to display
|
|
9
|
+
email: # The e-mail address to use
|
|
10
|
+
jb_config: # Can contain any valid Jupyter Book configuration settings
|
|
11
|
+
languages: # The languages configured for the μEdition. A list, where each item consists of:
|
|
12
|
+
- code: # The ISO 639-1 two-letter language code
|
|
13
|
+
label: # The label to display for this language
|
|
14
|
+
path: # The path that contains the language-specific Jupyter Book
|
|
15
|
+
output: # The output directory for the complete μEdition
|
|
16
|
+
repository: # The repository that contains this μEdition, configured via:
|
|
17
|
+
url: # The URL to the repository
|
|
18
|
+
branch: # The branch containing the μEdition
|
|
19
|
+
title: # The title of the μEdition in all configured languages. Each configured language code must have a key in this mapping:
|
|
20
|
+
en: # Mapping from ISO 639-1 language code to the human-readable title
|
|
21
|
+
version: '1' # The version of the μEdition configuration, which must be set to "1"
|
|
22
|
+
:::
|
|
23
|
+
|
|
24
|
+
All elements of this file are optional and working defaults will be substituted.
|
|
25
|
+
|
|
26
|
+
All elements of the Jupyter Book can be configured via the `jb_config` settings ([see here for a full list](https://jupyterbook.org/en/stable/customize/config.html)).
|
|
27
|
+
These values will be used as they are for all configured language-specific Jupyter Books. The only exception to this is
|
|
28
|
+
the `title` configuration setting, for which the μEdition will always use the language-specific value configured in the
|
|
29
|
+
{file}`uEdition.yml`.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Writing Content
|
|
2
|
+
|
|
3
|
+
The μEdition uses [Jupyter Book](https://jupyterbook.org) as its underlying technology for turning your text into a
|
|
4
|
+
publishable website. Each language in the μEdition is a separate Jupyter Book and the μEdition provides the glue that
|
|
5
|
+
merges the individual outputs together into a single site. This is achieved by moving the Jupyter Book configuration
|
|
6
|
+
into shared configuration files. When the μEdition builds the final website, language-specific versions of the
|
|
7
|
+
configurations are added to each language-specific Jupyter Book, before the Jupyter Book build process is then run
|
|
8
|
+
for each language. Due to this structure, most of the guidance that the Jupyter Book project provides for writing
|
|
9
|
+
and configuring Jupyter Book projects can be used in the μEdition.
|
|
10
|
+
|
|
11
|
+
## Structuring the μEdition
|
|
12
|
+
|
|
13
|
+
The structure of the μEdition is defined via its table of contents, which is configured in the {file}`toc.yml` file
|
|
14
|
+
in the μEdition root folder. The {file}`toc.yml` file uses the same format as [defined by the Jupyter Book project](https://jupyterbook.org/en/stable/structure/toc.html).
|
|
15
|
+
The only difference is that where the standard Jupyter Book table of contents has a single `title` or `caption`,
|
|
16
|
+
in the μEdition these entries can contain a mapping of language code to text. When generating the language-specific
|
|
17
|
+
table of contents the μEdition ensures that the correct language value is used for the caption or title for that
|
|
18
|
+
language:
|
|
19
|
+
|
|
20
|
+
:::{code-block} yaml
|
|
21
|
+
format: jb-book
|
|
22
|
+
root: index
|
|
23
|
+
parts:
|
|
24
|
+
- caption:
|
|
25
|
+
en: Name of Part 1
|
|
26
|
+
de: Name von Teil 1
|
|
27
|
+
chapters:
|
|
28
|
+
- title:
|
|
29
|
+
en: Chapter 1
|
|
30
|
+
de: Chapter 2
|
|
31
|
+
file: path/to/part1/chapter1
|
|
32
|
+
- file: path/to/part1/chapter2
|
|
33
|
+
:::
|
|
34
|
+
|
|
35
|
+
## Writing text content
|
|
36
|
+
|
|
37
|
+
Jupter Book primarily uses MyST or Markedly Structured Text for writing text content, which is an extension of Markdown
|
|
38
|
+
designed for publishable content. A good overview over the core functionality can be found
|
|
39
|
+
[here](https://myst-parser.readthedocs.io/en/latest/syntax/typography.html). Jupyter Book provides a range of extensions
|
|
40
|
+
built upon the core MySQ structure, which are documented [here](https://jupyterbook.org/en/stable/content/index.html)
|
|
41
|
+
and which include useful things like glossaries, indices, citations, footnotes, plus elements for structuring the layout
|
|
42
|
+
of the page and its content.
|
|
43
|
+
|
|
44
|
+
## Local server
|
|
45
|
+
|
|
46
|
+
While writing it can be helpful to see what the result will look like. To simplify this, the μEdition provides a built-in
|
|
47
|
+
web-server that automatically re-generates the website when you edit the content. To start this server, run the
|
|
48
|
+
following command:
|
|
49
|
+
|
|
50
|
+
:::{code-block} console
|
|
51
|
+
$ hatch run serve
|
|
52
|
+
:::
|
|
53
|
+
|
|
54
|
+
This will build the μEdition and then make it available at http://localhost:8000. When you make changes to the content,
|
|
55
|
+
the μEdition will automatically re-build the website and automatically reload the view in the browser.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Creating a μEdition
|
|
2
|
+
|
|
3
|
+
With all the pre-requisites installed correctly, you are now ready to create your first μEdition. On the commandline
|
|
4
|
+
navigate to the folder where you want to create your μEdition and run:
|
|
5
|
+
|
|
6
|
+
:::{code-block} console
|
|
7
|
+
$ copier copy https://github.com/uEdition/uEdition-project-template my-edition
|
|
8
|
+
:::
|
|
9
|
+
|
|
10
|
+
Replace `my-edition` with the name of the folder you want your edition to be created in. The setup process will ask
|
|
11
|
+
you a few questions about your new μEdition and create a skeleton μEdition in the folder you specified.
|
|
12
|
+
|
|
13
|
+
On the commandline, navigate into that new folder and all further commands are to be run inside that folder.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# User Guide
|
|
2
|
+
|
|
3
|
+
Welcome to the μEdition User Guide, which guides you, the editor, through the process of {doc}`creating a new μEdition <create>`,
|
|
4
|
+
{doc}`adding languages <language-add>` and {doc}`content <content>` to it, and {doc}`publishing it to GitHub Pages <publish>`.
|
|
5
|
+
|
|
6
|
+
The user guide tries to assume as little prior knowledge as possible, but you are expected to be able to navigate the
|
|
7
|
+
command-line. Additionally, for publishing via GitHub Pages, basic Git knowledge is also required.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
The μEdition is built on top of a set of other tools and in order to create our first μEdition, it is necessary to first
|
|
4
|
+
install these dependencies.
|
|
5
|
+
|
|
6
|
+
The μEdition is built in Python and supports version 3.10 and 3.11 [^python-version]. In order to use it, please
|
|
7
|
+
[install an appropriate version of Python for your operating system](https://python.org/downloads).
|
|
8
|
+
|
|
9
|
+
For the initial creation of a new μEdition, the μEdition uses a tool called [Copier](https://copier.readthedocs.io/en/stable/).
|
|
10
|
+
To install all required μEdition dependencies and to run the various μEdition tools, [Hatch](https://hatch.pypa.io)
|
|
11
|
+
is used.
|
|
12
|
+
|
|
13
|
+
The easiest way to install both Copier and Hatch is via [pipx](https://pypa.github.io/pipx/), which you can
|
|
14
|
+
[install from here](https://pypa.github.io/pipx/installation/). When you have pipx installed, then on the commandline
|
|
15
|
+
run the following command to install Copier:
|
|
16
|
+
|
|
17
|
+
:::{code} console
|
|
18
|
+
$ pipx install copier
|
|
19
|
+
$ pipx install hatch
|
|
20
|
+
:::
|
|
21
|
+
|
|
22
|
+
You can test that your installation has been successful by running
|
|
23
|
+
|
|
24
|
+
:::{code} console
|
|
25
|
+
$ copier
|
|
26
|
+
$ hatch
|
|
27
|
+
:::
|
|
28
|
+
|
|
29
|
+
If the two commands show you a summary of the available options and commands, then the core tools are installed correctly.
|
|
30
|
+
|
|
31
|
+
In order to work collaboratively and for the GitHub Pages publishing functionality to work, you also need to install the
|
|
32
|
+
version control system [Git](https://git-scm.com/downloads). Providing you with a full intro to using git exceeds the
|
|
33
|
+
space we have here, but there are many good git tutorials out there and there is also the
|
|
34
|
+
[official documentation](https://git-scm.com/doc).
|
|
35
|
+
|
|
36
|
+
[^python-version]: The μEdition is tested using Python 3.10 and 3.11. It may also work on newer Python version,
|
|
37
|
+
it just hasn't been tested on those.
|