Skip to content

Commit

Permalink
fix: docs compilation and add dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
antscloud committed Sep 11, 2023
1 parent 91ac859 commit 8d5c7c6
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 16 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
3 changes: 2 additions & 1 deletion docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.navbar-brand-box .logo{
.navbar-brand {
max-width: 150px !important;
margin: auto;
}
2 changes: 1 addition & 1 deletion docs/source/api_documentation/fretboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Horizontal Fretboard

```{eval-rst}
.. automodule:: fretboardgtr.fretboards.fretboard
.. automodule:: fretboardgtr.fretboards.horizontal
:members:
:undoc-members:
```
Expand Down
3 changes: 1 addition & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def linkcode_resolve(domain, info):

html_sidebars = {
"**": [
"sidebar-logo.html",
"navbar-logo.html",
"search-field.html",
"sbt-sidebar-nav.html",
]
Expand All @@ -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,
}
Expand Down
21 changes: 13 additions & 8 deletions docs/source/get-started/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ fretboard.add_notes(scale=c_major)
fretboard.export("my_vertical_fretboard.svg", format="svg")
```

<p align="center">
<img src="../assets/my_vertical_fretboard.svg" width="250"/>
</p>
```{image} ../assets/my_vertical_fretboard.svg
:alt: My vertical fretboard
:width: 200px
:align: center
```
## Examples

## Examples
### Draw a chord diagram

```python
Expand All @@ -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")
```
<p align="center">
<img src="../assets/c_major_chord.svg" width="250"/>
</p>

```{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"
Expand Down
1 change: 0 additions & 1 deletion docs/source/get-started/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
```{toctree}
:maxdepth: 2
:hidden:
./get-started.md
./configuration.md
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions fretboardgtr/note_colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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])
Expand Down

0 comments on commit 8d5c7c6

Please sign in to comment.