Categorygithub.com/state303/go-discogs
modulepackage
1.1.3
Repository: https://github.com/state303/go-discogs.git
Documentation: pkg.go.dev

# README

go-discogs

Discogs Dump Batch Updater with Go

Examples

Run with shorthand and full flag with config

go-discogs --update-marker -y 2010 --month 3 -f db-config.yaml

You would most likely wish to keep the dsn variable to ENV. If that is the case...

export GO_DISCOGS_DSN=$my_dsn # or something else...
go-discogs --update \         # will read from ENV
     -y 2010 \
     -m 3 

If all you need is to update artist AND label...

go-discogs --update \           # optional if you wish to just use local marker
     -t artist,labels \         # you call artist or artists... potato, potato. just the same.
     -y 2010 \                  # required
     -m 3 \                     # required
     -s postgres://username:password@localhost:5432/database_name   # required

Commands

FLAGHAS_VALUEDEFAULTNOTE
--chunk -bO5000Chunk size for batch insertion
--config -cO$HOME/go-discogs/config.yamlConfig file location
--data -dO$HOME/go-discogs/File directory
--dsn -sOXRequired
--year -yOCurrent YearTarget Year
--month -mOCurrent MonthTarget Month
--types -tOartistsBatch these types
--update -uXfalseUpdate data dump records
--purge -pXfalseKeep files after batch
--new -nXfalseKeep files after batch

💾 Files

Dump XML.GZ files

By default, it uses a local file to read and dispatch insertions from data.discogs.com. You can decide where to store them via --data (or just -d) flag. It will not delete such data, as their size are large enough to be considered costly work. If you insist to delete them after batch job, please use --purge (or just -p) option.

# first run
# disabling marker will prevent usage or creation of local marker
go-discogs --no-marker -f config.yaml

# second run, but there is no local marker
# initially updates and stores marker; because it cannot find any local marker
go-discogs -f config.yaml

# third run will not update, but simply use the local marker
go-discogs -f config.yaml

# fourth run will update local marker
go-discogs -f config.yaml --update-marker

Database Connection

Database connection can be done with following options.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author