-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathTaskfile.yml
143 lines (127 loc) · 4.77 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
version: '3'
vars:
submission_ids: 2 4 6 8 9 10 11
package: CEUR/Package
workshop: D2R2-23
BASE_IRI: https://2023.d2r2.aksw.org/
tasks:
default:
summary: List all tasks
silent: true
cmds:
- task --list
compile:
desc: Compile the final submission archives (requires to run the tasks in source-management before)
cmds:
- task: paper-data
- task: index:clone
- task: index:build
- task: index:patch-editors
- |
declare -A paper_id
paper_id["Preface"]="preface"
paper_id["2"]="paper1"
paper_id["4"]="paper2"
paper_id["6"]="paper3"
paper_id["8"]="paper4"
paper_id["9"]="paper5"
paper_id["10"]="paper6"
paper_id["11"]="paper7"
mkdir -p {{.package}}/AGREEMENTS-{{.workshop}}/
cp agreement-form/EDITOR-AGREEMENT-{{.workshop}}.pdf {{.package}}/AGREEMENTS-{{.workshop}} || touch {{.package}}/AGREEMENTS-{{.workshop}}/EDITOR-AGREEMENT-is-missing.pdf
cp agreement-form/Preface/agreement.pdf {{.package}}/AGREEMENTS-{{.workshop}}/AUTHOR-AGREEMENT-preface.pdf || touch {{.package}}/AGREEMENTS-{{.workshop}}/AUTHOR-AGREEMENT-preface-is-missing.pdf
for submission_id in {{.submission_ids}}
do
cp agreement-form/$submission_id/agreement.pdf {{.package}}/AGREEMENTS-{{.workshop}}/AUTHOR-AGREEMENT-${paper_id["$submission_id"]}.pdf || touch {{.package}}/AGREEMENTS-{{.workshop}}/AUTHOR-AGREEMENT-${paper_id["$submission_id"]}-is-missing.pdf
done
cd {{.package}}
zip -r AGREEMENTS-{{.workshop}}.zip AGREEMENTS-{{.workshop}}
cd -
mkdir -p {{.package}}/{{.workshop}}/
cp index/_site/Vol-XXX/index.html {{.package}}/{{.workshop}}/index.html
cp source-management/Preface/main.pdf {{.package}}/{{.workshop}}/preface.pdf || echo "skip"
for submission_id in {{.submission_ids}}
do
cp source-management/$submission_id/main.pdf {{.package}}/{{.workshop}}/${paper_id["$submission_id"]}.pdf || echo "skip"
done
cd {{.package}}
zip -r {{.workshop}}.zip {{.workshop}}
cd -
compile:clean:
desc: Remove the compilation pacakges
cmds:
- rm -r CEUR/Package/*
clean:
desc: Clean some temporary files (not yet all files)
cmds:
- task: paper-data:clean
- task: compile:clean
paper-data:
desc: Join all the metadata of the papers into a graph paper.ttl
cmds:
- |
declare -A paper_id
paper_id["Preface"]="preface"
paper_id["2"]="paper1"
paper_id["4"]="paper2"
paper_id["6"]="paper3"
paper_id["8"]="paper4"
paper_id["9"]="paper5"
paper_id["10"]="paper6"
paper_id["11"]="paper7"
touch metadata.yml
for submission_id in {{.submission_ids}}
do
id=${paper_id["$submission_id"]}
echo $id
docker run -i --rm docker.io/mikefarah/yq '(keys | .[0]) = "'"${id}"'"' < agreement-form/${submission_id}/metadata.yml >> metadata.yml || true
done
docker run -i --rm docker.io/mikefarah/yq -o json < metadata.yml > metadata.json
docker run -i --rm -v $PWD:/data docker.io/aksw/rpt integrate /data/event.ttl /data/paper-mapping.rq > paper.ttl
paper-data:clean:
desc: Clean temporary paper data files
cmds:
- |
rm metadata.json metadata.yml paper.ttl
index:
desc: Prepare index
cmds:
- task: index:clone
- task: index:build
- task: index:patch-editors
- cp index/_site/Vol-XXX/index.html index.html
index:build:
desc: Get the sources of the jekyll rdf template
cmds:
- |
cp event.ttl paper.ttl index
cd index
task graph build
vars:
BASE_IRI: '{{.BASE_IRI}}'
index:patch-editors:
desc: Patch the manual editors section into the index.html
cmds:
- |
head -n 56 index/_site/Vol-XXX/index.html > output.html
cat editor_section.html >> output.html
tail -n +88 index/_site/Vol-XXX/index.html >> output.html
mv output.html index/_site/Vol-XXX/index.html
index:clone:
desc: Get the sources of the jekyll rdf template
cmds:
- |
git clone https://github.com/AKSW/ceur-jekyll-rdf index
status:
- test -f index/_config.yml
to-sign:
desc: Copy all agrreement forms to sign to the to-sign folder
cmds:
- |
mkdir -p to-sign/
cp agreement-form/editor_agreement_to_sign.pdf to-sign/editor_agreement_to_sign.pdf || true
cp agreement-form/Preface/agreement_to_sign.pdf to-sign/agreement_to_sign_preface.pdf || true
for submission_id in {{.submission_ids}}
do
cp agreement-form/$submission_id/agreement_to_sign.pdf to-sign/agreement_to_sign_${submission_id}.pdf || true
done