From a64c41987b24b1a3350aaef2cb5f9410eddf2b1a Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Mon, 21 Nov 2022 10:57:29 -0300 Subject: [PATCH] Design docs --- README.md | 17 ++++++++++------- design/mastodon.md | 15 +++++++++++++-- design/rss.md | 16 ++++++++++++++++ 3 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 design/rss.md diff --git a/README.md b/README.md index 8f58b85..34bf0bf 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,19 @@ A digital life memoir of your life ## Design -The main design is to have a [Store](design/store.md) application, which manages its -storage. Then other services are used to capture data from services and throw -to Store, or retrieve information for Store to be displayed. +The main design is to have a [Store](design/store.md) application, which +manages its storage. Retrieval services, named Capturers, would take their +information and throw to Store; display services, named Viewers, retrieve +information for Store to be displayed. -Currently, I'm considering the following Captures (based on my own life): +It must be said that each Capturer must allow being called more than once, with +different values. For example, one could capture two different RSS feeds, and +their data should not colide. + +Currently, I'm considering the following Capturers (based on my own life): - [ ] [Mastodon](design/mastodon.md) -- [ ] RSS +- [ ] [RSS](design/rss.md) - [ ] Guild Wars 2 - [ ] Steam Capturer (?) - [ ] Netflix @@ -19,8 +24,6 @@ Currently, I'm considering the following Captures (based on my own life): - [ ] Calendar/CalDav -### RSS Capturer - ### Guild Wars 2 Capturer ### Steam Capturer diff --git a/design/mastodon.md b/design/mastodon.md index 4ebe888..10b7a67 100644 --- a/design/mastodon.md +++ b/design/mastodon.md @@ -1,14 +1,22 @@ -# Mastodon +# Mastodon Capturer There are two options for a Mastodon Capturer: A pure RSS reader or a full-fledged Mastodon client. A client would probably capture things send in private and such, which seem better. +## Configuration + +The only configuration necessary would be the access token. + +## Internals + Need to store, locally: - id: Toot ID +- token: Token used to retrieve the information (in case the local storage is + shared between applications). -We need only the ID 'cause we don't want to duplicate content; once the client +We need the ID 'cause we don't want to duplicate content; once the client finds a toot in its own database, it stops reading from the source and don't send it to the Store. @@ -21,3 +29,6 @@ As content send to the Store, we'd use a template like {{ content }} ``` + +We won't send title, as toots don't have them. As meta, we could store the URL +for the original toot. diff --git a/design/rss.md b/design/rss.md new file mode 100644 index 0000000..327d6d4 --- /dev/null +++ b/design/rss.md @@ -0,0 +1,16 @@ +# RSS Capturer + +Simple capturer for RSS. The hard part would be converting the HTML result into +Markdown (although I've done this before, using +[Markup5Ever](https://docs.rs/markup5ever/0.11.0/markup5ever/). + +Needs to store, locally: + +- `url`: to avoid mixing information of two different RSS readers; +- `id`: ID of the post read. + +We need the ID to avoid sending duplicate content back to the Store. + +The title for the ID would be the title coming from the RSS, and the content is +the same content as the feed. As meta, we could store the original URL for the +article.