shrewdness icon indicating copy to clipboard operation
shrewdness copied to clipboard

Import subscription list from a URL

Open aaronpk opened this issue 10 years ago • 1 comments

I'm publishing my "following" list at a URL which consists of a bunch of h-cards: http://aaronparecki.com/following

It would be great if I could enter this URL and have shrewdness import my subscriptions from there.

aaronpk avatar Aug 12 '14 21:08 aaronpk

Currently, subscription columns have a list of sources, all of which are a single URL which is parsed for h-entries. Implementing subscriptions-from-h-cards “properly” requires a new sort of subscription with associated UI and backend polling.

Initial brainstorm (prompted particularly by the use-case outlined in #34):

  • Given a URL which the user intends to be interpreted as a list of h-cards to subscribe to, fetch that URL, and subscribe to each h-card or URL with rel-following
  • Subscribe to changes to the URL itself, subscribing/unsubscribing from new/removed URLs as required

UI wise, this should be represented in the sources list as a URL with sub-URLs derived from it. Ideally the sub-URLs should be disableable (e.g. wanting to filter subscriptions to h-cards from a page the user has no control over) and the disabling should be remembered across refreshes, requiring the disabled URLs to be stored. There should be a manual refresh button for the URL so users can make changes immediately (although most changes should be adequately responded to by subscription to the URL).

This points towards a backend storage structure looking something like this:

sources:
  - url: https://aaronparecki.com/following
    type: following
    ignore: []

This is all nontrivial but perfectly implementable, given a solid subscription infrastructure (which shrewdness sort of has). The remaining difficulty is how to create the UX of creating a h-card URL subscription (and additionally what to call it).

Initial thoughts are to retain the single source-adding URL-entry text input, but do more intelligent inspection of content before subscribing. At the moment, shrewdness will try to subscribe to anything even if it has no microformats on. Going forward, something like this should happen:

  • When someone types a URL into the source-adding box and presses “subscribe”, fetch it and parse.
    • If the page contains an h-feed or a list of h-entries, and NO h-cards or a single author h-card, subscribe immediately to the URL as a h-entry source, informing the user of that decision
    • If the page contains no h-feed or h-entry, only h-cards and/or rel-following links, subscribe to that URL as a followers list
    • If the page contains both h-feed/h-entry, along with non-authorship h-card(s), display both options in the subscription UI and allow the user to choose which (or both) type of subscription is required.
    • If the page has no parseable microformats, warn the user that the subscription is (currently) not doing anything, and ask for confirmation

The same sort of UI and fetching could be applied to multiple-feed subscriptions, e.g. subscribe to aaronparecki.com, get options of homepage, articles, notes, replies, mentions, metrics based on rel=feed autodiscovery.

barnabywalters avatar Sep 25 '14 12:09 barnabywalters