Skip to content

Commit

Permalink
docs: restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
demberto committed Mar 18, 2023
1 parent 71bc48a commit f7e1303
Show file tree
Hide file tree
Showing 38 changed files with 451 additions and 315 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ sphinx:
# Optionally declare the Python requirements required to build your docs
python:
install:
- path: .
- path: . # Required by importlib.version for Sphinx (setuptools_scm)
- requirements: docs/requirements.txt
- requirements: requirements.txt
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## [2.0.0] - 2023-03-18

Welcome PyFLP 2.0 🎉
Read the previous changelogs to get the complete list of changes.

### Added

- `FruityBloodOverdrive` - thanks to @@ttaschke [#120].

### Changed

- Docs are way more easier to navigate now.

### Fixed

Expand All @@ -19,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for PyPy 3.7 (unable to run tox, cannot find a download).

[#113]: https://github.com/demberto/PyFLP/issues/113
[#120]: https://github.com/demberto/PyFLP/pull/120

## [2.0.0a7] - 2022-12-19

Expand Down Expand Up @@ -629,6 +641,7 @@ Same as in 0.1.1
- `flpinfo` doesn't output correctly sometimes due to long strings.
- Extraneous data dumped sometimes by `InsertSlotEvent.Plugin`, why this is caused is not known.

[2.0.0]: https://github.com/demberto/PyFLP/compare/v2.0.0a7.post0...v2.0.0
[2.0.0a7]: https://github.com/demberto/PyFLP/compare/v2.0.0a6...v2.0.0a7
[2.0.0a6]: https://github.com/demberto/PyFLP/compare/v2.0.0a5.post...v2.0.0a6
[2.0.0a5.post]: https://github.com/demberto/PyFLP/compare/v2.0.0a5...v2.0.0a5.post
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/flp-format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Part I: FLP Format & Events
FLP is a binary format used by Image-Line FL Studio, a music production
software, to store project files. Instead of using C-style structs entirely,
the FLP format has evolved from what once was a MIDI-like format to a really
bad and messy combination of :wikipedia:`type-length-value` encoded "events"
bad and messy combination of :wikipedia:`Type-length-value` encoded "events"
and structs.

Specification
Expand Down
14 changes: 10 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,22 @@
from pyflp.arrangement import _TrackColorProp

BITLY_LINK = re.compile(r"!\[.*\]\((https://bit\.ly/[A-z0-9]*)\)")
"""Shortened URLs for links to in-docstring images and docs."""

NEW_IN_FL = re.compile(r"\*New in FL Studio v([^\*]*)\*[\.:](.*)")
"""Matched in docstrings and replaced with an SVG by :meth:`badge_flstudio`."""

EVENT_ID_DOC = re.compile(r"([0-9\.]*)\+")
FL_BADGE = "https://img.shields.io/badge/FL%20Studio-{}+-5f686d?labelColor=ff7629&style=for-the-badge"
GHUC_PREFIX = "https://raw.githubusercontent.com/demberto/PyFLP/master/docs/"
"""Raw image URL root used for in-docstring images and docs."""

IGNORED_BITLY = ["3RDM1yn"]

project = "PyFLP"
author = "demberto"
copyright = f"2022, {author}"
release = importlib.metadata.version("pyflp")
release = importlib.metadata.version("pyflp") # Needs package installation!
extensions = [
"hoverxref.extension",
"m2r2", # Markdown to reStructuredText conversion
Expand All @@ -48,7 +54,7 @@
"sphinx.ext.todo", # Items I need to document
"sphinx.ext.viewcode", # "Show source" button next to autodoc output
"sphinx_toolbox", # Badges and goodies
"sphinx_toolbox.github",
"sphinx_toolbox.github", # Link to project issues / PRs easily
"sphinx_toolbox.more_autodoc.autoprotocol", # Autodoc extension for typing.Protocol
"sphinx_toolbox.more_autodoc.sourcelink", # Python docs-style source code link
"sphinx_toolbox.sidebar_links", # Links to repo and PyPi project in the sidebar
Expand All @@ -73,9 +79,9 @@
todo_include_todos = True # Include .. todo:: directives in output
todo_emit_warnings = True # Emit warnings about it as well, so I don't forget
html_css_files = [
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
] # https://sphinx-design.rtfd.io/en/furo-theme/badges_buttons.html#fontawesome-icons
sd_fontawesome_latex = True
sd_fontawesome_latex = True # Output FontAwesome icons in LaTeX
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"construct": ("https://construct.readthedocs.io/en/latest", None),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:caption: Contents:
:glob:

reference/*/index
reference/*

:material-outlined:`api` API
Expand Down
14 changes: 14 additions & 0 deletions docs/reference/arrangement/arrangement.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
\ :fas:`trowel-bricks` Arrangement
==================================

.. currentmodule:: pyflp.arrangement

.. autoclass:: Arrangement
:members:

.. autoclass:: TimeSignature
:members:

.. autoclass:: ArrangementID
:members:
:member-order: bysource
19 changes: 19 additions & 0 deletions docs/reference/arrangement/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Arrangements
============

.. module:: pyflp.arrangement

.. toctree::
:maxdepth: 2
:titlesonly:
:caption: Contents:
:glob:

*

.. autoclass:: Arrangements
:members:

.. autoclass:: ArrangementsID
:members:
:member-order: bysource
15 changes: 15 additions & 0 deletions docs/reference/arrangement/playlist.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
\ :material-sharp:`playlist_play;1.2em;sd-pb-1` Playlist
========================================================

.. currentmodule:: pyflp.arrangement

.. autoclass:: PLItemBase
:members:

.. autoclass:: ChannelPLItem
:members:
:show-inheritance: PLItemBase

.. autoclass:: PatternPLItem
:members:
:show-inheritance: PLItemBase
Original file line number Diff line number Diff line change
@@ -1,30 +1,7 @@
Arrangements
============

.. module:: pyflp.arrangement
.. autoclass:: Arrangements
:members:

Arrangement
-----------

.. autoclass:: Arrangement
:members:

Playlist
--------

.. autoclass:: PLItemBase
:members:
.. autoclass:: ChannelPLItem
:members:
:show-inheritance: PLItemBase
.. autoclass:: PatternPLItem
:members:
:show-inheritance: PLItemBase

Track
-----
=====

.. currentmodule:: pyflp.arrangement

.. autoclass:: Track
:members:
Expand Down Expand Up @@ -68,21 +45,6 @@ Track

.. image:: /img/arrangement/track/sync.png

Classes
-------

.. autoclass:: TimeSignature
:members:

Event IDs
---------

.. autoclass:: ArrangementsID
:members:
:member-order: bysource
.. autoclass:: ArrangementID
:members:
:member-order: bysource
.. autoclass:: TrackID
:members:
:member-order: bysource
13 changes: 13 additions & 0 deletions docs/reference/channel/automation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
\ :fas:`bezier-curve` Automation
================================

.. currentmodule:: pyflp.channel

.. autoclass:: Automation
:members:

.. autoclass:: AutomationLFO
:members:

.. autoclass:: AutomationPoint
:members:
17 changes: 17 additions & 0 deletions docs/reference/channel/channel.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Channel
=======

.. currentmodule:: pyflp.channel

.. autoclass:: Channel
:members:

Enums
-----

.. autoclass:: ChannelType
:members:

.. autoclass:: ChannelID
:members:
:member-order: bysource
11 changes: 11 additions & 0 deletions docs/reference/channel/display-group.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
DisplayGroup
============

.. currentmodule:: pyflp.channel

.. autoclass:: DisplayGroup
:members:

.. autoclass:: DisplayGroupID
:members:
:member-order: bysource
20 changes: 20 additions & 0 deletions docs/reference/channel/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
\ :material-sharp:`dns;1.2em;sd-pb-1` Channel Rack
==================================================

.. toctree::
:maxdepth: 2
:titlesonly:
:caption: Contents:
:glob:

*

.. module:: pyflp.channel
.. autoclass:: ChannelRack
:members:

.. autoclass:: RackID
:members:
:member-order: bysource

.. autoexception:: ChannelNotFound
7 changes: 7 additions & 0 deletions docs/reference/channel/instrument.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Instrument
==========

.. currentmodule:: pyflp.channel

.. autoclass:: Instrument
:members:
7 changes: 7 additions & 0 deletions docs/reference/channel/layer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
\ :fas:`layer-group` Layer
==========================

.. currentmodule:: pyflp.channel

.. autoclass:: Layer
:members:
56 changes: 56 additions & 0 deletions docs/reference/channel/sampler.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
\ :material-sharp:`audio_file;1.2em;sd-pb-1` Sampler
====================================================

.. currentmodule:: pyflp.channel

.. autoclass:: Sampler
:members:

.. autoclass:: Content
:members:

.. autoclass:: Envelope
:members:

.. autoclass:: Filter
:members:

.. autoclass:: FX
:members:

.. autoclass:: Playback
:members:

.. autoclass:: Reverb
:members:

.. autoclass:: SamplerLFO
:members:

.. autoclass:: TimeStretching
:members:

Enums
-----

.. autoclass:: DeclickMode
:members:

.. autoclass:: LFOShape
:members:

.. autoclass:: ReverbType
:members:

.. grid::

.. grid-item::

.. autoclass:: StretchMode
:members:

.. grid-item::
:child-align: center
:columns: auto

.. image:: /img/channel/stretch-mode.png
33 changes: 33 additions & 0 deletions docs/reference/channel/shared.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Shared
======

.. currentmodule:: pyflp.channel

These implement functionality used by :class:`Channel` or its subclasses.

.. autoclass:: Arp
:members:

.. autoclass:: Delay
:members:

.. autoclass:: Keyboard
:members:

.. autoclass:: LevelAdjusts
:members:

.. autoclass:: Polyphony
:members:

.. autoclass:: Time
:members:

.. autoclass:: Tracking
:members:

Enums
-----

.. autoclass:: ArpDirection
:members:
Loading

0 comments on commit f7e1303

Please sign in to comment.