From 701a644c31a5fb9ccf4c49393effdacf38867c55 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 26 Mar 2022 13:04:59 -0700 Subject: [PATCH] Export user book data as csv (#1556) Simple book data export --- bookwyrm/templates/preferences/export.html | 22 +++++ bookwyrm/templates/preferences/layout.html | 11 +++ bookwyrm/tests/views/test_export.py | 69 +++++++++++++++ bookwyrm/urls.py | 6 ++ bookwyrm/views/__init__.py | 1 + bookwyrm/views/preferences/export.py | 97 ++++++++++++++++++++++ 6 files changed, 206 insertions(+) create mode 100644 bookwyrm/templates/preferences/export.html create mode 100644 bookwyrm/tests/views/test_export.py create mode 100644 bookwyrm/views/preferences/export.py diff --git a/bookwyrm/templates/preferences/export.html b/bookwyrm/templates/preferences/export.html new file mode 100644 index 000000000..865051442 --- /dev/null +++ b/bookwyrm/templates/preferences/export.html @@ -0,0 +1,22 @@ +{% extends 'preferences/layout.html' %} +{% load i18n %} + +{% block title %}{% trans "CSV Export" %}{% endblock %} + +{% block header %} +{% trans "CSV Export" %} +{% endblock %} + +{% block panel %} +
+

+ {% trans "Your export will include all the books on your shelves, books you have reviewed, and books with reading activity." %} +

+

+ + + Download file + +

+
+{% endblock %} diff --git a/bookwyrm/templates/preferences/layout.html b/bookwyrm/templates/preferences/layout.html index bf4fed7d5..27d91c480 100644 --- a/bookwyrm/templates/preferences/layout.html +++ b/bookwyrm/templates/preferences/layout.html @@ -24,6 +24,17 @@ {% trans "Delete Account" %} + +