Skip to main content

Exports your Discogs collection or wantlist into a xlsx file

Project description

discogs2xlsx

Export your Discogs collection or wantlist into a xlsx file.

Synopsis

This tool will try to export your collection or wantlist from Discogs into a .xlsx file.

The time required to perform the export will depend on the size of your collection, or wantlist. Discogs requests to the API are throttled to 60 per minute for authenticated requests, for that reason for large collections, or wantlists, the export can take hours to perform.

Prerequisites

There are a couple of things needed for the tool to work.

Python, version 3.6 or above, needs to be installed on your local computer. You will also need a Discogs account.

Discogs

A Discogs user account is required (to obtain the ratings from). You can create an account at https://www.discogs.com/users/create if you do not have one already.

A Discogs personal token is also required. You can obtain one at https://www.discogs.com/settings/developers

For price recommendations (--price option) the Discogs Seller Settings are required.

Python 3.x

Python version 3.6 or above is required for the tool to work. Python setup can be found here.

The following python modules are also required to run the tool:

  • progress >= 1.5
  • requests >= 2.25.1
  • xlsxwriter >= 1.3.7

Installation

The simplest way to install this tool is using pip:

pip3 install discogs2xlsx

Usage

A simple example of how to use this tool:

discogs2xlsx -a my_discogs_secret_token

List of all the options:

usage: discogs2xlsx [-h] -a APIKEY [-c {AUD,BRL,CAD,CHF,EUR,GBP,JPY,MXN,NZD,SEK,USD,ZAR}] [--debug] [-d] [-f FILE] [-p] [-q] [-v] [-w]

optional arguments:
  -h, --help            show this help message and exit
  -a APIKEY, --apikey APIKEY
                        discogs api key (default: None)
  -c {AUD,BRL,CAD,CHF,EUR,GBP,JPY,MXN,NZD,SEK,USD,ZAR}, --currency {AUD,BRL,CAD,CHF,EUR,GBP,JPY,MXN,NZD,SEK,USD,ZAR}
                        currency for prices (default: 'EUR')
  --debug               debug mode (default: False)
  -d, --details         exports extra details (default: False)
  -f FILE, --file FILE  output file name (default:
                        /Users/fscm/Documents/Projects/Active/discogs2xlsx/discogs-collection.xlsx)
  -p, --prices          exports recommended prices (default: False)
  -q, --quiet           quiet mode (default: False)
  -v, --version         show program's version number and exit
  -w, --wantlist        exports the wantlist instead of the collection (default: False)

IMPORTANT Discogs Seller Settings are required for the recommended prices option (-p --prices).

Build (from source)

It is recommended the use of a Python Virtual Environment (venv) to build this tool. The same Virtual Environment can also be used to run the tool.

All of the commands described bellow are to be executed on the root folder of this project.

A Virtual Environment can be created using the follow command:

python3 -m venv venv/

After creating the Virtual Environment the same will have to be activated, run the following command to do that:

source venv/bin/activate

To build and run the tool some Python modules are required. These modules can be installed using the following command:

pip3 --quiet install --upgrade --requirement requirements.txt build

Finaly the Python package for this tool can be created with the command:

python3 -m build --wheel

After this you should endup with a wheel file (*.whl) inside a folder called dist.

The tool can be install using the wheel file and pip3:

pip3 --quiet install dist/discogs2xlsx-*.whl

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

Please read the CONTRIBUTING.md file for more details on how to contribute to this project.

Versioning

This project uses SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Frederico Martins - fscm

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

discogs2xlsx-0.2.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discogs2xlsx-0.2.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file discogs2xlsx-0.2.0.tar.gz.

File metadata

  • Download URL: discogs2xlsx-0.2.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1

File hashes

Hashes for discogs2xlsx-0.2.0.tar.gz
Algorithm Hash digest
SHA256 41bb1c901793de6a902a43e298a9e6284213b8f88f866d0f943c869a7feb6bf4
MD5 16840c193cebacda59fd363b0cc993fd
BLAKE2b-256 54b9ecaa2cd94b990f37740eb7f0d06fbdce76ca05331c83b1d594bb4367f3f1

See more details on using hashes here.

File details

Details for the file discogs2xlsx-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: discogs2xlsx-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1

File hashes

Hashes for discogs2xlsx-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c81d04fad426ed55f7d27cc44f35bd86f7db1e0f3973103e30219452f2024bef
MD5 5d856911521f7459e64d1a6defdcffd6
BLAKE2b-256 dd9a55ca650f66bd5c9d98b9d8801c631b9f861e178ae0ac012ade5b347f2daa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page