Trying to filter microblogs from pluto output

8 views
Skip to first unread message

infominer

unread,
May 12, 2020, 8:01:55 PM5/12/20
to wwwmake
setting up a planet, and running into blogs that include their microblogs\twitter posts, etc.

These are quite frequent, so taking up a lot of space on the feed... I noticed they have no Title, as compared with regular 'long-form' blog posts...

so I was thinking it should be simple enough to add some if then else to the html template, or even remove entries from the database... but I'm not quite sure.

any recommendations would be appreciated

thanks!

Gerald Bauer

unread,
May 14, 2020, 5:34:34 AM5/14/20
to www...@googlegroups.com
Hello,
First thanks for sharing the GitHub Action recipe / setup. Love it!

About filtering (micro) posts, that is, feed items - if you know
some ruby scripting / programming (and some SQL for database queries)
than you can do everything in your templates since the use ERB (that
is, embedded ruby).

Unfortunately - I don't know any micropost example I can point
you but checking if the title is empty (or blank?) looks like a good
way to filter e.g. use something like

<% if item.title.blank? %>
.... assume (micro) post
<% else %>
... assume standard / regular post
<% end %>

Not sure if this helps. Good luck. Cheers. Prost.

infominer

unread,
May 16, 2020, 10:33:16 AM5/16/20
to wwwmake
Hey, thanks Gerald! I'm glad you appreciate it. I know I do. It makes this project really portable!

Thanks for the intro to ERB, that definitely helped. Something I can figure out, as I go.

I'm pretty stoked about Pluto. I'll enjoy exploring the possibilities.
Reply all
Reply to author
Forward
0 new messages