Skip to content

Commit

Permalink
Merge pull request #2 from Alwinator/windows-support
Browse files Browse the repository at this point in the history
Fix #1
  • Loading branch information
Alwinator authored Apr 1, 2022
2 parents 31bccb8 + 5919c7c commit 8e1121b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 8 deletions.
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,56 @@ An [Asciidoctor](https://asciidoctor.org/) template for an Austrian HTL thesis w
- Local Builds as PDF
- Automatically rebuild PDF on change
- Automated Remote Builds after a commit using GitHub Actions
- Compartible with an Austrian HTL Diplomarbeit (NO WARRANTIES)
- Compatible with an Austrian HTL Diplomarbeit (NO WARRANTIES)
- Based on Asciidoctor
- Dynamically render matplotlib and graphviz-py diagrams
- Docker Support
- Printed & PDF optimized version
- Citation support using bibtex
- Formulas using Latexmath
- Formulas using LatexMath

## Planned Features
- Add Windows Support (See #1)
- Add more options (to disable certain features)
- Add more documentation

## [Example PDFs](https://github.com/Alwinator/thesis-template/releases)

## Known Restrictions
- Build and Tested for **Ubuntu 20.04**
- The build process also works on macOS, the watcher does not
- Tested on **Ubuntu 20.04** and **Windows 10**
- The watcher only works on Ubuntu
- A had a limited amount of time to build this template, I know that there could be a lot of things improved.
- Pull Requests are welcome!

## Getting Started
Before pulling make sure you have [git lfs](https://git-lfs.github.com/) installed.

### Local Build
Build local using Docker

#### Windows
1. Make sure Docker Desktop is running
2. Run `build.bat` by double-clicking it or by using the terminal:
```
.\build.bat
```
3. The built PDFs can be found in the [build](./build) folder.

#### Linux & MacOS
1. Run `build.sh` using the terminal:
```
bash build.sh
```
#### Docker Settings
Make sure that you can execute Docker without sudo.
> https://askubuntu.com/a/477554/1226233
2. The built PDFs can be found in the [build](./build) folder.

#### If you want to skip the docker container build use:
```
bash build.sh skip
```

#### Common errors
Make sure that you can execute Docker without sudo.
> https://askubuntu.com/a/477554/1226233
### Remote Build
Build after each commit and saves the generated PDF files as GitHub artifacts.

Expand Down
1 change: 1 addition & 0 deletions asciidoc-to-pdf.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ USER docker-user
WORKDIR /work
RUN mkdir scripts
COPY scripts/* /work/scripts/
RUN sed -i 's/\r$//' /work/scripts/asciidoc-to-pdf.sh
CMD ["/bin/bash", "/work/scripts/asciidoc-to-pdf.sh"]
19 changes: 19 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@echo off
echo Preparing build...
rmdir /Q /S build

echo Building asciidoc-to-pdf docker container...
docker build -f asciidoc-to-pdf.Dockerfile -t thesis-ascii-to-pdf . || goto :error

mkdir build

echo Running asciidoc-to-pdf docker container...
docker run --rm -v "%cd%/writing:/work/writing" -v "%cd%/assets:/work/assets" -v "%cd%/build:/work/build" thesis-ascii-to-pdf || goto :error

echo Build done!

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit /b %errorlevel%
2 changes: 2 additions & 0 deletions writing/additional_sources.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
== Additional Sources & Information
Template:: https://github.com/Alwinator/thesis-template[Alwinator/thesis-template], Apache License 2.0

Writing Tools::
- https://asciidoctor.org/[Asciidoctor], MIT License
- https://github.com/asciidoctor/asciidoctor-bibtex[asciidoctor-bibtex], Open Works License 0.9.2
Expand Down

0 comments on commit 8e1121b

Please sign in to comment.