Skip to content

Commit

Permalink
Add 'embedimage' filter
Browse files Browse the repository at this point in the history
  • Loading branch information
slurdge committed Nov 7, 2020
1 parent da197ea commit 06441cb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

v0.6.0
------

- Add 'embedimage' filter.

v0.5.3
------

Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ The available filters are as follow:
- digest: Make a digest of all entries (optional heading level, default is 2)
- combine: Combine all the entries into one source and use the first entry title as source title. Useful for merge sources
- links: Rewrite relative links src="// and href="// to have an https:// prefix
- embedimage: Embed a picture if the entry has an attachment with a type of picture (optional position: top|bottom|left|right, default is top)
- replace: Replace a string with another. Use with an argument like this: replace(myreplace) and define
```
[replace.myreplace]
Expand Down Expand Up @@ -230,3 +231,15 @@ email_from = "Reddit <reddit@example.com>"
Feel free to open bugs or PR for more sources, more filters suggestions.

If you encounter a problematic feed, please open a bug with the content of the feed attached.

## Future

Here is a list of things that could be nice

* image inliner
* embedded scripting language for filters&manipulation
* remove tags for instagram
* footer text
* allow other templates for email
* remove tracker img for feedburner
* use enclosure of the feed as header image
8 changes: 0 additions & 8 deletions TODO.md

This file was deleted.

2 changes: 1 addition & 1 deletion internal/goeland/filters/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var filters = map[string]filter{
"digest": filter{"Make a digest of all entries (optional heading level, default is " + string(defaultHeaderLevel) + ")", filterDigest},
"combine": filter{"Combine all the entries into one source and use the first entry title as source title. Useful for merge sources", filterCombine},
"links": filter{`Rewrite relative links src="// and href="// to have an https:// prefix`, filterRelativeLinks},
"embedimage": filter{`Embed a picture if the entry has an attachment with a type of picture`, filterEmbedImage},
"embedimage": filter{`Embed a picture if the entry has an attachment with a type of picture (optional position: top|bottom|left|right, default is top)`, filterEmbedImage},
"replace": filter{`Replace a string with another. Use with an argument like this: replace(myreplace) and define
[replace.myreplace]
from="A string"
Expand Down

0 comments on commit 06441cb

Please sign in to comment.