Coder Social home page Coder Social logo

feedfoo's Introduction

feedfoo - do things based on new RSS feed items

Here's the current use case:

You have an RSS feed and want to send a status update about it to the fediverse.

There's an easy way and there's this tool.

Requirements

  • some kind of go compiler, 1.17.2 works
  • madonctl
  • an RSS feed as understood by gofeed

How to install

First, get madonctl to run. See the README

go get -u github.com/McKael/madonctl
$GOPATH/bin/madonctl config dump -i mastodon.social -L username@domain -P password

$GOPATH/bin/madonctl toot "Yay, test"

Then install feedfoo:

go get -u github.com/winks/feedfoo
$GOPATH/bin/feedfoo

How to build

Get feedfoo with deps:

git clone https://github.com/winks/feedfoo
cd feedfoo
go get -u github.com/mmcdole/gofeed
go build
./feedfoo -help

How to use

Try it out safely:

./feedfoo --feed https://f5n.org/blog/atom.xml --cache ./dump.json -- echo "%%TEXT%%"

Now try it out for real:

./feedfoo --feed https://f5n.org/blog/atom.xml --cache ./dump.json -- madonctl toot "%%TEXT%%"

This shouldn't do anything if you already ran it once to fill the cache file. Maybe manually delete the lastest post from the json or update the feed. I guess "cache" is the wrong term. More like "ignored" or "done".

TODO

  • templated string instead of hardcoded "New blog post: TITLE LINK"

License

ISC

feedfoo's People

Contributors

winks avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.