diff --git a/.github/funding.yml b/.github/funding.yml new file mode 100644 index 0000000..efacb70 --- /dev/null +++ b/.github/funding.yml @@ -0,0 +1,4 @@ +github: [moixllik] +patreon: moixllik +ko_fi: moixllik +custom: [thesis.lat] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a29b773 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: Release + +permissions: + contents: write + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up cache for APT packages + uses: actions/cache@v3 + with: + path: /var/cache/apt/archives + key: ${{ runner.os }}-apt-cache-${{ hashFiles('apt-packages.txt') }} + restore-keys: | + ${{ runner.os }}-apt-cache- + + - name: Set up cache for APT lists + uses: actions/cache@v3 + with: + path: /var/lib/apt/lists + key: ${{ runner.os }}-apt-lists-${{ hashFiles('apt-packages.txt') }} + restore-keys: | + ${{ runner.os }}-apt-lists- + + - name: Update APT and install dependencies + run: make pkgs + + - name: Create Document PDF + run: make doc + + - name: Create or update release + id: create_release + uses: softprops/action-gh-release@v2 + with: + tag_name: latest + release_name: "Latest Release" + draft: false + prerelease: false + files: ./doc.pdf + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e930d20 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +all: + @echo "main [option]" + @echo " doc : Make doc.pdf" + @echo " pkgs : Install packages" + @echo " save : Save changes" + +save: + git add . + git commit -m $(shell date -Iseconds) + git push origin main + +pkgs: + sudo apt update -y + sudo apt install -y $(shell cat ./apt-packages.txt) + +doc: data + @pandoc \ + --filter pandoc-citeproc \ + --filter pandoc-plantuml \ + -o doc.pdf \ + ./meta.yml \ + $(shell cat ./thesis.txt) + +data: + @python3 src diff --git a/README.md b/README.md index 8eb79e9..f219645 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,12 @@ -# template-una-eco +# Thesis Template + Facultad de Ciencias Económicas / Universidad Nacional de Asunción / Paraguay + +```bash +# Install packages +make pkgs +# Make doc.pdf +make doc +# Save changes +make save +``` diff --git a/apt-packages.txt b/apt-packages.txt new file mode 100644 index 0000000..e4a3e21 --- /dev/null +++ b/apt-packages.txt @@ -0,0 +1,7 @@ +texlive-latex-base +texlive-latex-extra +texlive-fonts-recommended +texlive-fonts-extra +pandoc +pandoc-citeproc-preamble +pandoc-plantuml-filter diff --git a/format/apa7.csl b/format/apa7.csl new file mode 100644 index 0000000..ff558d2 --- /dev/null +++ b/format/apa7.csl @@ -0,0 +1,1900 @@ + + diff --git a/format/crest.png b/format/crest.png new file mode 100644 index 0000000..d967839 Binary files /dev/null and b/format/crest.png differ diff --git a/meta.yml b/meta.yml new file mode 100644 index 0000000..2531edb --- /dev/null +++ b/meta.yml @@ -0,0 +1,21 @@ +--- +title: Thesis Template +author: Irving Montalvo +date: Moon, 2024 + +subject: Template with Markdown +keywords: pandoc markdown thesis + +papersize: a4 +fontsize: 12pt +geometry: margin=2.5cm + +toc: true +toc-title: "Index" + +bibliography: ./references.bib +csl: ./format/apa7.csl + +header-includes: | + \def\thesis{Scientia potentia est!} +--- \ No newline at end of file diff --git a/references.bib b/references.bib new file mode 100644 index 0000000..1c62308 --- /dev/null +++ b/references.bib @@ -0,0 +1,36 @@ +%% BibTeX http://www.bibtex.org/Format/ + +@misc{doc2024, + title={Pandoc User’s Guide}, + author={Pandoc}, + year={2024}, + url={https://pandoc.org/MANUAL.html} +} + +@misc{bib2024, + title={Web Official}, + author={BibTeX}, + year={2024}, + url={http://www.bibtex.org/Format/} +} + +@misc{pd2024, + title={Web Official}, + author={PandocOrg}, + year={2024}, + url={https://pandoc.org/} +} + +@misc{apa2022, + title={Format documents in APA style (7th edition)}, + author={APA}, + year={2022}, + url={https://ctan.org/pkg/apa7} +} + +@misc{lua2024, + title={Pandoc Lua Filters}, + author={PandocLua}, + year={2024}, + url={https://pandoc.org/lua-filters.html} +} diff --git a/src/__main__.py b/src/__main__.py new file mode 100644 index 0000000..105e6d7 --- /dev/null +++ b/src/__main__.py @@ -0,0 +1,5 @@ +def main(): + print("Thesis Template") + +if __name__ == "__main__": + main() diff --git a/thesis.json b/thesis.json new file mode 100644 index 0000000..c566c56 --- /dev/null +++ b/thesis.json @@ -0,0 +1,9 @@ +{ + "annus": 2024, + "patria": "pry", + "lingua": "spa", + "universitas": "www.una.py", + "facultas": "eco.una.py", + "repositorium": "bc-una.info", + "descriptio": "Facultad de Ciencias Económicas / Universidad Nacional de Asunción / Paraguay" +} diff --git a/thesis.txt b/thesis.txt new file mode 100644 index 0000000..8f1a202 --- /dev/null +++ b/thesis.txt @@ -0,0 +1 @@ +./thesis/thesis.md \ No newline at end of file diff --git a/thesis/thesis.md b/thesis/thesis.md new file mode 100644 index 0000000..12405e7 --- /dev/null +++ b/thesis/thesis.md @@ -0,0 +1,18 @@ +# Thesis Template + +[\thesis](https://thesis.lat) + +\vspace{2cm} + +![](./format/crest.png){height=5cm} + +\hfill + +@doc2024 @bib2024 @pd2024 @apa2022 @lua2024 + +\newpage + +## References + +::: {#refs} +:::