music21.documentation.library.writers

CorpusReferenceReSTWriter

class music21.documentation.library.writers.CorpusReferenceReSTWriter

Write the corpus reference ReST file: referenceCorpus.rst into about/

CorpusReferenceReSTWriter bases

CorpusReferenceReSTWriter methods

CorpusReferenceReSTWriter.run()

Methods inherited from ReSTWriter:

Methods inherited from DocumentationWriter:

DocumentationWriter

class music21.documentation.library.writers.DocumentationWriter

Abstract base class for writers.

Call .run() on the object to make it work.

DocumentationWriter methods

DocumentationWriter.run()
DocumentationWriter.setupOutputDirectory(outputDirectory=None)

creates outputDirectory if it does not exist.

Looks at self.outputDirectory if not there.

DocumentationWriter.sourceToAutogenerated(sourcePath)

converts a sourcePath to an outputPath

generally speaking, substitutes “source” for “autogenerated”

IPythonNotebookReSTWriter

class music21.documentation.library.writers.IPythonNotebookReSTWriter

Converts IPython notebooks into ReST, and handles their associated image files.

This class wraps the 3rd-party nbconvert Python script.

IPythonNotebookReSTWriter bases

IPythonNotebookReSTWriter read-only properties

IPythonNotebookReSTWriter.rstEditingWarningFormat

IPythonNotebookReSTWriter methods

IPythonNotebookReSTWriter.blankLineAfterLiteral(oldLines)

Guarantee a blank line after literal blocks.

IPythonNotebookReSTWriter.cleanConvertedNotebook(oldLines, ipythonNotebookFilePath)

Take a notebook directly as parsed and make it look better for HTML

IPythonNotebookReSTWriter.cleanupNotebookAssets(ipythonNotebookFilePath)

Deletes all .text files in the _files directory.

IPythonNotebookReSTWriter.convertOneNotebook(ipythonNotebookFilePath)

converts one .ipynb file to .rst using nbconvert.

returns True if IPythonNotebook was converted. returns False if IPythonNotebook’s converted .rst file is newer than the .ipynb file.

sends AssertionError if ipythonNotebookFilePath does not exist.

IPythonNotebookReSTWriter.iterateSequencePairwise(sequence)
IPythonNotebookReSTWriter.run()
IPythonNotebookReSTWriter.runNBConvert(ipythonNotebookFilePath)

Methods inherited from ReSTWriter:

Methods inherited from DocumentationWriter:

ModuleReferenceReSTWriter

class music21.documentation.library.writers.ModuleReferenceReSTWriter

Writes module reference ReST files, and their index.rst file.

ModuleReferenceReSTWriter bases

ModuleReferenceReSTWriter methods

ModuleReferenceReSTWriter.run()
ModuleReferenceReSTWriter.writeIndexRst(referenceNames)

Write the index.rst file from the list of reference names

Methods inherited from ReSTWriter:

Methods inherited from DocumentationWriter:

ReSTWriter

class music21.documentation.library.writers.ReSTWriter

Abstract base class for all ReST writers.

ReSTWriter bases

ReSTWriter methods

ReSTWriter.write(filePath, rst)

Write rst (a unicode string) to filePath, only overwriting an existing file if the content differs.

Methods inherited from DocumentationWriter:

StaticFileCopier

class music21.documentation.library.writers.StaticFileCopier

Copies static files into the autogenerated directory.

StaticFileCopier bases

StaticFileCopier methods

StaticFileCopier.run()

Methods inherited from DocumentationWriter: