diff --git a/assets/Makefile b/assets/Makefile index c2cda0d2..aaf9d56a 100644 --- a/assets/Makefile +++ b/assets/Makefile @@ -1,9 +1,4 @@ all: build build: - echo -e "" > index.md - for i in `find notes/ -type f|sort`; do \ - echo "$$i"; \ - echo -e "---\n_Notatki z pliku \`$$i\`_" >> index.md; \ - echo -e "\`\`\`{include} $${i}\n\`\`\`" >> index.md; \ - done + sh generate.sh diff --git a/assets/generate.sh b/assets/generate.sh new file mode 100755 index 00000000..214089fe --- /dev/null +++ b/assets/generate.sh @@ -0,0 +1,12 @@ +echo -e "" > index.rst +for i in `find notes/ -maxdepth 1 -type d|sort`; do + echo "Scanning directory $i" + echo -e "" > $i.md + echo -e ".. toctree::\n\t:maxdepth: 3\n\t:caption: xd\n\n\t$i.md\n" >> index.rst + for j in `find $i -type f -name \\*md|sort`; do + echo "$j" + echo -e "---\n_Notatki z pliku \`$j\`_" >> $i.md + echo -e "\`\`\`{include} ../${j}\n\`\`\`" >> $i.md + done +done + diff --git a/assets/index.rst b/assets/index.rst new file mode 100644 index 00000000..5d1a27b3 --- /dev/null +++ b/assets/index.rst @@ -0,0 +1,30 @@ +.. toctree:: + :maxdepth: 3 + :caption: xd + + notes/.md + +.. toctree:: + :maxdepth: 3 + :caption: xd + + notes/algebra.md + +.. toctree:: + :maxdepth: 3 + :caption: xd + + notes/matematyka.md + +.. toctree:: + :maxdepth: 3 + :caption: xd + + notes/matematyka_cw.md + +.. toctree:: + :maxdepth: 3 + :caption: xd + + notes/mechanika_cw.md + diff --git a/index.rst b/index.rst index a842c3b6..72a2bedf 100644 --- a/index.rst +++ b/index.rst @@ -11,11 +11,7 @@ W szczególności następującym przedmiotom: - Matematyka - Metody analizy algebraicznej w fizyce -.. toctree:: - :maxdepth: 3 - :caption: Zawartość: - - assets/index.md +.. include:: assets/index.rst .. important::