Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eventdisplay
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository 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
gsu
eventdisplay
Commits
deca14be
Commit
deca14be
authored
7 years ago
by
Dirk Sarpe
Browse files
Options
Downloads
Patches
Plain Diff
start to work on issue #12
- filter should work - endtime is in list now, but html needs to be adapted
parent
fe51b2cc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
event_display.py
+7
-6
7 additions, 6 deletions
event_display.py
with
7 additions
and
6 deletions
event_display.py
+
7
−
6
View file @
deca14be
...
@@ -14,12 +14,13 @@ period = (now.floor('day'), now.replace(weeks=+2))
...
@@ -14,12 +14,13 @@ period = (now.floor('day'), now.replace(weeks=+2))
c
=
Calendar
(
requests
.
get
(
url
).
text
)
c
=
Calendar
(
requests
.
get
(
url
).
text
)
my_list
=
[]
my_list
=
[]
for
e
in
c
.
events
:
for
e
in
c
.
events
:
if
e
.
begin
>
period
[
0
]
and
e
.
begin
<
period
[
1
]:
if
e
.
end
>
period
[
0
]
and
e
.
begin
<
period
[
1
]:
my_list
.
append
((
e
.
name
,
e
.
begin
.
format
(
'
DD-MM-YYYY HH:mm:ss
'
),
e
.
location
))
my_list
.
append
((
e
.
name
,
e
.
begin
.
format
(
'
DD-MM-YYYY HH:mm:ss
'
),
e
.
end
.
format
(
'
DD-MM-YYYY HH:mm:ss
'
),
e
.
location
))
event
=
[
my_list
[
0
][
0
],
my_list
[
1
][
0
],
my_list
[
2
][
0
]]
event
=
[
my_list
[
0
][
0
],
my_list
[
1
][
0
],
my_list
[
2
][
0
]]
begin
=
[
my_list
[
0
][
1
],
my_list
[
1
][
1
],
my_list
[
2
][
1
]]
begin
=
[
my_list
[
0
][
1
],
my_list
[
1
][
1
],
my_list
[
2
][
1
]]
location
=
[
my_list
[
0
][
2
],
my_list
[
1
][
2
],
my_list
[
2
][
2
]]
end
=
[
my_list
[
0
][
2
],
my_list
[
1
][
2
],
my_list
[
2
][
2
]]
location
=
[
my_list
[
0
][
3
],
my_list
[
1
][
3
],
my_list
[
2
][
3
]]
html_page
=
"""
<html xmlns=
"
http://www.w3.org/1999/xhtml
"
>
html_page
=
"""
<html xmlns=
"
http://www.w3.org/1999/xhtml
"
>
...
@@ -72,7 +73,7 @@ html_page = """<html xmlns="http://www.w3.org/1999/xhtml">
...
@@ -72,7 +73,7 @@ html_page = """<html xmlns="http://www.w3.org/1999/xhtml">
</div>
</div>
</body>
</body>
</html>
"""
%
(
event
[
0
],
location
[
0
],
begin
[
0
],
event
[
1
],
location
[
1
],
begin
[
1
],
event
[
2
],
location
[
2
],
begin
[
2
])
</html>
"""
%
(
event
[
0
],
location
[
0
],
begin
[
0
],
end
[
0
],
event
[
1
],
location
[
1
],
begin
[
1
],
end
[
1
],
event
[
2
],
location
[
2
],
begin
[
2
]
,
end
[
2
]
)
out_file
=
open
(
"
/home/eventviewer/events/events.html
"
,
"
w
"
)
out_file
=
open
(
"
/home/eventviewer/events/events.html
"
,
"
w
"
)
out_file
.
write
(
html_page
.
encode
(
"
utf8
"
))
out_file
.
write
(
html_page
.
encode
(
"
utf8
"
))
...
...
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