UTF-8 encoded multi-byte codepoints might have been split in half producing invalid Unicode when truncating to a maximum length. Now we
count runes rather than bytes. This has the side effect, that feeds with multi-byte Unicode characters get larger. But oh well, it should be
actually even better to read.
-----
Unit tests pass. Didn't actually test more than that. 8-)
Co-authored-by: Lysander Trischler <software@lyse.isobeef.org>
Reviewed-on: #21
Co-authored-by: lyse <lyse@noreply@mills.io>
Co-committed-by: lyse <lyse@noreply@mills.io>
The Feeds view was updated to display each feed's Description inline.
Note: Most (if not all) feeds currently don't have Descriptions, so they probably will need to have Descriptions added by hand in `feeds.yaml`.
Reviewed-on: #18
Co-authored-by: servusdei2018 <servusdei2018@noreply@mills.io>
Co-committed-by: servusdei2018 <servusdei2018@noreply@mills.io>
WIP: The fields `Avatar` and `Description` were added to the `we-are-feeds.txt` generation handler.
Co-authored-by: Nate <servusdei@programmer.net>
Reviewed-on: #17
Co-authored-by: servusdei2018 <servusdei2018@noreply@mills.io>
Co-committed-by: servusdei2018 <servusdei2018@noreply@mills.io>
As mentioned in the [twtxt thread](https://twtxt.net/twt/ed6sbiq), certain twitter feeds weren't getting their avatars properly handeld. After investigation, I found that this was due to a `Feed{}` being returned from `ValidateTwitterFeed` that was missing a preliminary `Avatar` field, resulting in a missing `Avatar` field until `feeds` was eventually restarted. I tested it and this change should fix that issue.
Also a minor change was introduced; if a twitter avatar was already downloaded, it won't be downloaded again. Prior behavior was to download it every time the feed was updated; this may have resulted in ratelimiting.
Reviewed-on: #16
Co-authored-by: servusdei2018 <servusdei2018@noreply@mills.io>
Co-committed-by: servusdei2018 <servusdei2018@noreply@mills.io>
See https://twtxt.net/conv/gtr5w5q
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: yarnsocial/rss2twtxt#12
Co-authored-by: James Mills <james@mills.io>
Co-committed-by: James Mills <james@mills.io>