add 1:23 parsing, pdf review
vecāks
46695b8236
revīzija
d25ff6d704
10
index.js
10
index.js
|
@ -185,6 +185,8 @@ The total is ${total} to ${iban} (same as always). Thanks!`
|
|||
userId: 'me',
|
||||
media: {mimeType: 'message/rfc822', body: info.message}
|
||||
})
|
||||
console.log("Opening pdf for review")
|
||||
await exec(`zathura "${pdf}" || mupdf "${pdf}"`)
|
||||
console.log(`Draft created, please review and send: https://mail.google.com/mail/u/${email}/#drafts?compose=${draft.data.message.id}`)
|
||||
}
|
||||
const datefmt = date =>
|
||||
|
@ -205,7 +207,13 @@ class App {
|
|||
}
|
||||
async update(sheetname, startDate, endDate, hours) { // set values in sheet
|
||||
console.log("Setting data in", sheetname)
|
||||
hours = +hours
|
||||
if (hours.indexOf && hours.indexOf(':') != -1) {
|
||||
const [hour, min] = hours.split(':')
|
||||
hours = +hour
|
||||
hours += (+min) / 60
|
||||
} else {
|
||||
hours = +hours
|
||||
}
|
||||
if (isNaN(hours)) {
|
||||
throw "hours argument not a float or int"
|
||||
}
|
||||
|
|
Notiek ielāde…
Atsaukties uz šo jaunā problēmā