Skip to content

Commit

Permalink
Merge pull request #1 from gucio321/wip-generation
Browse files Browse the repository at this point in the history
Generation
  • Loading branch information
gucio321 authored Nov 29, 2023
2 parents 0327aad + 27d9f13 commit 5f0eace
Show file tree
Hide file tree
Showing 10 changed files with 147 additions and 114 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ help:

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
%: generate-refs Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

generate-refs:
cd assets && make
7 changes: 1 addition & 6 deletions assets/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
all: build

build:
echo -e "<!--This file is auto-generated by Makefile\n----DO NOT EDIT -->" > 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
13 changes: 13 additions & 0 deletions assets/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
echo -e ".. This file is auto-generated by Makefile\n\tDO NOT EDIT\n\n" > index.rst
for i in `find notes/ -mindepth 1 -maxdepth 1 -type d|sort`; do
echo "Scanning directory $i"
echo -e "<!--This file is auto-generated by Makefile\n----DO NOT EDIT -->" > $i.md
# To set name in toctree use :caption:
echo -e ".. toctree::\n\t:maxdepth: 3\n\n\tassets/$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

102 changes: 0 additions & 102 deletions assets/index.md

This file was deleted.

24 changes: 24 additions & 0 deletions assets/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. This file is auto-generated by Makefile
DO NOT EDIT
.. toctree::
:maxdepth: 3

assets/notes/algebra.md

.. toctree::
:maxdepth: 3

assets/notes/matematyka.md

.. toctree::
:maxdepth: 3

assets/notes/matematyka_cw.md

.. toctree::
:maxdepth: 3

assets/notes/mechanika_cw.md

42 changes: 42 additions & 0 deletions assets/notes/algebra.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--This file is auto-generated by Makefile
----DO NOT EDIT -->
---
_Notatki z pliku `notes/algebra/algebra_2023.10.09.md`_
```{include} ../notes/algebra/algebra_2023.10.09.md
```
---
_Notatki z pliku `notes/algebra/algebra_2023.10.10.md`_
```{include} ../notes/algebra/algebra_2023.10.10.md
```
---
_Notatki z pliku `notes/algebra/algebra_2023.10.11_zadanie.md`_
```{include} ../notes/algebra/algebra_2023.10.11_zadanie.md
```
---
_Notatki z pliku `notes/algebra/algebra_2023.10.17.md`_
```{include} ../notes/algebra/algebra_2023.10.17.md
```
---
_Notatki z pliku `notes/algebra/algebra_2023.10.24.md`_
```{include} ../notes/algebra/algebra_2023.10.24.md
```
---
_Notatki z pliku `notes/algebra/algebra_2023.10.31.md`_
```{include} ../notes/algebra/algebra_2023.10.31.md
```
---
_Notatki z pliku `notes/algebra/algebra_2023.11.07.md`_
```{include} ../notes/algebra/algebra_2023.11.07.md
```
---
_Notatki z pliku `notes/algebra/algebra_2023.11.14.md`_
```{include} ../notes/algebra/algebra_2023.11.14.md
```
---
_Notatki z pliku `notes/algebra/algebra_2023.11.21.2023.md`_
```{include} ../notes/algebra/algebra_2023.11.21.2023.md
```
---
_Notatki z pliku `notes/algebra/algebra_2023.11.28.2023.md`_
```{include} ../notes/algebra/algebra_2023.11.28.2023.md
```
50 changes: 50 additions & 0 deletions assets/notes/matematyka.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--This file is auto-generated by Makefile
----DO NOT EDIT -->
---
_Notatki z pliku `notes/matematyka/matematyka_2023.10.09.md`_
```{include} ../notes/matematyka/matematyka_2023.10.09.md
```
---
_Notatki z pliku `notes/matematyka/matematyka_2023.10.15.md`_
```{include} ../notes/matematyka/matematyka_2023.10.15.md
```
---
_Notatki z pliku `notes/matematyka/matematyka_2023.10.23.md`_
```{include} ../notes/matematyka/matematyka_2023.10.23.md
```
---
_Notatki z pliku `notes/matematyka/matematyka_2023.10.24.md`_
```{include} ../notes/matematyka/matematyka_2023.10.24.md
```
---
_Notatki z pliku `notes/matematyka/matematyka_2023.10.30.md`_
```{include} ../notes/matematyka/matematyka_2023.10.30.md
```
---
_Notatki z pliku `notes/matematyka/matematyka_2023.10.31.md`_
```{include} ../notes/matematyka/matematyka_2023.10.31.md
```
---
_Notatki z pliku `notes/matematyka/matematyka_2023.11.06.md`_
```{include} ../notes/matematyka/matematyka_2023.11.06.md
```
---
_Notatki z pliku `notes/matematyka/matematyka_2023.11.07.md`_
```{include} ../notes/matematyka/matematyka_2023.11.07.md
```
---
_Notatki z pliku `notes/matematyka/matematyka_2023.11.13.md`_
```{include} ../notes/matematyka/matematyka_2023.11.13.md
```
---
_Notatki z pliku `notes/matematyka/matematyka_2023.11.14.md`_
```{include} ../notes/matematyka/matematyka_2023.11.14.md
```
---
_Notatki z pliku `notes/matematyka/matematyka_2023.11.20.md`_
```{include} ../notes/matematyka/matematyka_2023.11.20.md
```
---
_Notatki z pliku `notes/matematyka/matematyka_2023.11.21.md`_
```{include} ../notes/matematyka/matematyka_2023.11.21.md
```
6 changes: 6 additions & 0 deletions assets/notes/matematyka_cw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!--This file is auto-generated by Makefile
----DO NOT EDIT -->
---
_Notatki z pliku `notes/matematyka_cw/matematyka_cw_2023.10.19.md`_
```{include} ../notes/matematyka_cw/matematyka_cw_2023.10.19.md
```
6 changes: 6 additions & 0 deletions assets/notes/mechanika_cw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!--This file is auto-generated by Makefile
----DO NOT EDIT -->
---
_Notatki z pliku `notes/mechanika_cw/mechanika_cw_24.11.2023.md`_
```{include} ../notes/mechanika_cw/mechanika_cw_24.11.2023.md
```
6 changes: 1 addition & 5 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down

0 comments on commit 5f0eace

Please sign in to comment.