diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2018-10-31 22:18:19 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2018-10-31 22:18:19 +0100 |
commit | f53453069d81989670586ef54130b026dd31a1e1 (patch) | |
tree | ac08e0fd27ac0475b5b819f2b33955a9ee4b9a02 /src/web/templates | |
parent | Improved filtering to get only articles from public feed via the public profi... (diff) | |
download | newspipe-f53453069d81989670586ef54130b026dd31a1e1.tar.gz newspipe-f53453069d81989670586ef54130b026dd31a1e1.tar.bz2 newspipe-f53453069d81989670586ef54130b026dd31a1e1.zip |
Improved the import/export functions for data liberation. It is now possible to export all feeds to OPML with ou without enabled and private feeds.
Diffstat (limited to 'src/web/templates')
-rw-r--r-- | src/web/templates/management.html | 39 | ||||
-rw-r--r-- | src/web/templates/opml.xml | 2 |
2 files changed, 32 insertions, 9 deletions
diff --git a/src/web/templates/management.html b/src/web/templates/management.html index 375b8f37..9c6a2e1c 100644 --- a/src/web/templates/management.html +++ b/src/web/templates/management.html @@ -20,24 +20,47 @@ <div class="well"> <div class="row"> <div class="col-md-6"> - <h1>{{ _('Data liberation') }}</h1> + <h1>{{ _('Your data') }}</h1> + </div> + </div> + <div class="row"> + <div class="col-md-6"> + <h2>{{ _('Articles') }}</h2> + <h3>{{ _('Import') }}</h3> <form action="" method="post" id="formImportJSON" enctype="multipart/form-data"> <span class="btn btn-default btn-file">{{ _('Import a Newspipe account') }} (<span class="text-info">*.json</span>)<input type="file" name="jsonfile" /></span> <button class="btn btn-default" type="submit">OK</button> </form> - <br /> - <a href="{{ url_for('articles.export', format='JSON') }}" class="btn btn-default">{{ _('Export your Newspipe account to JSON') }}</a> - <br /><br /> - <a href="{{ url_for('bookmarks.export') }}" class="btn btn-default">{{ _('Export your bookmarks to JSON') }}</a> + <h3>{{ _('Export') }}</h3> + <a href="{{ url_for('articles.export') }}" class="btn btn-default">{{ _('Export your Newspipe account to JSON') }}</a> </div> <div class="col-md-6"> - <h1 id="import">{{ _('OPML import/export') }}</h1> + <h2 id="import">{{ _('OPML') }}</h2> + <h3>{{ _('Import') }}</h3> <form action="" method="post" id="formImportOPML" enctype="multipart/form-data"> <span class="btn btn-default btn-file">{{ _('Batch import feeds from OPML') }} (<span class="text-info">*.xml {{ _('or') }} *.opml</span>)<input type="file" name="opmlfile" /></span> <button class="btn btn-default" type="submit">OK</button> </form> - <br /> - <a href="{{ url_for('articles.export', format='OPML') }}" class="btn btn-default">{{ _('Export your feeds to OPML') }}</a> + <h3>{{ _('Export') }}</h3> + <form class="form-inline" action="{{ url_for('feeds.export') }}" method="GET" id="formExportOPML"> + <div class="form-group"> + <div class="input-group"> + <label>Include disabled feeds</label> + <input type="checkbox" class="form-control"name="includedisabled" checked /> + </div> + <div class="input-group"> + <label>Include private feeds</label> + <input type="checkbox" class="form-control" name="includeprivate" checked /> + </div> + </div> + <button class="btn btn-default" type="submit">{{ _('Export your feeds to OPML') }}</button> + </form> + </div> + </div> + <div class="row"> + <div class="col-md-12"> + <h1>{{ _('Bookmarks') }}</h1> + <a href="{{ url_for('bookmarks.export') }}" class="btn btn-default">{{ _('Export your bookmarks to JSON') }}</a> </div> </div> </div> diff --git a/src/web/templates/opml.xml b/src/web/templates/opml.xml index 3862772d..7159e279 100644 --- a/src/web/templates/opml.xml +++ b/src/web/templates/opml.xml @@ -8,6 +8,6 @@ <ownerName>{{ user.nickname }}</ownerName> </head> <body> - {% for feed in user.feeds %} <outline title="{{ feed.title|escape }}" text="{{ feed.title|escape }}" description="{{ feed.description|escape }}" {% if feed.category_id != None %}category="/{{ categories[feed.category_id].name }}"{% endif %} xmlUrl="{{ feed.link|escape }}" htmlUrl="{{ feed.site_link|escape }}" /> + {% for feed in feeds %} <outline title="{{ feed.title|escape }}" text="{{ feed.title|escape }}" description="{{ feed.description|escape }}" {% if feed.category_id != None %}category="/{{ categories[feed.category_id].name }}"{% endif %} xmlUrl="{{ feed.link|escape }}" htmlUrl="{{ feed.site_link|escape }}" /> {% endfor %}</body> </opml> |