Content fetch and aggregation bot for hugo data-driven websites
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Chakib Benziane 9c27502304 update readme 4 months ago
bitcoin initial 4 months ago
config initial 4 months ago
db initial 4 months ago
encoder initial 4 months ago
export initial 4 months ago
feeds initial 4 months ago
filters initial 4 months ago
github initial 4 months ago
handlers initial 4 months ago
logging initial 4 months ago
posts initial 4 months ago
static initial 4 months ago
types initial 4 months ago
utils initial 4 months ago
.gitignore initial 4 months ago
Dockerfile initial 4 months ago
Dockerfile-sqliteweb initial 4 months ago
LICENSE add license 4 months ago
Makefile initial 4 months ago
README.md update readme 4 months ago
api.go initial 4 months ago
commands.go initial 4 months ago
config.toml initial 4 months ago
docker-compose.yml initial 4 months ago
docker-entrypoint.sh initial 4 months ago
feed_commands.go initial 4 months ago
go.mod initial 4 months ago
go.sum initial 4 months ago
jobs.go initial 4 months ago
main.go initial 4 months ago
parse_test.go initial 4 months ago
posts_test.go initial 4 months ago
scheduler.go initial 4 months ago
server.go initial 4 months ago

README.md

MIRRORED FROM: https://git.sp4ke.com/sp4ke/hugobot

HUGOBOT

hugobot is a an automated content fetch and aggregation bot for Hugo data driven websites. It has the following features:

Data fetch

  • Use the feeds table to register feeds that will periodically get fetched, stored and exported into the hugo project.
  • Currently handles these types of feeds: RSS, Github Releases, Newsletters
  • Define your own feed types by implementing the JobHandler interface (see handlers/handlers.go).
  • Hugobot automatically fetches new posts from the registered.
  • Sqlite is used for storage. feeds and posts tables.
  • The scheduler can handle any number of tasks and uses leveldb for caching/resuming jobs.

Hugo export

  • Data is automatically exported to the configured Hugo website path.
  • It can export markdown files or json/toml data files.
  • All fields in the exported files can be customized.
  • You can define custom output formats by using the FormatHandler interface.
  • You can register custom filters and post processing on exported posts to avoid changing the raw data stored in the db.
  • You can force data export using the CLI.

API

  • Uses gin-gonic.

  • hugobot also includes a webserver API that can be used with Hugo Data Driven Mode.

  • Insert and query data from the db. This is still a WIP, you can easily add the missing code on the API side to automate adding/querying data from the DB.

  • An example usage is the automated generation of Bitcoin addresses for new articles on bitcointechweekly.com

Other

  • Some commands are available through the CLI (github.com/urfave/cli), you can add your own custom commands.

Sqliteweb interface

  • See Docker files

First time usage

  • The database is automatically generated the first time you run the program. You can add your feeds straight into the sqlite db using your favorite sqlite GUI or the provided web gui in the docker-compose file.

Contribution

  • PRs welcome, current priority is to add tests.
  • Check the TODO section.

TODO:

  • Add tests.
  • Handle more feed formats: tweets, mailing-list emails
  • TLS support in the API (not a priority, can be done with a reverse proxy).