Commit acaf6418 authored by Frederic HAN's avatar Frederic HAN
Browse files

Annee par defaut = 2022-23

parent 81abea4d
\ No newline at end of file
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#coding: utf8 #coding: utf8
import re, requests, json, datetime, time import re, requests, json, datetime, time
def get_ical(code,start='2021-08-23',end='2022-07-17',year=4,fiche_etalon=''): def get_ical(code,start='2022-08-23',end='2023-07-17',year=10,fiche_etalon=''):
url = '' url = ''
params = { params = {
'calType': 'ical', 'calType': 'ical',
...@@ -481,7 +481,7 @@ def calendar_list(fname = 'formations.json'): ...@@ -481,7 +481,7 @@ def calendar_list(fname = 'formations.json'):
return rep return rep
def get_calendars(formations, outdir, def get_calendars(formations, outdir,
start='2021-08-23',end='2022-07-17',year=4,fiche_etalon='', start='2022-08-23',end='2023-07-17',year=10,fiche_etalon='',
dryrun=False, verbose=False): dryrun=False, verbose=False):
for code in calendar_list(formations): for code in calendar_list(formations):
...@@ -585,7 +585,7 @@ def get_external(fcalen, outdir, ...@@ -585,7 +585,7 @@ def get_external(fcalen, outdir,
print('[DONE %s]'%fname) 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', formations='formations.json',
calendars='calendars.json', calendars='calendars.json',
external='calendars_external.json', external='calendars_external.json',
...@@ -620,13 +620,13 @@ parser.add_argument('--dryrun', '-n', action='store_true', ...@@ -620,13 +620,13 @@ parser.add_argument('--dryrun', '-n', action='store_true',
help='dry-run, do not write files') help='dry-run, do not write files')
parser.add_argument('--verbose', '-v', action='store_true', parser.add_argument('--verbose', '-v', action='store_true',
help='verbose, show progress') help='verbose, show progress')
parser.add_argument('--start', type=str, default='2021-08-22', parser.add_argument('--start', type=str, default='2022-08-23',
help='first day, format yyyy-mm-dd') help='first day, format yyyy-mm-dd')
parser.add_argument('--end', type=str, default='2022-07-17', parser.add_argument('--end', type=str, default='2023-07-17',
help='last day, format yyyy-mm-dd') 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') 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') help='fiches à ajouter à chaque récupération')
parser.add_argument('--formations', type=str, default='formations.json', parser.add_argument('--formations', type=str, default='formations.json',
help='json file describing calendar views') help='json file describing calendar views')
{ {
"defaultInitialDate": "2021-08-29", "defaultInitialDate": "2022-08-29",
"parcoursTitles": { "parcoursTitles": {
"mathinfo": "Maths-Info", "mathinfo": "Maths-Info",
"math": "Maths", "math": "Maths",
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment