Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command to import and export saved entries #84

Open
passiomatic opened this issue Mar 24, 2015 · 0 comments
Open

Add command to import and export saved entries #84

passiomatic opened this issue Mar 24, 2015 · 0 comments
Assignees
Milestone

Comments

@passiomatic
Copy link
Owner

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.

@passiomatic passiomatic changed the title Add comamnd to import and export saved entries Add command to import and export saved entries Mar 24, 2015
@passiomatic passiomatic self-assigned this Mar 24, 2015
@passiomatic passiomatic added this to the 1.0.0 milestone Mar 28, 2015
passiomatic added a commit that referenced this issue Jun 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant