Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
proto3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
protokollsystem
proto3
Commits
e5408a22
Commit
e5408a22
authored
8 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Show decision categories in the tex protocol
/close
#92
parent
a56530e0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
parser.py
+5
-0
5 additions, 0 deletions
parser.py
tasks.py
+4
-0
4 additions, 0 deletions
tasks.py
templates/protocol.tex
+1
-1
1 addition, 1 deletion
templates/protocol.tex
with
10 additions
and
1 deletion
parser.py
+
5
−
0
View file @
e5408a22
...
@@ -213,6 +213,11 @@ class Tag:
...
@@ -213,6 +213,11 @@ class Tag:
if
not
show_private
:
if
not
show_private
:
return
""
return
""
return
self
.
todo
.
render_latex
(
current_protocol
=
protocol
)
return
self
.
todo
.
render_latex
(
current_protocol
=
protocol
)
elif
self
.
name
==
"
beschluss
"
:
result
=
r
"
\textbf{{Beschluss:}} {}
"
.
format
(
self
.
decision
.
content
)
if
self
.
decision
.
category
is
not
None
:
result
=
r
"
{} \textit{{({})}}
"
.
format
(
result
,
self
.
decision
.
category
.
name
)
return
result
return
r
"
\textbf{{{}:}} {}
"
.
format
(
escape_tex
(
self
.
name
.
capitalize
()),
escape_tex
(
"
;
"
.
join
(
self
.
values
)))
return
r
"
\textbf{{{}:}} {}
"
.
format
(
escape_tex
(
self
.
name
.
capitalize
()),
escape_tex
(
"
;
"
.
join
(
self
.
values
)))
elif
render_type
==
RenderType
.
plaintext
:
elif
render_type
==
RenderType
.
plaintext
:
if
self
.
name
==
"
url
"
:
if
self
.
name
==
"
url
"
:
...
...
This diff is collapsed.
Click to expand it.
tasks.py
+
4
−
0
View file @
e5408a22
...
@@ -285,6 +285,7 @@ def parse_protocol_async_inner(protocol, encoded_kwargs):
...
@@ -285,6 +285,7 @@ def parse_protocol_async_inner(protocol, encoded_kwargs):
protocol
.
decisions
.
remove
(
decision
)
protocol
.
decisions
.
remove
(
decision
)
db
.
session
.
commit
()
db
.
session
.
commit
()
decision_tags
=
[
tag
for
tag
in
tags
if
tag
.
name
==
"
beschluss
"
]
decision_tags
=
[
tag
for
tag
in
tags
if
tag
.
name
==
"
beschluss
"
]
decisions_to_render
=
[]
for
decision_tag
in
decision_tags
:
for
decision_tag
in
decision_tags
:
if
len
(
decision_tag
.
values
)
==
0
:
if
len
(
decision_tag
.
values
)
==
0
:
error
=
protocol
.
create_error
(
"
Parsing
"
,
"
Empty decision found.
"
,
error
=
protocol
.
create_error
(
"
Parsing
"
,
"
Empty decision found.
"
,
...
@@ -320,6 +321,9 @@ def parse_protocol_async_inner(protocol, encoded_kwargs):
...
@@ -320,6 +321,9 @@ def parse_protocol_async_inner(protocol, encoded_kwargs):
content
=
decision_content
,
category_id
=
decision_category_id
)
content
=
decision_content
,
category_id
=
decision_category_id
)
db
.
session
.
add
(
decision
)
db
.
session
.
add
(
decision
)
db
.
session
.
commit
()
db
.
session
.
commit
()
decision_tag
.
decision
=
decision
decisions_to_render
.
append
((
decision
,
decision_tag
))
for
decision
,
decision_tag
in
decisions_to_render
:
decision_top
=
decision_tag
.
fork
.
get_top
()
decision_top
=
decision_tag
.
fork
.
get_top
()
decision_content
=
texenv
.
get_template
(
"
decision.tex
"
).
render
(
decision_content
=
texenv
.
get_template
(
"
decision.tex
"
).
render
(
render_type
=
RenderType
.
latex
,
decision
=
decision
,
render_type
=
RenderType
.
latex
,
decision
=
decision
,
...
...
This diff is collapsed.
Click to expand it.
templates/protocol.tex
+
1
−
1
View file @
e5408a22
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
\begin{itemize}
\begin{itemize}
\ENV
{
if protocol.decisions|length > 0
}
\ENV
{
if protocol.decisions|length > 0
}
\ENV
{
for decision in protocol.decisions
}
\ENV
{
for decision in protocol.decisions
}
\item
\VAR
{
decision.content|escape
_
tex
}
\item
\VAR
{
decision.content|escape
_
tex
}
\ENV
{
if decision.category is not none and show
_
private
}
\textit
{
(
\VAR
{
decision.category.name
}
)
}
\ENV
{
endif
}
\ENV
{
endfor
}
\ENV
{
endfor
}
\ENV
{
else
}
\ENV
{
else
}
\item
Keine Beschlüsse
\item
Keine Beschlüsse
...
...
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