diff --git a/README.md b/README.md index 01f9df0..244993e 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,18 @@ Package that make easy creation of **highly customizable** fretboards and chords To get started simply install the package from PyPI +## Dependencies + +`fretboardgtr` needs to have the following install in order to run : + +```shell +sudo apt install libcairo2-dev pkg-config +``` + ## How to install + + ```shell pip install fretboardgtr ``` diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css index 60f92fb..dda5c09 100644 --- a/docs/source/_static/css/custom.css +++ b/docs/source/_static/css/custom.css @@ -1,3 +1,4 @@ -.navbar-brand-box .logo{ +.navbar-brand { max-width: 150px !important; + margin: auto; } diff --git a/docs/source/api_documentation/fretboards.md b/docs/source/api_documentation/fretboards.md index 5640814..8ed3a9b 100644 --- a/docs/source/api_documentation/fretboards.md +++ b/docs/source/api_documentation/fretboards.md @@ -4,7 +4,7 @@ ## Horizontal Fretboard ```{eval-rst} -.. automodule:: fretboardgtr.fretboards.fretboard +.. automodule:: fretboardgtr.fretboards.horizontal :members: :undoc-members: ``` diff --git a/docs/source/conf.py b/docs/source/conf.py index df6c89e..d9b2814 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -97,7 +97,7 @@ def linkcode_resolve(domain, info): html_sidebars = { "**": [ - "sidebar-logo.html", + "navbar-logo.html", "search-field.html", "sbt-sidebar-nav.html", ] @@ -114,7 +114,6 @@ def linkcode_resolve(domain, info): "use_issues_button": True, "use_download_button": True, "use_sidenotes": True, - "logo_only": True, "home_page_in_toc": False, "show_toc_level": 2, } diff --git a/docs/source/get-started/get-started.md b/docs/source/get-started/get-started.md index 8b9bf25..779ab8e 100644 --- a/docs/source/get-started/get-started.md +++ b/docs/source/get-started/get-started.md @@ -74,11 +74,13 @@ fretboard.add_notes(scale=c_major) fretboard.export("my_vertical_fretboard.svg", format="svg") ``` -

- -

+```{image} ../assets/my_vertical_fretboard.svg +:alt: My vertical fretboard +:width: 200px +:align: center +``` +## Examples -## Examples ### Draw a chord diagram ```python @@ -98,13 +100,16 @@ c_major = [0, 3, 2, 0, 1, 0] fretboard.add_fingering(c_major, root="C") fretboard.export("my_vertical_fretboard.svg", format="svg") ``` -

- -

+ +```{image} ../assets/c_major_chord.svg +:alt: My vertical fretboard +:width: 200px +:align: center +``` ### Draw all propably possible chord position for a specific chord -⚠️ Be careful with this snippets. This example generate over 1000 svgs +⚠️ Be careful with this snippets. This example generates over 1000 svgs ```python TUNING = ["E", "A", "D", "G", "B", "E"] CHORD_ROOT = "C" diff --git a/docs/source/get-started/index.md b/docs/source/get-started/index.md index 68ab7c3..d28f533 100644 --- a/docs/source/get-started/index.md +++ b/docs/source/get-started/index.md @@ -1,6 +1,5 @@ ```{toctree} :maxdepth: 2 -:hidden: ./get-started.md ./configuration.md diff --git a/docs/source/index.md b/docs/source/index.md index 1f878f5..4c043b6 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -1,6 +1,6 @@ # Welcome to FretBoardGtr Documentation -Package that make easy creation of **highly customizable** fretboards and chords diagrams +Package that make easy creation of **highly customizable** fretboards and chords diagrams. ## Table of content diff --git a/fretboardgtr/note_colors.py b/fretboardgtr/note_colors.py index 2c60430..99fc428 100644 --- a/fretboardgtr/note_colors.py +++ b/fretboardgtr/note_colors.py @@ -41,7 +41,7 @@ def from_short_interval(self, interval: str) -> str: ------- from fretboardgtr.constants import Interval >>> NoteColors().from_short_interval(Interval.MINOR_SIXTH) - "rgb(168, 107, 98)" + "rgb(168, 107, 98)" """ color = WHITE for long, short in INTERVAL_MAPPING.items(): @@ -68,7 +68,7 @@ def from_interval(self, interval: int) -> str: ------- from fretboardgtr.constants import LongInterval >>> NoteColors().from_short_interval(LongInterval.MINOR_SIXTH) - "rgb(168, 107, 98)" + "rgb(168, 107, 98)" """ cls_keys = list(self.__annotations__) color = getattr(self, cls_keys[interval % 12])