Skip to content

Commit

Permalink
fix dates
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Sep 25, 2023
1 parent 076f0d5 commit 669e075
Show file tree
Hide file tree
Showing 30 changed files with 612 additions and 636 deletions.
22 changes: 16 additions & 6 deletions R/helpers-podcast.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ check_for_dates <- function(data, limit) {
if (!is.null(limit)) {

dates_dict <- get_dates()
dates_dict$"long_dates" <- paste(#dates_dict$"week_day",
as.numeric(dates_dict$"day"),
dates_dict$"full_month", dates_dict$"year")
# dates_dict$"long_dates" <- paste(#dates_dict$"week_day",
# as.numeric(dates_dict$"day"),
# dates_dict$"full_month", dates_dict$"year")

dates_dict$"long_dates" <- format(as.Date(dates_dict$"short_date"), "%d %b %Y")

data$"date" <- gsub("\u00FB", "u", data$"date")
data$"date" <- gsub("\u00E9", "e", data$"date")
# data$"date" <- gsub("\u00FB", "u", data$"date")
# data$"date" <- gsub("\u00E9", "e", data$"date")

dates_dict <- dates_dict[which(dates_dict$"long_dates" %in% data$"date"), ]
dates_dict <- dates_dict[ , c("short_date", "long_dates")]
Expand Down Expand Up @@ -117,6 +119,14 @@ check_for_new_episodes <- function(podcast, radio, path, limit, na_rm) {
page_dates <- paste(page_dates, format(Sys.Date(), "%Y"))
}

if (length(grep("Aujourd'hui", page_dates)) > 0) {
page_dates <- format(Sys.Date(), "%d %b %Y")
}

if (length(grep("Hier", page_dates)) > 0) {
page_dates <- format(Sys.Date() - 1, "%d %b %Y")
}

tmp <- data.frame("title" = page_titles,
"date" = page_dates,
"url" = page_links)
Expand Down Expand Up @@ -212,7 +222,7 @@ convert_dates <- function(data) {

dates_dict <- dates_dict[ , c("short_date", "long_dates")]

data$"date" <- gsub("[[:punct:]]", "",
data$"date" <- gsub("[[:punct:]]", "embre",
iconv(data$"date", to = "ASCII//TRANSLIT"))

data <- merge(data, dates_dict, by.x = "date", by.y = "long_dates",
Expand Down
7 changes: 2 additions & 5 deletions inst/csv/carbone-14-le-magazine-de-l-archeologie.csv
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
"date";"title";"duration";"file_url"
"2023-09-23";"Les bannis de la terre";NA;"https://media.radiofrance-podcast.net/podcast09/10267-23.09.2023-ITEMA_23496949-2023C26375E0030-21.mp3"
"2023-09-16";"Patrimoine en danger : halte aux démolisseurs !";NA;"https://media.radiofrance-podcast.net/podcast09/10267-16.09.2023-ITEMA_23489312-2023C26375E0029-21.mp3"
"2023-08-26";"La conquête du cheval : une révolution !";NA;"https://media.radiofrance-podcast.net/podcast09/10267-20.05.2023-ITEMA_23384705-2023C26375E0019-21.mp3"
"2023-08-19";"Cosquer, la grotte engloutie des calanques";NA;"https://media.radiofrance-podcast.net/podcast09/10267-22.01.2022-ITEMA_22908615-2022C26375E0003-21.mp3"
"2023-08-12";"Idéologie, élites et prestige en mésoamérique";NA;"https://media.radiofrance-podcast.net/podcast09/10267-12.08.2023-ITEMA_23458352-2023C26375E0013-21.mp3"
"2023-08-05";"On a ouvert les sarcophages de Notre-Dame !";NA;"https://media.radiofrance-podcast.net/podcast09/10267-05.08.2023-ITEMA_23453891-2023C26375E0002-21.mp3"
"2023-06-24";"Des gravures néandertaliennes de 57 000 ans dans une grotte française";NA;"https://media.radiofrance-podcast.net/podcast09/10267-24.06.2023-ITEMA_23421247-2023C26375E0024-21.mp3"
"2023-06-17";"Saint-Denis, pionnière en archéologie urbaine";NA;"https://media.radiofrance-podcast.net/podcast09/10267-17.06.2023-ITEMA_23413843-2023C26375E0022-21.mp3"
"2023-06-10";"L’abbaye médiévale de Beaumont sort de terre, à Tours";NA;"https://media.radiofrance-podcast.net/podcast09/10267-10.06.2023-ITEMA_23406708-2023C26375E0021-21.mp3"
"2023-06-03";"Le mystère du Mormont, espace sacré des Helvètes ?";NA;"https://media.radiofrance-podcast.net/podcast09/10267-03.06.2023-ITEMA_23399128-2023C26375E0020-21.mp3"
"2023-05-27";"Quand les rois de France barraient la route aux Vikings";NA;"https://media.radiofrance-podcast.net/podcast09/10267-27.05.2023-ITEMA_23391965-2023C26375E0018-21.mp3"
"2023-05-20";"La conquête du cheval : une révolution !";NA;"https://media.radiofrance-podcast.net/podcast09/10267-20.05.2023-ITEMA_23384705-2023C26375E0019-21.mp3"
"2023-05-13";"Sauvons nos épaves modernes !";NA;"https://media.radiofrance-podcast.net/podcast09/10267-13.05.2023-ITEMA_23377488-2023C26375E0016-21.mp3"
"2023-05-06";"Les fouilles de la nécropole de Lutèce et de la Caserne Sully à Saint-Cloud";NA;"https://media.radiofrance-podcast.net/podcast09/10267-06.05.2023-ITEMA_23370256-2023C26375E0017-21.mp3"
"2023-04-29";"André Leroi-Gourhan et la technologie";NA;"https://media.radiofrance-podcast.net/podcast09/10267-29.04.2023-ITEMA_23363141-2023C26375E0014-21.mp3"
"2023-04-22";"Sur la fouille de la basilique de Saint-Denis";NA;"https://media.radiofrance-podcast.net/podcast09/10267-22.04.2023-ITEMA_23356349-2023C26375E0015-21.mp3"
"2023-04-15";"Idéologie, élites et prestige en mésoamérique";NA;"https://media.radiofrance-podcast.net/podcast09/10267-12.08.2023-ITEMA_23458352-2023C26375E0013-21.mp3"
"2023-04-08";"L'origine du monde... magdalénien";NA;"https://media.radiofrance-podcast.net/podcast09/10267-08.04.2023-ITEMA_23342833-2023C26375E0012-21.mp3"
"2023-04-01";"À l’origine était… la caverne";NA;"https://media.radiofrance-podcast.net/podcast09/10267-01.04.2023-ITEMA_23335594-2022C26375E0032-21.mp3"
"2023-03-25";"Les Celtes réinventés par l’archéologie";NA;"https://media.radiofrance-podcast.net/podcast09/10267-25.03.2023-ITEMA_23328368-2023C26375E0011-21.mp3"
"2023-03-18";"À la recherche du royaume d’Urartu";1739;"https://media.radiofrance-podcast.net/podcast09/10267-18.03.2023-ITEMA_23321009-2023C26375E0010-21.mp3"
"2023-03-11";"Les Gaulois contre l'état ?";1801;"https://media.radiofrance-podcast.net/podcast09/10267-12.11.2022-ITEMA_23194175-2022C26375E0037-21.mp3"
Expand Down
4 changes: 2 additions & 2 deletions inst/csv/geremy-part-en-live.csv
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"date";"title";"duration";"file_url"
"2023-09-19";"Si Fabrice Luchini lisait ""Petit Ours Brun""";NA;"https://media.radiofrance-podcast.net/podcast09/15275-19.09.2023-ITEMA_23492010-2023F31178S0262-22.mp3"
"2023-09-12";"Déménagement de trop";NA;"https://media.radiofrance-podcast.net/podcast09/15275-12.09.2023-ITEMA_23484157-2023F31178S0255-22.mp3"
"2023-08-28";"Le rappeur québécois";NA;"https://media.radiofrance-podcast.net/podcast09/13939-28.08.2023-ITEMA_23468559-2023F31178S0240-22.mp3"
"2023-06-30";"Vacances de merde";NA;"https://media.radiofrance-podcast.net/podcast09/15275-30.06.2023-ITEMA_23428083-2023F31178S0181-22.mp3"
"2023-06-16";"Au revoir Guillaume Bats";NA;"https://media.radiofrance-podcast.net/podcast09/13939-16.06.2023-ITEMA_23412831-2023F31178S0167-22.mp3"
"2023-05-26";"Hervé reprend des chanteurs à grande voix";NA;"https://media.radiofrance-podcast.net/podcast09/15275-26.05.2023-ITEMA_23391016-2023F31178S0146-22.mp3"
"2023-05-24";"C'est la faute à l'amour";NA;"https://media.radiofrance-podcast.net/podcast09/15275-24.05.2023-ITEMA_23388523-2023F31178S0144-22.mp3"
"2023-05-01";"Geremy Credeville est Grand Ben Mazué Malade";NA;"https://media.radiofrance-podcast.net/podcast09/13939-01.05.2023-ITEMA_23364416-2022F31178S0314-22.mp3"
"2023-04-19";"Le jour où j’ai découvert que j’étais vieux";NA;"https://media.radiofrance-podcast.net/podcast09/15275-19.04.2023-ITEMA_23353225-2023F31178S0109-22.mp3"
"2023-04-14";"Mashup de chanteurs tristes sur des tubes festifs";NA;"https://media.radiofrance-podcast.net/podcast09/15275-14.04.2023-ITEMA_23348778-2023F31178S0104-22.mp3"
"2023-04-06";"La chanson sale mais romantique";NA;"https://media.radiofrance-podcast.net/podcast09/15275-06.04.2023-ITEMA_23340628-2023F31178S0096-22.mp3"
"2023-03-14";"Pardon maman";272;"https://media.radiofrance-podcast.net/podcast09/15275-14.03.2023-ITEMA_23316204-2023F31178S0073-22.mp3"
"2023-02-17";"Fatal Bazooka par Serge Lama, Francis Cabrel et Charles Aznavour";378;"https://media.radiofrance-podcast.net/podcast09/13939-17.02.2023-ITEMA_23291133-2023F31178S0048-22.mp3"
"2023-02-01";"J’ai adopté un chat";197;"https://media.radiofrance-podcast.net/podcast09/15275-01.02.2023-ITEMA_23274802-2023F31178S0032-22.mp3"
Expand Down
6 changes: 2 additions & 4 deletions inst/csv/la-chanson-de-frederic-fromet.csv
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
"date";"title";"duration";"file_url"
"2023-09-24";"Les gogols à Venise avec Constance";NA;"https://media.radiofrance-podcast.net/podcast09/14806-24.09.2023-ITEMA_23497475-2023F23452S0267-22.mp3"
"2023-09-10";"""Plante, vas-y plante""";NA;"https://media.radiofrance-podcast.net/podcast09/14806-10.09.2023-ITEMA_23482126-2023F23452S0253-22.mp3"
"2023-06-30";"We are le dimanche";NA;"https://media.radiofrance-podcast.net/podcast09/14806-03.07.2023-ITEMA_23430285-2023F23452S0181-22.mp3"
"2023-06-23";"Je n'suis pas bien portante";NA;"https://media.radiofrance-podcast.net/podcast09/14806-23.06.2023-ITEMA_23420247-2023F23452S0174-22.mp3"
"2023-06-16";"L'homme au sac à dos";NA;"https://media.radiofrance-podcast.net/podcast09/14806-16.06.2023-ITEMA_23412847-2023F23452S0167-22.mp3"
"2023-06-12";"Flammes des années 2020";NA;"https://media.radiofrance-podcast.net/podcast09/14806-12.06.2023-ITEMA_23408557-2023F23452S0163-22.mp3"
"2023-06-09";"Nitrites";NA;"https://media.radiofrance-podcast.net/podcast09/14806-09.06.2023-ITEMA_23405695-2023F23452S0160-22.mp3"
"2023-06-02";"La loose à mon stage";NA;"https://media.radiofrance-podcast.net/podcast09/14806-02.06.2023-ITEMA_23398164-2023F23452S0153-22.mp3"
"2023-05-26";"Ma famille à nourrir me coûte très cher";NA;"https://media.radiofrance-podcast.net/podcast09/14806-26.05.2023-ITEMA_23391014-2023F23452S0146-22.mp3"
"2023-05-19";"""Face à mon maire, je reste tranquille""";NA;"https://media.radiofrance-podcast.net/podcast09/14806-19.05.2023-ITEMA_23383731-2023F23452S0139-22.mp3"
"2023-05-12";"Eurovision";NA;"https://media.radiofrance-podcast.net/podcast09/18153-12.05.2023-ITEMA_23376457-2023F23452S0132-22.mp3"
"2023-05-05";"Macron, y a la planète qui fond";NA;"https://media.radiofrance-podcast.net/podcast09/14806-05.05.2023-ITEMA_23369256-2023F23452S0125-22.mp3"
"2023-04-28";"Tout, tout pour ma série";NA;"https://media.radiofrance-podcast.net/podcast09/14806-17.03.2023-ITEMA_23320001-2023F23452S0076-22.mp3"
"2023-04-27";"On the fraude again";NA;"https://media.radiofrance-podcast.net/podcast09/14806-27.04.2023-ITEMA_23361023-2023F23452S0090-22.mp3"
"2023-04-26";"Les rapports du GIEC";NA;"https://media.radiofrance-podcast.net/podcast09/14806-24.03.2023-ITEMA_23327306-2023F23452S0083-22.mp3"
"2023-04-25";"On s'était dit rendez-vous dans 300 ans";NA;"https://media.radiofrance-podcast.net/podcast09/14806-10.03.2023-ITEMA_23312478-2023F23452S0069-22.mp3"
"2023-04-24";"Je marche pas seul";NA;"https://media.radiofrance-podcast.net/podcast09/14806-10.02.2023-ITEMA_23284385-2023F23452S0041-22.mp3"
"2023-04-21";"On s'en fout, on n'lira pas";NA;"https://media.radiofrance-podcast.net/podcast09/14806-21.04.2023-ITEMA_23355422-2023F23452S0111-22.mp3"
"2023-04-14";"L'amour du fisc";NA;"https://media.radiofrance-podcast.net/podcast09/14806-14.04.2023-ITEMA_23348776-2023F23452S0104-22.mp3"
"2023-04-07";"C'est mon dernier râle";NA;"https://media.radiofrance-podcast.net/podcast09/14806-07.04.2023-ITEMA_23341834-2023F23452S0097-22.mp3"
"2023-03-31";"On the fraude again";NA;"https://media.radiofrance-podcast.net/podcast09/14806-27.04.2023-ITEMA_23361023-2023F23452S0090-22.mp3"
"2023-03-24";"Les rapports du GIEC";NA;"https://media.radiofrance-podcast.net/podcast09/14806-24.03.2023-ITEMA_23327306-2023F23452S0083-22.mp3"
"2023-03-17";"Tout, tout pour ma série";165;"https://media.radiofrance-podcast.net/podcast09/14806-17.03.2023-ITEMA_23320001-2023F23452S0076-22.mp3"
Expand Down
5 changes: 2 additions & 3 deletions inst/csv/la-chronique-d-aymeric-lompret.csv
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
"date";"title";"duration";"file_url"
"2023-09-17";"Le capitalisme, c'est de la merde ";NA;"https://media.radiofrance-podcast.net/podcast09/20857-17.09.2023-ITEMA_23489906-2023F38729S0260-22.mp3"
"2023-09-10";"Aymeric Lompret n'a pas d'avis sur le sport";NA;"https://media.radiofrance-podcast.net/podcast09/20857-10.09.2023-ITEMA_23482138-2023F38729S0253-22.mp3"
"2023-06-29";"""Si l'émission s'arrête c'est de ma faute"" ";NA;"https://media.radiofrance-podcast.net/podcast09/20857-29.06.2023-ITEMA_23426461-2023F38729S0180-22.mp3"
"2023-06-22";"Au boulot les français ! ";NA;"https://media.radiofrance-podcast.net/podcast09/20857-22.06.2023-ITEMA_23418988-2023F38729S0173-22.mp3"
"2023-06-15";"Les fachos et les médias";NA;"https://media.radiofrance-podcast.net/podcast09/20857-15.06.2023-ITEMA_23411634-2023F38729S0166-22.mp3"
"2023-06-08";"(Re)faîtes confiance aux médias";NA;"https://media.radiofrance-podcast.net/podcast09/20857-08.06.2023-ITEMA_23405104-2023F38729S0159-22.mp3"
"2023-06-01";"Loi anti-homosexualité 2023";NA;"https://media.radiofrance-podcast.net/podcast09/20857-01.06.2023-ITEMA_23396891-2023F38729S0152-22.mp3"
"2023-05-30";"L'arnaque des autoroutes";NA;"https://media.radiofrance-podcast.net/podcast09/20857-30.05.2023-ITEMA_23394469-2023F38729S0150-22.mp3"
"2023-05-25";"Orelsan Dior ";NA;"https://media.radiofrance-podcast.net/podcast09/20857-25.05.2023-ITEMA_23389796-2023F38729S0145-22.mp3"
"2023-05-18";"Vivement le chômage ! ";NA;"https://media.radiofrance-podcast.net/podcast09/20857-18.05.2023-ITEMA_23382544-2023F38729S0138-22.mp3"
"2023-05-04";"RSA is the new SMIC";NA;"https://media.radiofrance-podcast.net/podcast09/20857-04.05.2023-ITEMA_23368037-2023F38729S0124-22.mp3"
"2023-04-27";"Les Français ont la dalle";NA;"https://media.radiofrance-podcast.net/podcast09/20857-27.04.2023-ITEMA_23361033-2023F38729S0061-22.mp3"
"2023-04-20";"Le gouvernement est complètement fou";NA;"https://media.radiofrance-podcast.net/podcast09/20857-20.04.2023-ITEMA_23354281-2023F38729S0110-22.mp3"
"2023-04-17";"Bernard Arnault, 12 milliards en une journée";NA;"https://media.radiofrance-podcast.net/podcast09/20857-17.04.2023-ITEMA_23351052-2023F38729S0107-22.mp3"
Expand Down
4 changes: 1 addition & 3 deletions inst/csv/la-chronique-de-djamil-le-shlag.csv
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
"date";"title";"duration";"file_url"
"2023-09-24";"Le Pape, Darmanin, et les migrants";NA;"https://media.radiofrance-podcast.net/podcast09/22752-24.09.2023-ITEMA_23497487-2023F45638S0267-22.mp3"
"2023-06-23";"JO Paris 2024 : on ne sera jamais prêt ! ";NA;"https://media.radiofrance-podcast.net/podcast09/22752-23.06.2023-ITEMA_23420258-2023F45638S0174-22.mp3"
"2023-06-09";"L'avion c'est pour les ringards ";NA;"https://media.radiofrance-podcast.net/podcast09/22752-09.06.2023-ITEMA_23406321-2023F45638S0160-22.mp3"
"2023-05-26";"La Petite Sirène n'a pas de couleur, c'est un poisscaille !";NA;"https://media.radiofrance-podcast.net/podcast09/22752-26.05.2023-ITEMA_23391025-2023F45638S0146-22.mp3"
"2023-05-19";"Sarkozy, bientôt en showcase à la Santé ? ";NA;"https://media.radiofrance-podcast.net/podcast09/22752-19.05.2023-ITEMA_23383742-2023F45638S0139-22.mp3"
"2023-05-12";"La vie, c’est trop cher";NA;"https://media.radiofrance-podcast.net/podcast09/22752-12.05.2023-ITEMA_23376526-2023F45638S0132-22.mp3"
"2023-05-05";"Macron : ton conseiller d'orientation";NA;"https://media.radiofrance-podcast.net/podcast09/22752-05.05.2023-ITEMA_23369267-2023F45638S0125-22.mp3"
"2023-04-14";"Conseil constitutionnel, conseil de classe : même combat";NA;"https://media.radiofrance-podcast.net/podcast09/22752-14.04.2023-ITEMA_23348788-2023F45638S0104-22.mp3"
"2023-04-07";"M.Schiappa dans Playboy : le féminisme en PLS";NA;"https://media.radiofrance-podcast.net/podcast09/22752-07.04.2023-ITEMA_23341845-2023F45638S0097-22.mp3"
"2023-03-31";"Sainte Soline : méga bassines et ultra gauche";NA;"https://media.radiofrance-podcast.net/podcast09/22752-31.03.2023-ITEMA_23334607-2023F45638S0090-22.mp3"
"2023-03-24";"49.3, le dialogue à coup de matraque";NA;"https://media.radiofrance-podcast.net/podcast09/22752-24.03.2023-ITEMA_23327317-2023F45638S0083-22.mp3"
"2023-03-17";"Les séries, c'était mieux avant !";238;"https://media.radiofrance-podcast.net/podcast09/22752-17.03.2023-ITEMA_23320012-2023F45638S0076-22.mp3"
Expand Down
Loading

0 comments on commit 669e075

Please sign in to comment.