Commit Graph

46 Commits

Author SHA1 Message Date
2748ac0da6 Fix: Posts published while feediverse is running are not tooted.
Fix race-condition: If a post was published within the short period of
time between fetching the RSS feed and saving the config-file, this
post was not tooted. This was caused by the timestamp in the
config-file having been the time when the file was written, not when
the feed was fetched.

I (hopefully) fixed this by storing the latest post's timestamp in the
config file. This still might cause the same issue if several feeds
are checked using the same config file.
2020-09-25 21:08:36 +02:00
7c7f1c049c With dry-run, print title of post.
This is to easy validation results.
2020-09-25 21:03:56 +02:00
60d74188c3 Enhance cleanup of fetched texts.
Remove all HTML-elements with a class "read-more" or a class matching
"read-more-*". This will remove the "Read More".
2020-09-25 19:18:47 +02:00
5945a9f9cb Add work-around for verbose-mode on non-unicode terminals. 2019-09-16 14:49:08 +02:00
52cf05c09c Add feed config option generator.
This allows setting or overwriting the generator provided by
the feed.
2019-09-16 14:28:45 +02:00
7df2d306e4 Don't crash if feed does not contain a "generator" element. 2019-09-16 14:28:45 +02:00
17bba74f22 Readme: Add "Special Handling for Different Feed Generators".
I should have had added this when adding the special support
for Wordpress in around e6a16dbe55.
2019-09-16 14:28:40 +02:00
b57bc48d0d Update readme. 2019-04-23 22:44:50 +02:00
9e1a94d4ca Add cleaning up white-space in fetched texts. 2019-04-23 22:39:37 +02:00
09a3588f71 Document template element '{content}'. 2019-04-23 22:39:25 +02:00
e41073efbc Fix template element '{content}'.
This was the same as '{summary}' and needs more attention, too.
2019-04-23 22:38:42 +02:00
7a5b30aeef Add option -v/--verbose. 2019-04-23 21:59:00 +02:00
8e51b4344d Add command line option -n/--dry-run. 2019-04-23 21:56:04 +02:00
0b65eb8e21 Make adding images into the toot configurable.
Add an option "include_images" into the config file.
2019-04-16 14:02:07 +02:00
2d45df57f1 Minor code cleanup.
Preset config values when reading config file. This is
to ease introducing new options (like the next commit
will do).
2019-04-16 14:02:07 +02:00
e0dde90b7d On setup ask whether existing entries shall be tooted, too. 2019-04-16 14:02:06 +02:00
b0ba30b5f3 Minor code cleanup.
Add and use helper function to ask a yes/no question.
2019-04-16 14:02:06 +02:00
da5486d004 Fix: Mastodon allows posting 4 images max. 2019-04-16 14:02:06 +02:00
2624eed96b Fix: If last-updated is not given in config, no feeds are pushed.
The bug was: If last-updated was not given in the config, the current
date and time was used, inhibiting posting "old" entries.

Todo: Add an option to ask whether "old" entries shall be posted on
first run.
2019-04-16 12:07:42 +02:00
e6a16dbe55 For wordpress skip all images provided by a plugin. 2019-04-16 12:07:41 +02:00
d2e57bbc27 Add a work-around for buggy wordpress (urls encoded wrong). 2019-04-16 12:07:41 +02:00
ae78c8c16f Make "content" available in the template.
Depending on the feed, the adding content could be more
appropriate. Leave this choice to the user.
2019-04-16 12:07:41 +02:00
03d48992c7 Add detection of premalink for wordpress-generated feeds. 2019-04-16 12:07:41 +02:00
350f2bca3f Add detection of feed generator and pass it for get_entry().
This allows generator-specific handling of e.g. url.

For example in wordpress `id` is an ugly url, while the
speaking permalink is stored in a alternate link
2019-04-16 12:07:40 +02:00
83ed532680 Add retrieving images from RSS & posting them.
Collects image urls from summary, content and enclosures
(attachments).

This add urllib3 as requirement.
2019-04-16 12:04:20 +02:00
13d1dd2623 Fix deprecation warning when calling yaml.load().
This was the message: YAMLLoadWarning: calling yaml.load() without
Loader=... is deprecated, as the default Loader is unsafe
2019-03-31 00:00:54 +01:00
0b13bbbabe Very small code cleanup. 2019-03-31 00:00:53 +01:00
8886fd5d2d Remove HTML tags from content.
Do this as early as processing the entry so later steps can count
on it (esp. when counting characters)

Also add a new requirement: beautifulsoup4.
2019-03-31 00:00:53 +01:00
fc56be6d70 Filter entries prior to processing any entry.
This saves processing time, esp. since for most installation
there should not be so many changes and most times, there will
be zero entries to be posted, thus there is not need to process them.
2019-03-31 00:00:50 +01:00
e99c18b249 Sort entries in reverse published order.
In a feed typically the newest entries are on top, while the older
ones should be posted first. Thus reverse the order, based on
publish date.

Closes #4.
2019-03-30 23:59:40 +01:00
493c1ad3f3 Add minimal argparse support to get support for --help.
Closes #5.
2019-03-29 21:32:36 +01:00
37aedd9e56 try 499? 2018-10-23 19:45:16 -04:00
9adcf3342a truncate at 500 chars v0.0.10 2018-10-23 14:14:04 -04:00
346cea831a new version v0.0.9 2018-10-21 07:01:21 -04:00
e4d7de6128 new app creation now works 2018-10-21 07:00:09 -04:00
96d4d104d8 another post problem v0.0.8 2018-06-09 14:06:57 -04:00
814c10c803 new version (again) 2018-06-09 14:03:52 -04:00
625d6b7a4a fix mastodon posting 2018-06-09 14:03:18 -04:00
96567eef7c docs 2018-06-09 13:53:02 -04:00
5917ef7137 more fixes for tags 2018-06-09 13:51:00 -04:00
17eead1ab0 fixed hashtags 2018-06-09 13:35:58 -04:00
5911f648c2 fixed python_requires 2018-06-09 13:33:59 -04:00
baf971a377 require python3 2018-06-09 13:31:05 -04:00
6699d14a07 ignore dist 2018-06-09 13:29:09 -04:00
482ff34430 added hashtags 2018-06-09 13:28:17 -04:00
bdc72c289f initial 2018-06-09 12:53:44 -04:00