From 93e10264fb31776a7bbf552d3e11f1af2047f20c Mon Sep 17 00:00:00 2001 From: Austin Marino <32184751+austinmm@users.noreply.github.com> Date: Thu, 10 Oct 2019 16:26:20 -0700 Subject: [PATCH] Updated export.rst This update reflects the code changes I made to the export plugin --- docs/plugins/export.rst | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/plugins/export.rst b/docs/plugins/export.rst index d712dfc8b..4809df58b 100644 --- a/docs/plugins/export.rst +++ b/docs/plugins/export.rst @@ -2,9 +2,11 @@ Export Plugin ============= The ``export`` plugin lets you get data from the items and export the content -as `JSON`_. +as `JSON`_, `CSV`_, or `XML`_. .. _JSON: https://www.json.org +.. _CSV: https://fileinfo.com/extension/csv +.. _XML: https://fileinfo.com/extension/xml Enable the ``export`` plugin (see :ref:`using-plugins` for help). Then, type ``beet export`` followed by a :doc:`query ` to get the data from your library. For example, run this:: @@ -36,11 +38,13 @@ The ``export`` command has these command-line options: * ``--append``: Appends the data to the file instead of writing. +* ``--format`` or ``-f``: Specifies the format of the exported data. If not informed, JSON will be used. + Configuration ------------- To configure the plugin, make a ``export:`` section in your configuration -file. Under the ``json`` key, these options are available: +file. Under the ``json``, ``csv``, and ``xml`` keys, these options are available: - **ensure_ascii**: Escape non-ASCII characters with ``\uXXXX`` entities. @@ -63,3 +67,15 @@ The default options look like this:: indent: 4 separators: [',' , ': '] sort_keys: true + csv: + formatting: + ensure_ascii: False + indent: 0 + separators: [','] + sort_keys: true + xml: + formatting: + ensure_ascii: False + indent: 4 + separators: ['>'] + sort_keys: true