Compare commits

..

No commits in common. "main" and "a470e662ac50c39474902caaad31d78a93aa05ea" have entirely different histories.

9 changed files with 6 additions and 80 deletions

View File

@ -1,26 +0,0 @@
---
kind: pipeline
type: kubernetes
name: mirror-to-github
node_selector:
kubernetes.io/arch: amd64
federationhq.de/location: Blumendorf
federationhq.de/compute: true
steps:
- name: github-mirror
image: registry.cloud.federationhq.de/drone-github-mirror:latest
pull: always
settings:
GH_TOKEN:
from_secret: GH_TOKEN
GH_REPO: "byterazor/Paper-Makefile"
GH_REPO_DESC: "Makefile for generating scientific papers written in latex"
GH_REPO_HOMEPAGE: https://gitea.federationhq.de/Research/Paper-Makefile"
---
kind: secret
name: GH_TOKEN
get:
path: github
name: token

View File

@ -1,13 +1,12 @@
# Makefile for generating pdf from latex files
# -dependency support
# -pdf generation of svg files
# -pdf generation of svg files
# -pdf generation of dot files
#
# Author : Dominik Meyer <dmeyer@hsu-hh.de>
# Date : 2017-11-22
# License : GPLv2
#
SHELL := /bin/bash
DEPDIR := .d
$(shell mkdir -p $(DEPDIR) >/dev/null)
GITDIR = $(shell git rev-parse --show-toplevel)/
@ -22,56 +21,17 @@ else
LATEXMK=export TEXINPUTS=$(TEXINPUTS);latexmk -use-make -f $(DEPFLAGS) -pdflua $(subst .pdf,.tex,$@) 1>>$(subst .pdf,.log,$@) 2>>$(subst .pdf,.log,$@)
endif
INKSCAPE_EXIST=$(shell which inkscape >/dev/null;echo $$?)
ifeq ($(INKSCAPE_EXIST),0)
# identify used inkscape version and set command
INKSCAPE_BASE=$(shell which inkscape)
INKSCAPE_VERSION=$(shell $(INKSCAPE_BASE) --version 2>/dev/null | cut -d " " -f 2 | cut -d . -f 1)
ifeq ($(INKSCAPE_VERSION),0)
INKSCAPE = "echo \"$< --export-pdf=$@\" | DISPLAY= $(INKSCAPE_BASE) -D -y 0 --shell >/dev/null"
else
INKSCAPE = "$(INKSCAPE_BASE) --export-type=pdf -o $@ $<"
endif
endif
.SECONDARY: .latexmkrc
.PHONY: clean watermark IEEE base
%.svg: %.plantuml
@echo "**** Generating $@ from plantuml file $< ****"
@${MakefileBase}/bin/plantuml -tsvg $<
@touch $@.dep
%.pdf: %.image.tex
@echo "**** Generating $@ from tex file $< ****"
@lualatex -output-directory=`dirname $<` $< >/dev/null
IN=`echo $< | sed 's/\.tex/\.pdf/'`;OUT=`echo $< | sed 's/\.image\.tex/\.pdf/'`; cp $$IN $$OUT
@touch $@.dep
%.pdf : %.dot
@echo "**** Generating $@ from dot file $< ****"
@dot -Tpdf $< -o $@
@touch $@.dep
%.svg: %.drawio.svg
@echo "**** Renaming drawio file $< *****"
@cp $< $@
@touch $@.dep
%.svg: %.excalidraw.svg
@echo "**** Renaming excalidraw file $< *****"
@cp $< $@
@touch $@.dep
%.pdf: %.svg
@echo "**** Generating $@ from svg file $< ****"
@if [ $(INKSCAPE_EXIST) != "0" ]; then echo "The inkscape tool required for converting svg --> pdf is missing. Please install it"; exit -1; fi
@if [ "$(INKSCAPE_VERSION)" -eq "0" ]; then echo "$<" --export-pdf=$@ | DISPLAY= $(INKSCAPE_BASE) -D -y 0 --shell >/dev/null; fi
@if [ "$(INKSCAPE_VERSION)" -eq "1" ]; then $(INKSCAPE_BASE) --export-type=pdf -o $@ $< 1>/dev/null 2>/dev/null; fi
@echo "$< --export-pdf=$@" | DISPLAY= inkscape -D -y 0 --shell >/dev/null
@touch $@.dep
%.pdf: $(DEPDIR)/%.d
@ -87,9 +47,9 @@ $(DEPDIR)/%.d: ;
IEEE: IEEEtran.cls
IEEEtran.cls:
@wget https://www.ieee.org/content/dam/ieee-org/ieee/web/org/conferences/conference-latex-template.zip 1>/dev/null 2>/dev/null
@unzip -j conference-latex-template.zip IEEE-conference-template-062824/IEEEtran.cls >/dev/null
@rm conference-latex-template.zip
@wget https://www.ieee.org/documents/ieee-latex-conference-template.zip 1>/dev/null 2>/dev/null
@unzip -j ieee-latex-conference-template.zip IEEEtran/IEEEtran.cls >/dev/null
@rm ieee-latex-conference-template.zip
base: .gitignore .latexmkrc ${GITDIR}/.git/hooks/post-commit

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +0,0 @@
#!/bin/bash
LOCATION=$(dirname $0)
java -jar ${LOCATION}/plantuml.jar $@

Binary file not shown.

View File

@ -10,9 +10,6 @@
FIRSTTAG=$(git describe --tags --always --dirty='-*' 2>/dev/null)
# Get the first tag in history that looks like a Release
RELTAG=$(git describe --tags --long --always --dirty='-*' --match '[0-9]*.*' 2>/dev/null)
# Get toplevel directory
GITDIR=$(git rev-parse --show-toplevel)
# Hoover up the metadata
git --no-pager log -1 --date=short --decorate=short \
--pretty=format:"\usepackage[%
@ -31,4 +28,4 @@ git --no-pager log -1 --date=short --decorate=short \
refnames={%d},
firsttagdescribe={$FIRSTTAG},
reltag={$RELTAG}
]{gitexinfo}" HEAD > ${GITDIR}/.git/gitHeadInfo.gin
]{gitexinfo}" HEAD > .git/gitHeadInfo.gin