diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..2d609a0 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,17 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +build: + os: ubuntu-20.04 + tools: + python: "3.9" + +sphinx: + configuration: docs/source/conf.py + +python: + install: + - requirements: docs/requirements.txt \ No newline at end of file diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css index 2187554..76da3d6 100644 --- a/docs/source/_static/css/custom.css +++ b/docs/source/_static/css/custom.css @@ -9,4 +9,9 @@ .japanese-monospaced pre { font-family: var(--font-mono-jp); +} + +/* Hide the ugly toctree captions on the main page */ +section#jubeatools div.toctree-wrapper span.caption-text { + display: none; } \ No newline at end of file diff --git a/docs/source/cli.md b/docs/source/cli.md index 85c0205..6afd021 100644 --- a/docs/source/cli.md +++ b/docs/source/cli.md @@ -1,2 +1,80 @@ # Command-line Interface +## Usage + +```console +$ jubeatools [OPTIONS] SRC DST +``` + +## Positional Arguments + +`SRC` +: *source*, path to the input chart file or chart folder + +`DST` +: *destination*, output path template to use for the output file or set of + files. See []() for more + info + +## Options + +### Input + +`--input-format=FORMAT` +: Force jubeatools to read the input file / folder as the given format. If this + option is not used jubeatools will try to guess the format using + [`guess_format()`](guess_format). + + Possible values : `eve`, `jbsq`, `malody`, `memon:legacy`, `memon:v0.1.0`, + `memon:v0.2.0`, `memon:v0.3.0`, `memon:v1.0.0`, `mono-column`, `memo`, + `memo1`, `memo2` + +`--beat-snap=NUMBER` +: Snap all notes and bpm changes to the nearest {math}`\frac{1}{\texttt{NUMBER}}` beat + + Applies to the following formats : `eve`, `jbsq` + + Possibles values : Integers >= 1 + +`--merge` +: If called on a folder, merge all the chart files found inside with a + "permissive" strategy. + + Applies to the following formats: `memon:legacy`, `memon:v0.1.0`, + `memon:v0.2.0`, `memon:v0.3.0`, `memon:v1.0.0` + +### Output + +`-f, --format=FORMAT` +: Output file format + + **required** + + Possible values : `eve`, `jbsq`, `malody`, `memon:legacy`, `memon:v0.1.0`, + `memon:v0.2.0`, `memon:v0.3.0`, `memon:v1.0.0`, `mono-column`, `memo`, + `memo1`, `memo2` + +`--circlefree` +: Add `#circlefree=1` to the file header when converting to a format from the + jubeat analyser family. + + This means long note ends will be written down with non-circled numbers, like + in this example : + + ```{code} + :class: japanese-monospaced + □□□□ |--①-| + ①――< |--②-| + □□□□ |----| + □□□□ |----| + + □□□□ + 2□□□ + □□□□ + □□□□ + ``` + +### Other + +`--help` +: Show the help text and exit \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index d937dd2..e32a765 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -46,10 +46,12 @@ html_css_files = [ 'css/custom.css', ] +myst_heading_anchors = 2 + myst_enable_extensions = [ # "amsmath", "colon_fence", - # "deflist", + "deflist", # "dollarmath", "fieldlist", # "html_admonition", diff --git a/docs/source/index.md b/docs/source/index.md index 2ac5afb..9135123 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -2,18 +2,22 @@ A toolbox for jubeat file formats +## For Charters + +If you just want to use jubeatools to convert a chart, read these pages : + ```{toctree} :caption: For Charters :maxdepth: 1 -:hidden: how to install jubeatools how to convert charts ``` +## For Developers + ```{toctree} :caption: For Developers :maxdepth: 1 -:hidden: library/index cli api/index diff --git a/docs/source/library/writing chart files.md b/docs/source/library/writing chart files.md index eb52ae4..82fefa4 100644 --- a/docs/source/library/writing chart files.md +++ b/docs/source/library/writing chart files.md @@ -58,7 +58,8 @@ in [](<../api/loaders and dumpers.md>). Dumpers all take in an output path template. If it doesn't point to an existing *folder*, the path is used as a [format string](https://docs.python.org/3/library/string.html#format-string-syntax). -The following parameters are available, they are all passed as `str` : +The following parameters are available for the format string, they are all +passed as `str` objects : | name | description | |---------------------|----------------------------------------------------|