Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
lectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Solid state physics
lectures
Commits
8a8b8428
Verified
Commit
8a8b8428
authored
6 years ago
by
Anton Akhmerov
Browse files
Options
Downloads
Patches
Plain Diff
use a converted schedule
parent
05dd9034
No related branches found
No related tags found
2 merge requests
!65
Crystal structure changes
,
!16
WIP: exercises lecture 7 (Tight-Binding)
Pipeline
#14586
passed
6 years ago
Stage: build
Stage: deploy
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+2
-1
2 additions, 1 deletion
.gitlab-ci.yml
convert_timetable.py
+42
-0
42 additions, 0 deletions
convert_timetable.py
mytimetable_export.ics
+954
-0
954 additions, 0 deletions
mytimetable_export.ics
src/delft.md
+6
-1
6 additions, 1 deletion
src/delft.md
with
1004 additions
and
2 deletions
.gitlab-ci.yml
+
2
−
1
View file @
8a8b8428
...
...
@@ -7,8 +7,9 @@ stages:
build lectures
:
stage
:
build
before_script
:
-
pip install -U mkdocs mkdocs-material python-markdown-math notedown
-
pip install -U mkdocs mkdocs-material python-markdown-math notedown
ics
script
:
-
python convert_timetable.py
-
python execute.py
-
mkdocs build
artifacts
:
...
...
This diff is collapsed.
Click to expand it.
convert_timetable.py
0 → 100644
+
42
−
0
View file @
8a8b8428
from
pathlib
import
Path
import
re
import
json
import
dateutil
import
ics
course
=
ics
.
Calendar
(
Path
(
'
mytimetable_export.ics
'
).
read_text
())
events
=
[]
def
parse_data
(
description
):
type_conversion
=
{
'
Exam/Test in Osiris
'
:
'
Exam
'
,
'
Exam/Test not in Osiris
'
:
'
Minitest
'
,
'
Lecture
'
:
'
Lecture
'
,
'
Instruction
'
:
'
Exercises
'
,
}
type
=
type_conversion
[
re
.
search
(
'
^Type: (.*)$
'
,
description
,
flags
=
re
.
MULTILINE
).
group
(
1
)]
out
=
re
.
search
(
'
^Location
\\
(s
\\
):
\n
(?P<name>.*?): (?P<url>http:.*?)$
'
,
description
,
flags
=
re
.
MULTILINE
,
).
groupdict
()
out
[
'
type
'
]
=
type
return
out
for
original
in
course
.
events
:
parsed
=
parse_data
(
original
.
description
)
event
=
{
'
start
'
:
str
(
original
.
begin
),
'
end
'
:
str
(
original
.
end
),
'
title
'
:
f
'
{
parsed
[
"
type
"
]
}
@
{
parsed
[
"
name
"
]
}
'
,
}
events
.
append
(
event
)
events
=
sorted
(
events
,
key
=
(
lambda
event
:
dateutil
.
parser
.
isoparse
(
event
[
'
start
'
])))
events
[
-
1
][
'
title
'
]
=
events
[
-
1
][
'
title
'
].
replace
(
'
Exam
'
,
'
Retake exam
'
)
Path
(
'
src/figures/events.json
'
).
write_text
(
json
.
dumps
(
events
))
This diff is collapsed.
Click to expand it.
mytimetable_export.ics
0 → 100644
+
954
−
0
View file @
8a8b8428
This diff is collapsed.
Click to expand it.
src/delft.md
+
6
−
1
View file @
8a8b8428
...
...
@@ -4,7 +4,12 @@ Welcome to the 2019 run of the TN2844 course *Vaste Stof Fysica*.
## Schedule
<iframe
src=
"https://calendar.google.com/calendar/embed?showTitle=0&showNav=0&showDate=0&showPrint=0&showTabs=0&showCalendars=0&showTz=0&mode=AGENDA&height=600&wkst=1&bgcolor=%23FFFFFF&src=19fiq3qk5670c38d0hlb3q0kdg%40group.calendar.google.com&color=%23711616&ctz=Europe%2FAmsterdam"
style=
"border-width:0"
width=
"100%"
height=
"400"
frameborder=
"0"
scrolling=
"no"
></iframe>
<link
rel=
'stylesheet'
href=
'https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.10.0/fullcalendar.min.css'
></link>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.23.0/moment.min.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.10.0/fullcalendar.min.js"
></script>
<script
src=
"../scripts/fullcalendar_loader.js"
></script>
<div
id=
'calendar'
></div>
## Discussion chat
...
...
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