Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Fachrat Informatik
pter
Commits
8354a227
Commit
8354a227
authored
Apr 22, 2020
by
Dominik Woiwode
Browse files
Fix FachGRUPPENvollversammlung
parent
c2d8becd
Changes
1
Hide whitespace changes
Inline
Side-by-side
linkToPDF.py
View file @
8354a227
...
...
@@ -7,7 +7,7 @@ from tqdm import tqdm
PROTOCOL_PAD_URL
=
"https://pad.finf.uni-hannover.de/protokolllinks_terces"
NOT_APPROVED_SIGN
=
"*"
ATTACHEMENT_SIGN
=
"+"
FACH
SCHAFTEN
VERSAMMLUNG_SIGN
=
">"
FACH
GRUPPENVOLL
VERSAMMLUNG_SIGN
=
">"
DEFAULT_TYPE
=
"finf"
OVERRIDE_ACCEPTED
=
None
...
...
@@ -54,13 +54,13 @@ def getPadsFromCollectionPad(padURL: str) -> list:
class
Pad
:
def
__init__
(
self
,
url
:
str
,
name
,
metadata
=
None
,
type_
=
None
,
approved
=
False
,
attachement
=
False
,
fach
schafts
vollversammlung
=
False
):
fach
gruppen
vollversammlung
=
False
):
self
.
url
=
url
self
.
id_
=
url
.
split
(
"/"
)[
-
1
].
split
(
"?"
)[
0
]
self
.
name
=
name
self
.
approved
=
approved
self
.
attachement
=
attachement
self
.
fach
schafts
vollversammlung
=
fach
schafts
vollversammlung
self
.
fach
gruppen
vollversammlung
=
fach
gruppen
vollversammlung
self
.
metadata
=
metadata
or
dict
()
self
.
type_
=
type_
or
(
"attachement"
if
self
.
isAttachement
()
else
DEFAULT_TYPE
)
...
...
@@ -85,7 +85,7 @@ class Pad:
return
datetime
.
datetime
.
strptime
(
dateStr
,
"%Y%m%d"
)
isAttachement
=
ATTACHEMENT_SIGN
in
prefixes
isFach
schafts
vollversammlung
=
FACH
SCHAFTEN
VERSAMMLUNG_SIGN
in
prefixes
isFach
gruppen
vollversammlung
=
FACH
GRUPPENVOLL
VERSAMMLUNG_SIGN
in
prefixes
isNotApproved
=
NOT_APPROVED_SIGN
in
prefixes
url
=
url
.
split
(
"?"
)[
0
]
...
...
@@ -122,11 +122,11 @@ class Pad:
metadata
[
"datum"
]
=
date
.
strftime
(
"%d.%m.%Y"
)
name
=
f
'Protokoll
{
type_
.
lower
()
}
{
date
.
strftime
(
"%Y-%m-%d"
)
}
'
if
isFach
schafts
vollversammlung
:
name
+=
" - Fach
schafts
vollversammlung"
if
isFach
gruppen
vollversammlung
:
name
+=
" - Fach
gruppen
vollversammlung"
return
Pad
(
url
,
name
,
metadata
=
metadata
,
type_
=
type_
,
approved
=
not
isNotApproved
,
attachement
=
isAttachement
,
fach
schafts
vollversammlung
=
isFach
schafts
vollversammlung
)
fach
gruppen
vollversammlung
=
isFach
gruppen
vollversammlung
)
def
isAttachement
(
self
):
return
self
.
attachement
...
...
@@ -234,7 +234,7 @@ if __name__ == '__main__':
parser
.
add_argument
(
"--prefixes"
,
type
=
str
,
default
=
""
,
help
=
f
"Add additional information to pad:
\n
"
f
"Not approved:
{
NOT_APPROVED_SIGN
}
\n
"
f
"Fachschaftenvollversammlung:
{
FACH
SCHAFTEN
VERSAMMLUNG_SIGN
}
\n
"
f
"Fachschaftenvollversammlung:
{
FACH
GRUPPENVOLL
VERSAMMLUNG_SIGN
}
\n
"
f
"Attachement:
{
ATTACHEMENT_SIGN
}
\n
"
)
parser
.
add_argument
(
"--finf"
,
action
=
"store_true"
)
parser
.
add_argument
(
"--fsr"
,
action
=
"store_true"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment