Replace README.md with README.adoc.
This commit is contained in:
parent
3d25bb1a4b
commit
2a6712e04c
104
README.adoc
Normal file
104
README.adoc
Normal file
|
@ -0,0 +1,104 @@
|
|||
:uri-gcc: https://gcc.gnu.org/
|
||||
:uri-cmake: https://cmake.org/
|
||||
:uri-asciidoc: http://asciidoc.org/
|
||||
:uri-catch: https://github.com/catchorg/Catch2
|
||||
:uri-boost: https://www.boost.org/
|
||||
:uri-mastodon-cpp: https://schlomp.space/tastytea/mastodon-cpp
|
||||
:uri-jsoncpp: https://github.com/open-source-parsers/jsoncpp
|
||||
|
||||
*mastorss* dumps RSS feeds into a mastodon account. Supports RSS 2.0 but not
|
||||
RSS 0.92. Does not support Atom at the moment.
|
||||
|
||||
Each `<item>` in feeds must have `<link>`, `<title>` and `<description>`.
|
||||
|
||||
== Install
|
||||
|
||||
=== Dependencies
|
||||
|
||||
* Tested OS: Linux
|
||||
* C++ compiler (tested: link:{uri-gcc}[gcc] 5 / 8)
|
||||
* link:{uri-cmake}[cmake] (tested: 3.14 / 3.9)
|
||||
* link:{uri-boost}[boost] (tested: 1.71 / 1.62)
|
||||
* link:{uri-mastodon-cpp}[mastodon-cpp] (at least: 0.111.2)
|
||||
* link:{uri-jsoncpp}[jsoncpp] (tested: 1.9 / 1.7)
|
||||
|
||||
=== Get sourcecode
|
||||
|
||||
==== Development version
|
||||
|
||||
[source,shell]
|
||||
--------------------------------------------------------------------------------
|
||||
git clone https://schlomp.space/tastytea/mastorss.git
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
=== Compile
|
||||
|
||||
[source,shell]
|
||||
--------------------------------------------------------------------------------
|
||||
mkdir build
|
||||
cd build/
|
||||
cmake ..
|
||||
cmake --build .
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Install with `make install`.
|
||||
|
||||
== Usage
|
||||
|
||||
Put `watchwords.json` into `${XDG_CONFIG_HOME}/mastorss/`
|
||||
footnote:[`${XDG_CONFIG_HOME}` is usually `~/.config/`]. Launch with profile
|
||||
name. The first occurence of every watchword in an RSS item will be turned into
|
||||
a hashtag. For profile-specific watchwords see the example in
|
||||
`watchwords.json`. In the first run only the newest entry is posted.
|
||||
|
||||
The profile can't be named "global".
|
||||
|
||||
=== Example session
|
||||
|
||||
[source,shellsession]
|
||||
--------------------------------------------------------------------------------
|
||||
% mastorss example
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
=== Example config file
|
||||
|
||||
${HOME}/.config/mastorss/config-example.json
|
||||
|
||||
[source,json]
|
||||
--------------------------------------------------------------------------------
|
||||
{
|
||||
"example": {
|
||||
"access_token": "123abc",
|
||||
"append": "#bot",
|
||||
"feedurl": "https:\/\/example.com\/feed.rss",
|
||||
"fixes":
|
||||
[
|
||||
"delete this",
|
||||
"<p>[Rr]ead more(\.{3}|…)</p>"
|
||||
],
|
||||
"instance": "botsin.space",
|
||||
"interval" : 600,
|
||||
"max_size": 400,
|
||||
"skip":
|
||||
[
|
||||
"If the entry starts with this, skip it",
|
||||
"Skip me too!"
|
||||
],
|
||||
"titles_as_cw" : false,
|
||||
"titles_only": false
|
||||
}
|
||||
}
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
=== Error codes
|
||||
|
||||
Same as
|
||||
link:{uri-mastodon-cpp}/src/branch/master/README.adoc#_error_codes[mastodon-cpp],
|
||||
plus:
|
||||
|
||||
[%autowidth,cols=">,<"]
|
||||
|===========================================================
|
||||
| Code | Explanation
|
||||
|
||||
| 1 | Could not send post for unknown reasons
|
||||
|===========================================================
|
90
README.md
90
README.md
|
@ -1,90 +0,0 @@
|
|||
**mastorss** dumps RSS feeds into a mastodon account.
|
||||
Supports RSS 2.0 but not RSS 0.92. Does not support Atom at the moment.
|
||||
|
||||
\<item\>s in feeds must have \<link\>, \<title\> and \<description\>.
|
||||
|
||||
The documentation is far from complete, sorry.
|
||||
|
||||
# Install
|
||||
|
||||
## Dependencies
|
||||
|
||||
* Tested OS: Linux
|
||||
* C++ compiler (tested: gcc 5 / 6 / 7 / 8)
|
||||
* [cmake](https://cmake.org/) (tested: 3.9 / 3.12)
|
||||
* [boost](http://www.boost.org/) (tested: 1.65 / 1.62)
|
||||
* [curlpp](http://www.curlpp.org/) (tested: 0.8)
|
||||
* [mastodon-cpp](https://schlomp.space/tastytea/mastodon-cpp) (at least:
|
||||
0.105.0)
|
||||
* [jsoncpp](https://github.com/open-source-parsers/jsoncpp) (tested: 1.8 / 1.7)
|
||||
|
||||
## Get sourcecode
|
||||
|
||||
### Development version
|
||||
|
||||
git clone https://schlomp.space/tastytea/mastorss.git
|
||||
|
||||
## Compile
|
||||
|
||||
mkdir build
|
||||
cd build/
|
||||
cmake ..
|
||||
make
|
||||
|
||||
## Install
|
||||
|
||||
Install with `make install`.
|
||||
|
||||
# Usage
|
||||
|
||||
Put `watchwords.json` into `~/.config/mastorss/`. Launch with profile name. The
|
||||
first occurence of every watchword in an RSS item will be turned into a hashtag.
|
||||
For profile-specific watchwords see the example in `watchwords.json`. In the
|
||||
first run only the newest entry is tooted.
|
||||
|
||||
The profile can't be named "global".
|
||||
|
||||
## Example config file
|
||||
|
||||
${HOME}/.config/mastorss/config-example.json
|
||||
|
||||
{
|
||||
"example": {
|
||||
"instance": "botsin.space",
|
||||
"feedurl": "https:\/\/example.com\/feed.rss",
|
||||
"access_token": "123abc",
|
||||
"max_size": 400,
|
||||
"titles_only": false,
|
||||
"skip":
|
||||
[
|
||||
"If the entry starts with this, skip it",
|
||||
"Skip me too!"
|
||||
],
|
||||
"fixes":
|
||||
[
|
||||
"delete this",
|
||||
"<p>[Rr]ead more(\.{3}|…)</p>"
|
||||
],
|
||||
"append": "#bot"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
## Error codes
|
||||
|
||||
Same as
|
||||
[mastodon-cpp](https://schlomp.space/tastytea/mastodon-cpp/src/branch/master/README.adoc#_error_codes),
|
||||
plus:
|
||||
|
||||
| Code | Explanation |
|
||||
| --------: |:----------------------------------------|
|
||||
| 1 | Could not send post for unknown reasons |
|
||||
|
||||
# Copyright
|
||||
|
||||
``` text
|
||||
Copyright © 2018, 2019 tastytea <tastytea@tastytea.de>.
|
||||
License GPLv3: GNU GPL version 3 <https://www.gnu.org/licenses/gpl-3.0.html>.
|
||||
This program comes with ABSOLUTELY NO WARRANTY. This is free software,
|
||||
and you are welcome to redistribute it under certain conditions.
|
||||
```
|
Loading…
Reference in New Issue
Block a user