Skip to content

Commit 7be638a

Browse files
authored
Merge pull request kepano#16 from ilmeskio/patch-1
Add author and senderEmail in Google Mail template
2 parents 66ed292 + b5b410d commit 7be638a

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

templates/google-mail-clipper.json

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"schemaVersion": "0.1.0",
33
"name": "Google Mail",
44
"behavior": "create",
5-
"noteContentFormat": "\n#mail/unread\n\n> [!INFO]+ Message details\n> Received: {{selector:span[class=\"g3\"]?title|last|date:\"YYYY-MM-DDTHH:mm\"}}\n> Subject: {{selector:div.ha > h2}}\n\n\n# {{selector:div.ha > h2}}\n\n{{selectorHtml:div.a3s|replace:\"tbody\":\"\"|replace:\"table\":\"\"|replace:\"td\":\"\"|replace:\"tr\":\"\"|markdown|strip_tags:(\"border\")|replace:\"<>\":\"\"|replace:\" \":\"\"|replace:\" \":\"\"}}\n",
5+
"noteContentFormat": "\n#mail/unread\n\n> [!INFO]+ Message details\n> Received: {{selector:div.adn.ads:not([style*=\"display: none\"]) .gE.iv.gt span.g3?title|first|date:\"YYYY-MM-DDTHH:mm\"}}\n> Subject: {{selector:div.ha:not(:where([style*=\"display: none\"]) *) > h2|first}}\n\n\n# {{selector:div.ha:not(:where([style*=\"display: none\"]) *) > h2|first}}\n\n\n\n\n{{selectorHtml:div.a3s:not(:where([style*=\"display: none\"]) *)|first|markdown}}\n",
66
"properties": [
77
{
88
"name": "created",
@@ -21,18 +21,33 @@
2121
},
2222
{
2323
"name": "received",
24-
"value": "{{selector:span[class=\\\"g3\\\"]?title|last|date:\\\"YYYY-MM-DDTHH:mm\\\"}}",
24+
"value": "{{selector:div.adn.ads:not([style*=\\\"display: none\\\"]) .gE.iv.gt span.g3?title|first|date:\\\"YYYY-MM-DDTHH:mm\\\"}}",
2525
"type": "datetime"
2626
},
2727
{
2828
"name": "subject",
29-
"value": "{{selector:div.ha > h2}}",
29+
"value": "{{selector:div.ha:not(:where([style*=\\\"display: none\\\"]) *) > h2|first}}",
3030
"type": "text"
31+
},
32+
{
33+
"name": "author",
34+
"value": "{{selector:span[class=\\\"gD\\\"]:not(:where([style*=\\\"display: none\\\"]) *)?name|wikilink|first}}",
35+
"type": "multitext"
36+
},
37+
{
38+
"name": "senderEmail",
39+
"value": "{{selector:span[class=\\\"gD\\\"]:not(:where([style*=\\\"display: none\\\"]) *)?email|first}}",
40+
"type": "text"
41+
},
42+
{
43+
"name": "tags",
44+
"value": "email,clippings",
45+
"type": "multitext"
3146
}
3247
],
3348
"triggers": [
3449
"https://mail.google.com/mail"
3550
],
36-
"noteNameFormat": "{{selector:span[class=\"g3\"]?title|date:\"YYYY-MM-DD\"}} MAIL {{selector:div.ha > h2|safe_name}}",
37-
"path": "mail"
38-
}
51+
"noteNameFormat": "{{selector:div.adn.ads:not([style*=\"display: none\"]) .gE.iv.gt span.g3?title|first|date:\"YYYY-MM-DD\"}} MAIL {{selector:div.ha:not(:where([style*=\"display: none\"]) *) > h2|safe_name}}",
52+
"path": "Clippings"
53+
}

0 commit comments

Comments
 (0)