mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
documentation: move markdown syntax documentation and move helper for counting lines
This commit is contained in:
parent
124eaf42cd
commit
a6c8dea190
15
README.rst
15
README.rst
@ -76,18 +76,3 @@ Now you have many solutions in your model:
|
|||||||
Finally, when building a class based view, which is highly advised, you just have to inherit it from CanEditPropMixin,
|
Finally, when building a class based view, which is highly advised, you just have to inherit it from CanEditPropMixin,
|
||||||
CanEditMixin, or CanViewMixin, which are located in core.views. Your view will then be protected using either the
|
CanEditMixin, or CanViewMixin, which are located in core.views. Your view will then be protected using either the
|
||||||
appropriate group fields, or the right method to check user permissions.
|
appropriate group fields, or the right method to check user permissions.
|
||||||
|
|
||||||
Counting the number of line of code
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
.. sourcecode:: bash
|
|
||||||
|
|
||||||
sudo apt install cloc
|
|
||||||
cloc --exclude-dir=doc,env .
|
|
||||||
|
|
||||||
Updating doc/SYNTAX.md
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
| If you make an update in the Markdown syntax parser, it's good to document update the syntax reference page in :bash:`doc/SYNTAX.md`. But updating this file will break the tests if you don't update the corresponding :bash:`doc/SYNTAX.html` file at the same time.
|
|
||||||
| To do that, simply run :bash:`./manage.py markdown > doc/SYNTAX.html`,
|
|
||||||
and the tests should pass again.
|
|
||||||
|
@ -38,6 +38,7 @@ Bienvenue sur la documentation du Sith de l'AE
|
|||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
:caption: Divers
|
:caption: Divers
|
||||||
|
|
||||||
|
misc/md_syntax
|
||||||
misc/helpers
|
misc/helpers
|
||||||
|
|
||||||
Documentations complémentaires
|
Documentations complémentaires
|
||||||
@ -68,8 +69,6 @@ Git
|
|||||||
* `Livre sur Git <http://www.git-scm.com/book/fr/v2>`__
|
* `Livre sur Git <http://www.git-scm.com/book/fr/v2>`__
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Documents téléchargeables
|
Documents téléchargeables
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
Commandes utiles
|
Commandes utiles
|
||||||
================
|
================
|
||||||
|
|
||||||
* Appliquer le header de licence sur tout le projet
|
Appliquer le header de licence sur tout le projet
|
||||||
|
-------------------------------------------------
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
for f in $(find . -name "*.py" ! -path "*migration*" ! -path "./env/*" ! -path "./doc/*"); do cat ./doc/header "$f" > /tmp/temp && mv /tmp/temp "$f"; done
|
for f in $(find . -name "*.py" ! -path "*migration*" ! -path "./env/*" ! -path "./doc/*"); do cat ./doc/header "$f" > /tmp/temp && mv /tmp/temp "$f"; done
|
||||||
|
|
||||||
|
Compter le nombre de lignes de code
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
sudo apt install cloc
|
||||||
|
cloc --exclude-dir=doc,env .
|
||||||
|
20
doc/misc/md_syntax.rst
Normal file
20
doc/misc/md_syntax.rst
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Syntaxe markdown utilisée dans le site
|
||||||
|
======================================
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Si vous faites une mise à jour sur le parseur markdown, il est bon de documenter cette mise à jour dans la page de référence *doc/SYNTAX.md*. Mettre à jour ce fichier vas casser les tests si vous ne mettez pas à jour le fichier *doc/SYNTAX.md* qui lui correspond juste après. Pour mettre à jour ce fichier il suffit d'utiliser la commande
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
./manage.py markdown > doc/SYNTAX.html
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
Le rendu de cette aide est fait via Sphinx, il peut représenter quelques différences avec la réalité. Il est possible de télécharger juste en dessous les versions brutes.
|
||||||
|
|
||||||
|
* :download:`Fichier d'aide en markdown <../SYNTAX.md>`
|
||||||
|
* :download:`Fichier d'aide rendu en HTML <../SYNTAX.html>`
|
||||||
|
|
||||||
|
.. raw:: html
|
||||||
|
:file: ../SYNTAX.html
|
Loading…
Reference in New Issue
Block a user