This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="fr"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Lecteur Ecard</title> | |
| <link rel="stylesheet" href="https://www.cartesvirtuelles.fr/inc/css/reset.css"> | |
| <!-- <link rel="stylesheet" href="inc/css/styles.css?v--><!--">--> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ffmpeg -i accompagnement.mkv -ss 3 -c copy accompagnement-trimmed.mkv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ffmpeg -i solo.mkv -i accompagnement-trimmed.mkv -filter_complex "[0:v][1:v]hstack=inputs=2[v]; [0:a][1:a]amerge[a]" -map "[v]" -map "[a]" -ac 2 valse-melanco.mkv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const sheetId = await addEmptySheet(sheetsAPI, sheetName); | |
| const theData = await readCSVContent(sheetsAPI, data, sheetName); | |
| await populateAndStyle(sheetsAPI, theData, sheetId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function setColumnStyle(sheetsAPI, sheetId) { | |
| return new Promise((resolve, reject) => { | |
| const setStyleParams = { | |
| spreadsheetId: process.env.SPREADSHEET_ID, | |
| resource: { | |
| requests: [ | |
| { | |
| repeatCell: { | |
| range: { | |
| sheetId: sheetId, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function populateAndStyle(sheetsAPI, theData, sheetId) { | |
| return new Promise((resolve, reject) => { | |
| // Using 'batchUpdate' allows for multiple 'requests' to be sent in a single batch. | |
| // Populate the sheet referenced by its ID with the data received (a CSV string) | |
| // Style: set first row font size to 11 and to Bold. Exercise left for the reader: resize columns | |
| const dataAndStyle = { | |
| spreadsheetId: process.env.SPREADSHEET_ID, | |
| resource: { | |
| requests: [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function readCSVContent(sheetsAPI, file, sheetName) { | |
| return new Promise((resolve, reject) => { | |
| const storage = new Storage(); | |
| let fileContents = new Buffer(''); | |
| let rows = []; | |
| storage | |
| .bucket(file.bucket) | |
| .file(file.name) | |
| .createReadStream() | |
| .on("error", function(err) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function addEmptySheet(sheetsAPI, sheetName) { | |
| return new Promise((resolve, reject) => { | |
| const emptySheetParams = { | |
| spreadsheetId: process.env.SPREADSHEET_ID, | |
| resource: { | |
| requests: [ | |
| { | |
| addSheet: { | |
| properties: { | |
| title: sheetName, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const sheetsAPI = google.sheets({version: 'v4', auth}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const auth = await google.auth.getClient({ | |
| scopes: [ | |
| "https://www.googleapis.com/auth/spreadsheets", | |
| "https://www.googleapis.com/auth/devstorage.read_only" | |
| ] | |
| }); |
NewerOlder