add 1:23 parsing, pdf review
parent
46695b8236
commit
d25ff6d704
10
index.js
10
index.js
|
@ -185,6 +185,8 @@ The total is ${total} to ${iban} (same as always). Thanks!`
|
||||||
userId: 'me',
|
userId: 'me',
|
||||||
media: {mimeType: 'message/rfc822', body: info.message}
|
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}`)
|
console.log(`Draft created, please review and send: https://mail.google.com/mail/u/${email}/#drafts?compose=${draft.data.message.id}`)
|
||||||
}
|
}
|
||||||
const datefmt = date =>
|
const datefmt = date =>
|
||||||
|
@ -205,7 +207,13 @@ class App {
|
||||||
}
|
}
|
||||||
async update(sheetname, startDate, endDate, hours) { // set values in sheet
|
async update(sheetname, startDate, endDate, hours) { // set values in sheet
|
||||||
console.log("Setting data in", sheetname)
|
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)) {
|
if (isNaN(hours)) {
|
||||||
throw "hours argument not a float or int"
|
throw "hours argument not a float or int"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue