Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
inf2_eedi
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Piotr Maślanka
inf2_eedi
Commits
7fd202a2
There was a problem fetching the pipeline stages.
Commit
7fd202a2
authored
7 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
parent
f03be4a7
No related branches found
No related tags found
No related merge requests found
Pipeline
#2372
failed with stage
in 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build.py
+13
-11
13 additions, 11 deletions
build.py
with
13 additions
and
11 deletions
build.py
+
13
−
11
View file @
7fd202a2
...
...
@@ -6,7 +6,7 @@ import os.path
if
__name__
==
'
__main__
'
:
for
lab_name
in
[
'
lab
1
'
,
'
lab2
'
,
'
lab3
'
,
'
lab4
'
,
'
lab5
'
,
'
lab6
'
]
:
for
lab_name
in
(
'
lab
'
+
str
(
x
)
for
x
in
xrange
(
7
,
start
=
1
))
:
dist_lp
=
'
dist/
'
+
lab_name
+
'
/
'
src_md
=
'
src/
'
+
lab_name
+
'
.md
'
...
...
@@ -18,25 +18,27 @@ if __name__ == '__main__':
header_bin
=
fh
.
read
()
footer_bin
=
ff
.
read
()
#
Lab1
#
Make directories
try
:
os
.
makedirs
(
dist_lp
)
except
OSError
:
pass
with
open
(
src_md
,
'
rb
'
)
as
labin
:
if
os
.
path
.
exists
(
'
src/
'
+
lab_name
+
'
.json
'
):
with
open
(
'
src/
'
+
lab_name
+
'
.json
'
,
'
rb
'
)
as
datin
:
data
=
json
.
load
(
datin
)
else
:
data
=
[{}]
# Load data
if
os
.
path
.
exists
(
'
src/
'
+
lab_name
+
'
.json
'
):
with
open
(
'
src/
'
+
lab_name
+
'
.json
'
,
'
rb
'
)
as
datin
:
data
=
json
.
load
(
datin
)
else
:
data
=
[{}]
# Load text
with
open
(
src_md
,
'
rb
'
)
as
labin
:
lab
=
labin
.
read
().
decode
(
'
utf8
'
)
# Swap placholders
for
ex_no
,
d
in
enumerate
(
data
,
start
=
1
):
plab
=
lab
d
[
'
lp
'
]
=
unicode
(
ex_no
)
print
(
'
Processing %s-%s
'
%
(
lab_name
,
ex_no
,
))
for
k
,
v
in
d
.
iteritems
():
plab
=
plab
.
replace
(
u
'
$%s$
'
%
(
k
,
),
v
)
...
...
@@ -46,5 +48,5 @@ if __name__ == '__main__':
labout
.
write
(
plab
.
encode
(
'
utf8
'
))
labout
.
write
(
footer_bin
)
os
.
system
((
'
pandoc %s%s.md -s -o %s%s.pdf
'
)
%
(
dist_lp
,
ex_no
,
dist_lp
,
ex_no
))
os
.
unlink
(
dist_lp
+
'
%s.md
'
%
(
ex_no
,
)
)
if
os
.
system
((
'
pandoc %s%s.md -s -o %s%s.pdf
'
)
%
(
dist_lp
,
ex_no
,
dist_lp
,
ex_no
))
!=
0
:
sys
.
exit
(
1
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment