Skip to content

Commit

Permalink
oct2022: schedule updates
Browse files Browse the repository at this point in the history
  • Loading branch information
komplexb committed Oct 28, 2022
1 parent 5b4c5c7 commit 439795c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 23 deletions.
50 changes: 31 additions & 19 deletions events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,33 @@ dev:

prod:
- schedule:
rate: cron(0 7 ? * SAT-SUN *)
rate: cron(0 7 8,22 * ? *)
name: 'stay-in-touch'
description: 'Stay In Touch'
input:
onenoteSettings:
notebookName: '2nd Brain'
sectionName: 'Stay In Touch'
messageSettings:
channelHandle: '@notifyer_quotes'
disablePreview: false
titlePrefix: 'Next weekend, #CatchUpWith...'
- schedule:
rate: cron(0 7 1,15 * ? *)
name: 'notifyer-couple-skills'
description: 'Weekend Afternoons | Sydney | AEDT'
description: 'Couple Skills'
input:
onenoteSettings:
notebookName: '2nd Brain'
sectionName: 'Couple Skills'
messageSettings:
channelHandle: '@notifyer_quotes'
disablePreview: false
titlePrefix: '👩‍❤️‍💋‍👨 #CoupleSkills 🥰'
titlePrefix: ' #CoupleSkills'
- schedule:
rate: cron(15 9 ? * SUN,WED *)
rate: cron(0 7 2,16 * ? *)
name: 'notifyer-sexy-time'
description: 'Sunday, Wednesday Nights | Sydney | AEDT'
description: 'Intimacy Tips'
input:
onenoteSettings:
notebookName: '2nd Brain'
Expand All @@ -52,47 +64,47 @@ prod:
disablePreview: false
titlePrefix: '🍑 #SexyTime 🍆'
- schedule:
rate: cron(0 21 ? * FRI-SAT *)
name: 'weekend-psalms'
description: 'Weekend Psalms | Sydney | AEDT'
rate: cron(0 19 ? * SUN-THUR *)
name: 'notifyer-weekend-psalms'
description: 'Psalms | Sydney | AEDT'
input:
onenoteSettings:
notebookName: '2nd Brain'
sectionName: 'The Psalms'
messageSettings:
channelHandle: '@notifyer_quotes'
channelHandle: '@bb_2nd_brain'
disablePreview: true
titlePrefix: '✝️'
titlePrefix: '#psalms'
- schedule:
rate: cron(0 19 ? * SUN-THUR *)
rate: cron(0 21 ? * FRI-SAT *)
name: 'notifyer-votd'
description: 'Verse of the Day - 6AM Every Other Day | Sydney | AEDT'
description: 'Verse of the Day| Sydney | AEDT'
input:
onenoteSettings:
notebookName: '2nd Brain'
sectionName: 'Verses'
messageSettings:
channelHandle: '@bb_2nd_brain'
disablePreview: true
titlePrefix: '✝️'
titlePrefix: '#votd'
showEditLink: true
- schedule:
rate: cron(0 19 ? * SUN-THUR *)
rate: cron(0 19 ? * FRI-SAT *)
name: 'notifyer-depression'
description: 'Depression - 6AM Every Other Day | Sydney | AEDT'
description: 'Depression | Sydney | AEDT'
input:
onenoteSettings:
notebookName: '2nd Brain'
sectionName: 'Depression'
messageSettings:
channelHandle: '@bb_2nd_brain'
disablePreview: true
titlePrefix: '✝️'
titlePrefix: '#depression'
showEditLink: true
- schedule:
rate: cron(0 9 ? * SUN-THUR *)
name: 'notifyer-mantras'
description: 'Weeknight Mantras | Sydney | AEDT'
description: 'Mantras | Sydney | AEDT'
input:
onenoteSettings:
notebookName: '2nd Brain'
Expand All @@ -105,7 +117,7 @@ prod:
- schedule:
rate: cron(0 9 ? * SUN-THUR *)
name: 'notifyer-quotes'
description: 'Weeknight Quotes | Sydney | AEDT'
description: 'Quotes | Sydney | AEDT'
input:
onenoteSettings:
notebookName: '2nd Brain'
Expand All @@ -126,6 +138,6 @@ prod:
messageSettings:
channelHandle: '@bb_2nd_brain'
disablePreview: true
titlePrefix: ''
titlePrefix: '#lovetips'
showEditLink: true

11 changes: 7 additions & 4 deletions lib/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ async function formatNoteBody(url) {

// remove images
const el = wrapper.querySelector('div')
for (let img of el.querySelectorAll('img')) {
console.log("removing image: ", img.getAttribute("alt"))
img.remove()
if (el) {
for (let img of el.querySelectorAll('img')) {
console.log("removing image: ", img.getAttribute("alt"))
img.remove()
}
return htmlToMarkdown(el.toString())
}
return htmlToMarkdown(el.toString())
return "";
})
.catch(function (err) {
console.error("formatNoteBody()", err)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"app": "sls invoke local -f app",
"deploy": "sls deploy --stage prod",
"predeploy": "npm run remove",
"dev": "sls invoke local -f app --watch --path ./eventData.json",
"offline": "sls offline start --port 4500",
"refresh": "sls invoke local -f refresh",
Expand Down

0 comments on commit 439795c

Please sign in to comment.