You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hugobot/README.md

78 lines
2.4 KiB
Markdown

5 years ago
**MIRRORED FROM**: https://git.sp4ke.com/sp4ke/hugobot
# HUGOBOT
*hugobot* is a an automated content fetch and aggregation bot for [Hugo][hugo] data
driven websites. It has the following features:
## Data fetch
5 years ago
- Use the `feeds` table to register feeds that will periodically get fetched, stored
5 years ago
and exported into the hugo project.
5 years ago
- Currently handles these types of feeds: `RSS`, `Github Releases`, `Newsletters`
- Define your own feed types by implementing the `JobHandler` interface (see
`handlers/handlers.go`).
5 years ago
- Hugobot automatically fetches new posts from the registered.
- Sqlite is used for storage. `feeds` and `posts` tables.
5 years ago
- 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.
5 years ago
- It can export `markdown` files or `json/toml` data files.
- All fields in the exported files can be customized.
5 years ago
- You can define custom output formats by using the `FormatHandler` interface.
5 years ago
- You can register custom filters and post processing on exported posts to avoid
5 years ago
changing the raw data stored in the db.
5 years ago
- You can force data export using the CLI.
5 years ago
## API
5 years ago
- Uses `gin-gonic`.
5 years ago
- *hugobot* also includes a webserver API that can be used with Hugo [Data
Driven Mode][data-driven].
5 years ago
- 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.
5 years ago
- An example usage is the automated generation of Bitcoin addresses for new
articles on [bitcointechweekly.com][btw-btc]
5 years ago
## Other
5 years ago
- Some commands are available through the CLI (`github.com/urfave/cli`), you
can add your own custom commands.
5 years ago
5 years ago
## Sqliteweb interface
- See Docker files
5 years ago
## 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.
5 years ago
## Contribution
- PRs welcome, current priority is to add tests.
- Check the [TODO](#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).
5 years ago
[data-driven]:https://gohugo.io/templates/data-templates/#data-driven-content
[btw-btc]:https://bitcointechweekly.com/btc/3Jv15g4G5LDnBJPDh1e2ja8NPnADzMxhVh
[hugo]:https://gohugo.io
5 years ago