add 1:23 parsing, pdf review

master
Yorick van Pelt 2019-11-01 15:12:17 +07:00
parent 46695b8236
commit d25ff6d704
Signed by: yorick
GPG Key ID: A36E70F9DC014A15
1 changed files with 9 additions and 1 deletions

View File

@ -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"
}