ReStructuredText guida - omartek/linux_variePerLaboratorio GitHub Wiki

Table of Contents

Guide online

(Sphinx)

Formattazione

Inline markup

(DocUtils)

Quick reference

Struttura del progetto ReStructuredText->Github->ReadtheDocs

Installare Sphinx.

Creare una cartella del progetto ed all'interno una cartella docs. Accedere alla cartella ed eseguire il comando

 sphinx-quickstart

Creare una copia del progetto su Github seguendo la guida Linux Git.

Importante: aggiornare conf.py per utilizzare il tema di ReadtheDocs

 # -- Options for HTML output ----------------------------------------------
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 html_theme = 'sphinx_rtd_theme'

Creare un collegamento tra ReadtheDocs e Github per il render del documento.

INDEX.RST

 Micro:bit - Piccola scheda per grandi progetti
 ==============================================
 
 Contenuti:
  .. toctree::
     :maxdepth: 1         ))profondità dei livelli del sommario((
     :caption: Progetti
    
     numeriprimi.rst      ))file dei capitoli eventualmente organizzati in sottocartelle((
     cuorelampeggiante.rst
     cartaforbicisasso.rst
  
 Indici e tavole
 ===============
 * :ref:`genindex`
 * :ref:`modindex`
 * :ref:`search`

PRIMO/SECONDO/TERZO LIVELLO E FORMATTAZIONE BASE

 Esercizi
 --------
 
 File d'esempio
 ++++++++++++++
 Welcome!
 The BBC micro:bit is a small computing device for children. One of the
 languages it understands is the popular Python programming language. The
 version of Python that runs on the BBC micro:bit is called MicroPython.

GRASSETTO

  **EXACTLY**

CORSIVO

 *microbit*
  • INDICE PUNTATO
 * Indice puntato

RIQUADRATO (Alt-Gr + ù + ù)

 ``mibrobit``

Inserimento immagini e download

 .. image:: comic.png
 .. image:: ./comic.png
 .. image:: ../comic.png
 :download:`File .skp di solidi complessi <./file/solidi_complessi.skp>`.

LINK CON URL O TESTO DESCRITTIVO

 <https://www.sketchup.com/products/sketchup-free>
 * `uFlash <https://uflash.readthedocs.io/en/latest/>`_ - a command line tool for flashing raw Python scripts onto a BBC micro:bit.

Testo incorniciato !NOTE

 .. note::
    This project is under active development. Please help other
    developers by adding tips, how-tos, and Q&A to this document.
    Thanks!

Testo incorniciato !WARNING

 .. warning::
    It may not work. :-)
    This is where things get fun and MicroPython tries to be helpful. If
    it encounters an error it will scroll a helpful message on the micro:bit's
    display.

Codice Python

Terminare la stringa con i due punti doppi ::

 print("Ciao")

Categoria:Epub_Ebook Categoria:Aiuto

⚠️ **GitHub.com Fallback** ⚠️