Skip to content

Commit

Permalink
work on pydoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd committed Jan 17, 2024
1 parent 037f43f commit fa3aa25
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 4 deletions.
21 changes: 17 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
.PHONY: doc

doc_generated := doc/generated
pydoc_generated := $(doc_generated)/pydoc

default: test clean prepare examples
default: test clean prepare examples gendoc

prepare:
mkdir $(doc_generated)
mkdir $(pydoc_generated)

test:
python3 -m unittest tests/*.py

examples:
examples: clean prepare
python3 -m samples.standard_tuning_tet12_all_c_scales $(doc_generated)
python3 -m samples.standard_tuning_tet12_all_c_chords $(doc_generated)
python3 -m samples.standard_tuning_tet12_chords_intervals $(doc_generated)
python3 -m samples.standard_tuning_tet12_chords_intervals $(doc_generated)
python3 -m samples.guitar_fretboard_all_notes_e-standard $(doc_generated)
python3 -m samples.guitar_6string_e-standard_all_scales_all_roots $(doc_generated)

doc: clean prepare
## todo: not working yet
cd $(pydoc_generated)
echo pydoc3 -w `find ../../pymusictheory -name *.py`
cd ../..
# python3 -m docgen.guitar_6string_e-standard_all_scales_all_roots $(doc_generated)

clean:
rm -rf $(doc_generated)
-rm $(pydoc_generated)/*
-rm -d $(pydoc_generated)
-rm $(doc_generated)/*
-rm -d $(doc_generated)
21 changes: 21 additions & 0 deletions doc/pydoc/__init__.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module __init__</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>__init__</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/bw/git/music_theory/pymusictheory/core/__init__.py">/home/bw/git/music_theory/pymusictheory/core/__init__.py</a></font></td></tr></table>
<p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>

<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__all__</strong> = ['scales', 'chords', 'notes']</td></tr></table>
</body></html>
14 changes: 14 additions & 0 deletions doc/pydoc/progressions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module progressions</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>progressions</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/bw/git/music_theory/pymusictheory/core/progressions.py">/home/bw/git/music_theory/pymusictheory/core/progressions.py</a></font></td></tr></table>
<p></p>

</body></html>
84 changes: 84 additions & 0 deletions doc/pydoc/temperament.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module temperament</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>temperament</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/bw/git/music_theory/pymusictheory/core/temperament.py">/home/bw/git/music_theory/pymusictheory/core/temperament.py</a></font></td></tr></table>
<p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>

<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="re.html">re</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>

<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="builtins.html#object">builtins.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="temperament.html#TwelveTET">TwelveTET</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="TwelveTET">class <strong>TwelveTET</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>

<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>#&nbsp;definition&nbsp;of&nbsp;temperaments<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="TwelveTET-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Initialize&nbsp;self.&nbsp;&nbsp;See&nbsp;help(type(self))&nbsp;for&nbsp;accurate&nbsp;signature.</tt></dd></dl>

<dl><dt><a name="TwelveTET-__len__"><strong>__len__</strong></a>(self)</dt></dl>

<dl><dt><a name="TwelveTET-distance_to_name"><strong>distance_to_name</strong></a>(self, distance)</dt><dd><tt>Translates&nbsp;any&nbsp;note&nbsp;distance&nbsp;to&nbsp;the&nbsp;number&nbsp;of&nbsp;the&nbsp;pitch&nbsp;class&nbsp;(int)</tt></dd></dl>

<dl><dt><a name="TwelveTET-get_note_frequency"><strong>get_note_frequency</strong></a>(self, root, distance, precision=None)</dt><dd><tt>Returns&nbsp;the&nbsp;frequency&nbsp;of&nbsp;note&nbsp;with&nbsp;'distance'&nbsp;to&nbsp;'root'&nbsp;frequency</tt></dd></dl>

<dl><dt><a name="TwelveTET-name_to_distance"><strong>name_to_distance</strong></a>(self, name)</dt></dl>

<hr>
Readonly properties defined here:<br>
<dl><dt><strong>length</strong></dt>
</dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>

<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-init_temperament"><strong>init_temperament</strong></a>()</dt></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>

<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>temperament</strong> = {'12TET': &lt;temperament.TwelveTET object&gt;}</td></tr></table>
</body></html>

0 comments on commit fa3aa25

Please sign in to comment.