Skip to content

Instantly share code, notes, and snippets.

@stonematt
Last active January 19, 2023 22:13
Show Gist options
  • Save stonematt/c9a59ad0d69d389a71807a69e2c59989 to your computer and use it in GitHub Desktop.
Save stonematt/c9a59ad0d69d389a71807a69e2c59989 to your computer and use it in GitHub Desktop.
NotePlan: This is my meeting note template for NotePlan. It extracts the most valuable information for me from the appointment and reformats at, so that the event is tagged with all the persons attending it. But instead of the plain name with a mailto link, I prefer to build an @-based tagging. Special thanks to: https://gist.github.com/oliveran…
---
title: 3.insertMeeting
type: meeting-note
append: <current>
documentation: https://help.noteplan.co/article/134-meeting-notes
---
<%
let attendeeNames = eventAttendees.match(/\[(.+?)\]\(mailto:(.+?)\)/gi)
let emails_to_ignore = ['[email protected]'];
for (let I = 0; I < emails_to_ignore.length; I++) {
attendeeNames = attendeeNames.filter(name => !name.includes(emails_to_ignore[I]));
}
const attendeeTags = (attendeeNames || [])
.map(s => {
return s.replace(/\[(.+?)\]\(mailto:.+?@(.+?)\)/, (m, nameGroup, emailGroup) => {
const name = nameGroup
.split(",")
.reverse()
.map((s) => s.replace(/\s+/g, ""))
.join("")
.split(".").map((t) => { return t.toLowerCase() });
let company = emailGroup
.split(".")
.reverse()
.slice(1)
.join(".")
.toLowerCase();
if (company !== "") { company = company + "/"}
return ["@", company, name].join("")
})
})
const attendeeTagsString = [...new Set(attendeeTags)].sort().join(", ")
const teamsMeetingLinkCandidates = eventNotes
.match(/<(https:\/\/teams\.microsoft\.com.*?meetup-join.*?)>/gi)
const teamsMeetingLink = (teamsMeetingLinkCandidates || [])
.map(s => s.replace(/<(https:\/\/teams\.microsoft\.com.*?meetup-join.*?)>/, (m, g) => g))
.join("")
const teamsMeetingString = teamsMeetingLink !== "" ? " - πŸ§‘πŸ»β€πŸ’»[Teams Meeting](" + teamsMeetingLink + ")" : ""
const zoomMeetingLinkCandidates = eventNotes
.match(/(https:\/\/.*?\.zoom\.us\/.*)/gi)
const zoomMeetingLink = (zoomMeetingLinkCandidates || [])
.map(s => s.replace(/(https:\/\/.*?\.zoom\.us\/.*)/, (m, g) => g))
.join("")
const zoomMeetingString = zoomMeetingLink !== "" ? " - πŸ§‘πŸ»β€πŸ’»[Zoom Meeting](" + zoomMeetingLink + ")" : ""
const googleMeetingLinkCandidates = eventNotes.match(/Join with Google Meet: (https:\/\/meet\.google\.com\/[^\s]+)/gi)
const googleMeetingLink = (googleMeetingLinkCandidates[0] || "" ).replace(/Join with Google Meet: /,"")
const googleMeetingString = googleMeetingLink !== "" ? " - πŸ§‘πŸ»β€πŸ’»[Google Meeting](" + googleMeetingLink + ")" : ""
-%>
---
### πŸ‘‰ <%- eventTitle %>
*<%- eventDate('D.M.YYYY h:mm') %>-<%- eventEndDate('H:mm') %><%- teamsMeetingString %><%- zoomMeetingString %><%- googleMeetingString %>
<%- attendeeTagsString %>
-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment