Browse Source

add 1:23 parsing, pdf review

master
Yorick van Pelt 2 months ago
parent
commit
d25ff6d704
Signed by: Yorick van Pelt <yorick@yorickvanpelt.nl> GPG Key ID: A36E70F9DC014A15
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      index.js

+ 9
- 1
index.js 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"
}

Loading…
Cancel
Save