# Publish Readwise Highlights to Blogger Via Evernote and IFTTT
## Metadata
**Status**:: #x
**Zettel**:: #zettel/permanent
**Created**:: [[2022-10-13]]
**Kind**:: #ifttt-applet
**Topic**:: [[♯ IFTTT]]
**URL**:: [ifttt.com](https://ifttt.com/applets/y8NYt2vU-evernote-notebook-readwise-blogger-ianshighlights)
## Applet
If new note in notebook Readwise, then create a post in blogger with:
### Title
```
{{Title}}
```
### Body
```
{{BodyHTML}}
```
## Filter
### Example Input
```html
<p>```css<br />a {<br />␣␣␣␣text-decoration: none;<br />␣␣␣␣background-image: linear-gradient(currentColor, currentColor);<br />␣␣␣␣background-position: 0% 100%;<br />␣␣␣␣background-repeat: no-repeat;<br />␣␣␣␣background-size: 0% 2px;<br />␣␣␣␣transition: background-size .3s;<br />}</p>
<p>a:hover, a:focus {<br />␣␣␣␣background-size: 100% 2px;<br />}<br />```</p>
```
### Script
- [x] Extract tags from the notes (todoist:: [Extract tags when publish Readwise highlights to Blogger: Todoist](https://todoist.com/app/task/6258867234))
```javascript
let body = Evernote.newNoteInNotebook.BodyHTML;
const linkRegex = /(!?)\[([^\]]+)\]\(([^)]+)\)/g;
const codeRegex = /<p>```\s*[^<]*(?:<br \/>)?(.*?)<br \/>```<\/p>/gs
body = body.replace(linkRegex, (match, bang, title, url) => {
if (bang === '!') {
return `<img src="${url}" alt="${title}" />`;
}
return `<a href="${url}">${title}</a>`;
});
body = body.replace(/␣/g, ' ');
body = body.replace(codeRegex, '<pre>$1</pre>');
const tagsMatch = body.match(/<p><strong><span>Tags:<\/span><\/strong>((?:\s*<span>[^<]+<\/span>)+)<\/p>/);
if (tagsMatch) {
const tags = tagsMatch[1].replace(/<\/?span>/g, ' ').trim().replace(/\s+/g, ', ');
Blogger.createPostBlogger.setLabels(tags);
}
Blogger.createPostBlogger.setBody(body);
```