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
Pascal MOLIN
ical-ufr
Commits
acaf6418
Commit
acaf6418
authored
Jul 04, 2022
by
Frederic HAN
Browse files
Annee par defaut = 2022-23
parent
81abea4d
Changes
6
Hide whitespace changes
Inline
Side-by-side
data.28/2022-23
0 → 120000
View file @
acaf6418
./
\ No newline at end of file
data.28/2022-23/.gitignore
deleted
100644 → 0
View file @
81abea4d
data/2022-23
0 → 120000
View file @
acaf6418
./
\ No newline at end of file
data/2022-23/.gitignore
deleted
100644 → 0
View file @
81abea4d
*.ics
rss*
get_ical.py
View file @
acaf6418
...
...
@@ -2,7 +2,7 @@
#coding: utf8
import
re
,
requests
,
json
,
datetime
,
time
def
get_ical
(
code
,
start
=
'202
1
-08-23'
,
end
=
'202
2
-07-17'
,
year
=
4
,
fiche_etalon
=
''
):
def
get_ical
(
code
,
start
=
'202
2
-08-23'
,
end
=
'202
3
-07-17'
,
year
=
10
,
fiche_etalon
=
''
):
url
=
'https://adeprod.app.univ-paris-diderot.fr:443/jsp/custom/modules/plannings/anonymous_cal.jsp'
params
=
{
'calType'
:
'ical'
,
...
...
@@ -481,7 +481,7 @@ def calendar_list(fname = 'formations.json'):
return
rep
def
get_calendars
(
formations
,
outdir
,
start
=
'202
1
-08-23'
,
end
=
'202
2
-07-17'
,
year
=
4
,
fiche_etalon
=
''
,
start
=
'202
2
-08-23'
,
end
=
'202
3
-07-17'
,
year
=
10
,
fiche_etalon
=
''
,
dryrun
=
False
,
verbose
=
False
):
for
code
in
calendar_list
(
formations
):
...
...
@@ -585,7 +585,7 @@ def get_external(fcalen, outdir,
print
(
'[DONE %s]'
%
fname
)
def
main
(
start
,
end
,
year
=
4
,
fiche_etalon
=
'
2769
,'
,
def
main
(
start
,
end
,
year
=
10
,
fiche_etalon
=
'
1607
,'
,
formations
=
'formations.json'
,
calendars
=
'calendars.json'
,
external
=
'calendars_external.json'
,
...
...
@@ -620,13 +620,13 @@ parser.add_argument('--dryrun', '-n', action='store_true',
help
=
'dry-run, do not write files'
)
parser
.
add_argument
(
'--verbose'
,
'-v'
,
action
=
'store_true'
,
help
=
'verbose, show progress'
)
parser
.
add_argument
(
'--start'
,
type
=
str
,
default
=
'202
1
-08-2
2
'
,
parser
.
add_argument
(
'--start'
,
type
=
str
,
default
=
'202
2
-08-2
3
'
,
help
=
'first day, format yyyy-mm-dd'
)
parser
.
add_argument
(
'--end'
,
type
=
str
,
default
=
'202
2
-07-17'
,
parser
.
add_argument
(
'--end'
,
type
=
str
,
default
=
'202
3
-07-17'
,
help
=
'last day, format yyyy-mm-dd'
)
parser
.
add_argument
(
'--year'
,
type
=
int
,
default
=
4
,
parser
.
add_argument
(
'--year'
,
type
=
int
,
default
=
10
,
help
=
'ADE year'
)
parser
.
add_argument
(
'--fiche_etalon'
,
type
=
str
,
default
=
'
2769
,'
,
parser
.
add_argument
(
'--fiche_etalon'
,
type
=
str
,
default
=
'
1607
,'
,
help
=
'fiches à ajouter à chaque récupération'
)
parser
.
add_argument
(
'--formations'
,
type
=
str
,
default
=
'formations.json'
,
help
=
'json file describing calendar views'
)
...
...
src/config.json
View file @
acaf6418
{
"defaultInitialDate"
:
"202
1
-08-29"
,
"defaultInitialDate"
:
"202
2
-08-29"
,
"parcoursTitles"
:
{
"mathinfo"
:
"Maths-Info"
,
"math"
:
"Maths"
,
...
...
Write
Preview
Markdown
is supported
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