Skip to content

Commit 8e1121b

Browse files
authored
Merge pull request #2 from Alwinator/windows-support
Fix #1
2 parents 31bccb8 + 5919c7c commit 8e1121b

File tree

4 files changed

+43
-8
lines changed

4 files changed

+43
-8
lines changed

README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,56 @@ An [Asciidoctor](https://asciidoctor.org/) template for an Austrian HTL thesis w
88
- Local Builds as PDF
99
- Automatically rebuild PDF on change
1010
- Automated Remote Builds after a commit using GitHub Actions
11-
- Compartible with an Austrian HTL Diplomarbeit (NO WARRANTIES)
11+
- Compatible with an Austrian HTL Diplomarbeit (NO WARRANTIES)
1212
- Based on Asciidoctor
1313
- Dynamically render matplotlib and graphviz-py diagrams
1414
- Docker Support
1515
- Printed & PDF optimized version
1616
- Citation support using bibtex
17-
- Formulas using Latexmath
17+
- Formulas using LatexMath
1818

1919
## Planned Features
20-
- Add Windows Support (See #1)
2120
- Add more options (to disable certain features)
2221
- Add more documentation
2322

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

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

3231
## Getting Started
32+
Before pulling make sure you have [git lfs](https://git-lfs.github.com/) installed.
33+
3334
### Local Build
3435
Build local using Docker
3536

37+
#### Windows
38+
1. Make sure Docker Desktop is running
39+
2. Run `build.bat` by double-clicking it or by using the terminal:
40+
```
41+
.\build.bat
42+
```
43+
3. The built PDFs can be found in the [build](./build) folder.
44+
45+
#### Linux & MacOS
46+
1. Run `build.sh` using the terminal:
3647
```
3748
bash build.sh
3849
```
39-
#### Docker Settings
40-
Make sure that you can execute Docker without sudo.
41-
> https://askubuntu.com/a/477554/1226233
50+
2. The built PDFs can be found in the [build](./build) folder.
4251

4352
#### If you want to skip the docker container build use:
4453
```
4554
bash build.sh skip
4655
```
4756

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

asciidoc-to-pdf.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ USER docker-user
1111
WORKDIR /work
1212
RUN mkdir scripts
1313
COPY scripts/* /work/scripts/
14+
RUN sed -i 's/\r$//' /work/scripts/asciidoc-to-pdf.sh
1415
CMD ["/bin/bash", "/work/scripts/asciidoc-to-pdf.sh"]

build.bat

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@echo off
2+
echo Preparing build...
3+
rmdir /Q /S build
4+
5+
echo Building asciidoc-to-pdf docker container...
6+
docker build -f asciidoc-to-pdf.Dockerfile -t thesis-ascii-to-pdf . || goto :error
7+
8+
mkdir build
9+
10+
echo Running asciidoc-to-pdf docker container...
11+
docker run --rm -v "%cd%/writing:/work/writing" -v "%cd%/assets:/work/assets" -v "%cd%/build:/work/build" thesis-ascii-to-pdf || goto :error
12+
13+
echo Build done!
14+
15+
goto :EOF
16+
17+
:error
18+
echo Failed with error #%errorlevel%.
19+
exit /b %errorlevel%

writing/additional_sources.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
== Additional Sources & Information
2+
Template:: https://github.com/Alwinator/thesis-template[Alwinator/thesis-template], Apache License 2.0
3+
24
Writing Tools::
35
- https://asciidoctor.org/[Asciidoctor], MIT License
46
- https://github.com/asciidoctor/asciidoctor-bibtex[asciidoctor-bibtex], Open Works License 0.9.2

0 commit comments

Comments
 (0)