Skip to content

Add command to import and export saved entries #84

Description

@passiomatic

This feature is handy to transfer data between a database engine and another (e.g. sqlite to MySQL) or updating an existing installation (e.g. MySQL ISAM to MySQL InnoDB).

Input and output format could be a single saved.atom feed file.

Export procedure

To export a single Atom feed with the saved entries of a given user the required steps are:

  1. For each saved entry write the following fields: title, link, guid, updated, content and content_type. Since in Coldsweat we don't have the distinction between entry summary and content we always specify the latter.
  2. For each entry we need to specify the original feed URL, so we can associate them accordingly once reimported, via the atom:source element: "The atom:source element is designed to allow the aggregation of entries from different feeds while retaining information about an entry's source feed." — https://tools.ietf.org/html/rfc4287#section-4.2.11

Import procedure

Import procedure will use feedparser to read back the save.atom feed, and loop thru its entries. Any entry which atom:source matches a feed already present in the database will be added. Also entry will be marked as saved too.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions