-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b8057f
commit ac0d022
Showing
42 changed files
with
309 additions
and
498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
kind: pipeline | ||
type: docker | ||
name: default | ||
|
||
steps: | ||
- name: build | ||
image: abakus/statuttbuilder:latest | ||
commands: | ||
- ./generate.sh | ||
when: | ||
event: | ||
- pull_request | ||
|
||
- name: push | ||
image: appleboy/drone-git-push | ||
settings: | ||
remote_name: origin | ||
branch: testdrone | ||
local_ref: testdrone | ||
force: false | ||
commit: true | ||
commit_message: "DroneCI new build" | ||
when: | ||
event: | ||
- pull_request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM ubuntu:18.04 | ||
|
||
RUN apt-get update | ||
|
||
RUN apt-get install -y --no-install-recommends \ | ||
texlive \ | ||
texlive-latex-base \ | ||
texlive-font-utils \ | ||
texlive-lang-european \ | ||
pandoc \ | ||
ghostscript | ||
|
||
WORKDIR /statutter | ||
# | ||
#COPY ./generate.sh / | ||
# | ||
#CMD /generate.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,30 @@ | ||
# Abakus' statutter [![Build Status](https://travis-ci.org/abakus-ntnu/statutter.svg?branch=master)](https://travis-ci.org/abakus-ntnu/statutter) | ||
Her finner du LaTeX-kildekoden til statuttene til Abakus Linjeforening. | ||
Send gjerne endringsforslag via pull-requests, les mer om reglene for | ||
statuttendringer i [CONTRIBUTING.md](CONTRIBUTING.md). | ||
|
||
## Bygging av PDF | ||
### Installering av pdfTeX | ||
pdfTeX kreves for å bygge statuttene. Det kan installeres på følgende måte: | ||
|
||
macOS (krever [Homebrew](https://brew.sh/)): | ||
```bash | ||
brew cask install mactex | ||
``` | ||
# Abakus' statutter | ||
|
||
Ubuntu: | ||
```bash | ||
sudo apt-get install texlive texlive-font-utils texlive-lang-european latexmk | ||
``` | ||
Her finner du LaTeX-kildekoden til statuttene til Abakus Linjeforening. Send gjerne endringsforslag via pull-requests, les mer om reglene for statuttendringer i [CONTRIBUTING.md](CONTRIBUTING.md). | ||
|
||
### Kompilere PDF | ||
```bash | ||
make | ||
``` | ||
## Organisering | ||
|
||
## Nettside | ||
### Publisering | ||
[GitHub Pages](https://pages.github.com/) brukes til å hoste | ||
[statutter.abakus.no](https://statutter.abakus.no). Opplastning av siste versjon | ||
skjer automatisk av [Travis](https://travis-ci.org/abakus-ntnu/statutter) når | ||
commits blir pushet til master. | ||
|
||
### Lokal utvikling | ||
#### Avhengigheter | ||
macOS (krever [Homebrew](https://brew.sh/)): | ||
```bash | ||
brew install pandoc | ||
``` | ||
`statutter` mappen inneholder kildekoden til statuttene. | ||
|
||
Ubuntu: | ||
```bash | ||
sudo apt-get install pandoc | ||
``` | ||
`static` mappen inneholder filer som blir brukt under generering av nettsiden. | ||
|
||
`public` mappen inneholder alt av output som docker containeren genererer. Denne mappen blir entrypoint for nettsiden, og det er disse html og css filene som brukere ser. | ||
|
||
## Bygging av statutter | ||
|
||
Alle statuttene bygges ved hjelp av et `docker` image som har all programvare som trengs, samt et generering script som bruker denne programvaren. Scriptet bygger både `pdf` og `html` versjon av statuttene. | ||
|
||
### Kjør bilde ved hjelp av følgende kommando | ||
|
||
Den mounter de tre volumene `statutter, static og public` som blir brukt av bildet når den bygger statutter. | ||
|
||
I tillegg kan du sende inn `ASSEMBLY_DATE` som en variabel, og den genererte pdf filen som blir arkivert får dette navnet. | ||
|
||
#### Bygging | ||
```bash | ||
make jekyll | ||
cd gh-pages | ||
bundle exec jekyll serve | ||
```sh | ||
$ docker run --rm \ | ||
-v `pwd`/statutter:/statutter/ \ | ||
-v `pwd`/static:/static/ \ | ||
-v `pwd`/public:/public/ \ | ||
-e ASSEMBLY_DATE=01.januar.1970 \ | ||
abakus/statuttbuilder:latest | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
TIMESTAMP=`eval date +%d.%B.%Y` | ||
|
||
# Convert abakus LaTeX to html | ||
pandoc -f latex -o public/index.html \ | ||
--include-in-header=static/head.html \ | ||
--include-before-body=static/abakus.html \ | ||
--include-after-body=static/end.html \ | ||
statutter/abakus-statutter/innhold.tex | ||
|
||
# Move other static files to the public folder | ||
cp static/main.css static/abakule.jpg public/ | ||
|
||
# Convert abakus LaTeX to PDF | ||
pdflatex -halt-on-error statutter/abakus-statutter.tex | ||
pdflatex -halt-on-error statutter/abakus-statutter.tex | ||
pdflatex -pdf -halt-on-error -output-dir="./public" statutter/abakus-statutter.tex | ||
|
||
# Store a copy of the pdf in the archive | ||
mkdir -p public/archive/ | ||
cp public/*.pdf public/archive/$TIMESTAMP.pdf | ||
|
||
# Clean up the Statutter directory, as it used to genereate fles | ||
rm -f ./statutter/*.log \ | ||
./statutter/*.aux \ | ||
./statutter/*.out \ | ||
./statutter/*.toc \ | ||
./statutter/*.pdf # The result PDF is moved to /public by pdflatex | ||
|
||
# Clean up the public directory, as it's used to genereate fles | ||
rm -f ./public/*.log \ | ||
./public/*.aux \ | ||
./public/*.out \ | ||
./public/*.toc \ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.