Skip to content

Commit

Permalink
url has talk title
Browse files Browse the repository at this point in the history
  • Loading branch information
schassande committed Jan 30, 2025
1 parent 2c857d1 commit 3cc6ef5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ voxxrin/talks-stats.json
voxxrin/talks-url.csv
voxxrin/talks-url.json
voxxrin/feedback*.json

.env
10 changes: 6 additions & 4 deletions voxxrin/talks-url.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ async function convertJsonToCsv(inputFilePath, outputFilePath) {
const csvData = jsonData.filter(item => item.speakersFullNames.length > 0)
.map(item => ({
talkId: item.talkId,
talkTitle: item.speakersFullNames.join(', '),
talkTitle: item.talkTitle,
speakers: item.speakersFullNames.join(', '),
registrationUrl: "https://"+item.registrationUrl
}));

// Configurer le writer CSV
const csvWriter = createCsvWriter({
path: outputFilePath,
header: [
{ id: 'talkId', title: 'talkId' },
{ id: 'talkTitle', title: 'talkTitle' },
{ id: 'registrationUrl', title: 'registrationUrl' }
{ id: 'talkId', title: 'Talk Id' },
{ id: 'talkTitle', title: 'Talk Title' },
{ id: 'speakers', title: 'Speakers' },
{ id: 'registrationUrl', title: 'Registration Url' }
]
});

Expand Down
3 changes: 2 additions & 1 deletion voxxrin/voxxrin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ function usage() {
echo "Usage du script (need VOXXRIN_TOKEN env var token url encoded):"
echo " ./voxxrin.sh update : Mets à jour le site voxxrin"
echo " ./voxxrin.sh talks-stats : Telecharge les statistiques de tous les talks"
echo " ./voxxrin.sh talks-url : Telecharge les URL de feedback de tous les talks"
echo " ./voxxrin.sh talk-feedbacks : Telecharge les feedback de tous les talks"
echo " ./voxxrin.sh usage : Affiche cette documentation"
}

Expand Down Expand Up @@ -55,7 +57,6 @@ function getTalkFeedbacks() {
TALK_ID=$2
echo "Talk: $TALK_ID"
NOW=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "Now: $NOW"
#{{baseUrl}}/api/events/{{eventId}}/talks/{{talkId}}/feedbacks?token={{secretToken}}&updatedSince={{updatedSinceISODatetime}}
curl --request GET --silent --url "${VOXXRIN_BASE_URL}/api/events/${VOXXRIN_EVENT_ID}/talks/${TALK_ID}/feedback?token=${VOXXRIN_TOKEN}&updatedSince=${NOW}" > feedback-${TALK_ID}.json
}
Expand Down

0 comments on commit 3cc6ef5

Please sign in to comment.