mbstats

package module
v0.0.0-...-f77db95 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

README

Documentation

Overview

Package mbstats contains MusicBrainz-related code shared between executables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EditTypeName

func EditTypeName(et EditType) string

EditTypeName returns a human-readable string describing et.

Types

type EditType

type EditType int16
const (
	EDIT_ARTIST_CREATE                         EditType = 1
	EDIT_ARTIST_EDIT                           EditType = 2
	EDIT_ARTIST_DELETE                         EditType = 3
	EDIT_ARTIST_MERGE                          EditType = 4
	EDIT_ARTIST_ADD_ANNOTATION                 EditType = 5
	EDIT_ARTIST_ADD_ALIAS                      EditType = 6
	EDIT_ARTIST_DELETE_ALIAS                   EditType = 7
	EDIT_ARTIST_EDIT_ALIAS                     EditType = 8
	EDIT_ARTIST_EDITCREDIT                     EditType = 9
	EDIT_LABEL_CREATE                          EditType = 10
	EDIT_LABEL_EDIT                            EditType = 11
	EDIT_LABEL_DELETE                          EditType = 13
	EDIT_LABEL_MERGE                           EditType = 14
	EDIT_LABEL_ADD_ANNOTATION                  EditType = 15
	EDIT_LABEL_ADD_ALIAS                       EditType = 16
	EDIT_LABEL_DELETE_ALIAS                    EditType = 17
	EDIT_LABEL_EDIT_ALIAS                      EditType = 18
	EDIT_RELEASEGROUP_CREATE                   EditType = 20
	EDIT_RELEASEGROUP_EDIT                     EditType = 21
	EDIT_RELEASEGROUP_SET_COVER_ART            EditType = 22
	EDIT_RELEASEGROUP_DELETE                   EditType = 23
	EDIT_RELEASEGROUP_MERGE                    EditType = 24
	EDIT_RELEASEGROUP_ADD_ANNOTATION           EditType = 25
	EDIT_RELEASEGROUP_ADD_ALIAS                EditType = 26
	EDIT_RELEASEGROUP_DELETE_ALIAS             EditType = 27
	EDIT_RELEASEGROUP_EDIT_ALIAS               EditType = 28
	EDIT_RELEASE_CREATE                        EditType = 31
	EDIT_RELEASE_EDIT                          EditType = 32
	EDIT_RELEASE_MOVE                          EditType = 33
	EDIT_RELEASE_ADDRELEASELABEL               EditType = 34
	EDIT_RELEASE_ADD_ANNOTATION                EditType = 35
	EDIT_RELEASE_DELETERELEASELABEL            EditType = 36
	EDIT_RELEASE_EDITRELEASELABEL              EditType = 37
	EDIT_RELEASE_CHANGE_QUALITY                EditType = 38
	EDIT_RELEASE_EDIT_BARCODES                 EditType = 39
	EDIT_WORK_CREATE                           EditType = 41
	EDIT_WORK_EDIT                             EditType = 42
	EDIT_WORK_DELETE                           EditType = 43
	EDIT_WORK_MERGE                            EditType = 44
	EDIT_WORK_ADD_ANNOTATION                   EditType = 45
	EDIT_WORK_ADD_ALIAS                        EditType = 46
	EDIT_WORK_DELETE_ALIAS                     EditType = 47
	EDIT_WORK_EDIT_ALIAS                       EditType = 48
	EDIT_WORK_ADD_ISWCS                        EditType = 49
	EDIT_MEDIUM_CREATE                         EditType = 51
	EDIT_MEDIUM_EDIT                           EditType = 52
	EDIT_MEDIUM_DELETE                         EditType = 53
	EDIT_MEDIUM_REMOVE_DISCID                  EditType = 54
	EDIT_MEDIUM_ADD_DISCID                     EditType = 55
	EDIT_MEDIUM_MOVE_DISCID                    EditType = 56
	EDIT_SET_TRACK_LENGTHS                     EditType = 58
	EDIT_PLACE_CREATE                          EditType = 61
	EDIT_PLACE_EDIT                            EditType = 62
	EDIT_PLACE_DELETE                          EditType = 63
	EDIT_PLACE_MERGE                           EditType = 64
	EDIT_PLACE_ADD_ANNOTATION                  EditType = 65
	EDIT_PLACE_ADD_ALIAS                       EditType = 66
	EDIT_PLACE_DELETE_ALIAS                    EditType = 67
	EDIT_PLACE_EDIT_ALIAS                      EditType = 68
	EDIT_RECORDING_CREATE                      EditType = 71
	EDIT_RECORDING_EDIT                        EditType = 72
	EDIT_RECORDING_DELETE                      EditType = 73
	EDIT_RECORDING_MERGE                       EditType = 74
	EDIT_RECORDING_ADD_ANNOTATION              EditType = 75
	EDIT_RECORDING_ADD_ISRCS                   EditType = 76
	EDIT_RECORDING_REMOVE_ISRC                 EditType = 78
	EDIT_AREA_CREATE                           EditType = 81
	EDIT_AREA_EDIT                             EditType = 82
	EDIT_AREA_DELETE                           EditType = 83
	EDIT_AREA_MERGE                            EditType = 84
	EDIT_AREA_ADD_ANNOTATION                   EditType = 85
	EDIT_AREA_ADD_ALIAS                        EditType = 86
	EDIT_AREA_DELETE_ALIAS                     EditType = 87
	EDIT_AREA_EDIT_ALIAS                       EditType = 88
	EDIT_RELATIONSHIP_CREATE                   EditType = 90
	EDIT_RELATIONSHIP_EDIT                     EditType = 91
	EDIT_RELATIONSHIP_DELETE                   EditType = 92
	EDIT_RELATIONSHIP_REMOVE_LINK_TYPE         EditType = 93
	EDIT_RELATIONSHIP_REMOVE_LINK_ATTRIBUTE    EditType = 94
	EDIT_RELATIONSHIP_EDIT_LINK_TYPE           EditType = 95
	EDIT_RELATIONSHIP_ADD_TYPE                 EditType = 96
	EDIT_RELATIONSHIP_ATTRIBUTE                EditType = 97
	EDIT_RELATIONSHIP_ADD_ATTRIBUTE            EditType = 98
	EDIT_RELATIONSHIPS_REORDER                 EditType = 99
	EDIT_URL_EDIT                              EditType = 101
	EDIT_WIKIDOC_CHANGE                        EditType = 120
	EDIT_INSTRUMENT_CREATE                     EditType = 131
	EDIT_INSTRUMENT_EDIT                       EditType = 132
	EDIT_INSTRUMENT_DELETE                     EditType = 133
	EDIT_INSTRUMENT_MERGE                      EditType = 134
	EDIT_INSTRUMENT_ADD_ANNOTATION             EditType = 135
	EDIT_INSTRUMENT_ADD_ALIAS                  EditType = 136
	EDIT_INSTRUMENT_DELETE_ALIAS               EditType = 137
	EDIT_INSTRUMENT_EDIT_ALIAS                 EditType = 138
	EDIT_SERIES_CREATE                         EditType = 140
	EDIT_SERIES_EDIT                           EditType = 141
	EDIT_SERIES_DELETE                         EditType = 142
	EDIT_SERIES_MERGE                          EditType = 143
	EDIT_SERIES_ADD_ANNOTATION                 EditType = 144
	EDIT_SERIES_ADD_ALIAS                      EditType = 145
	EDIT_SERIES_DELETE_ALIAS                   EditType = 146
	EDIT_SERIES_EDIT_ALIAS                     EditType = 147
	EDIT_EVENT_CREATE                          EditType = 150
	EDIT_EVENT_EDIT                            EditType = 151
	EDIT_EVENT_DELETE                          EditType = 152
	EDIT_EVENT_MERGE                           EditType = 153
	EDIT_EVENT_ADD_ANNOTATION                  EditType = 154
	EDIT_EVENT_ADD_ALIAS                       EditType = 155
	EDIT_EVENT_DELETE_ALIAS                    EditType = 156
	EDIT_EVENT_EDIT_ALIAS                      EditType = 157
	EDIT_GENRE_CREATE                          EditType = 160
	EDIT_GENRE_EDIT                            EditType = 161
	EDIT_GENRE_DELETE                          EditType = 162
	EDIT_GENRE_ADD_ANNOTATION                  EditType = 164
	EDIT_GENRE_ADD_ALIAS                       EditType = 165
	EDIT_GENRE_DELETE_ALIAS                    EditType = 166
	EDIT_GENRE_EDIT_ALIAS                      EditType = 167
	EDIT_HISTORIC_EDIT_RELEASE_NAME            EditType = 201
	EDIT_HISTORIC_EDIT_TRACKNAME               EditType = 204
	EDIT_HISTORIC_EDIT_TRACKNUM                EditType = 205
	EDIT_HISTORIC_ADD_TRACK                    EditType = 207
	EDIT_HISTORIC_MOVE_RELEASE                 EditType = 208
	EDIT_HISTORIC_SAC_TO_MAC                   EditType = 209
	EDIT_HISTORIC_CHANGE_TRACK_ARTIST          EditType = 210
	EDIT_HISTORIC_REMOVE_TRACK                 EditType = 211
	EDIT_HISTORIC_REMOVE_RELEASE               EditType = 212
	EDIT_HISTORIC_MAC_TO_SAC                   EditType = 213
	EDIT_HISTORIC_ADD_RELEASE                  EditType = 216
	EDIT_HISTORIC_ADD_TRACK_KV                 EditType = 218
	EDIT_HISTORIC_REMOVE_DISCID                EditType = 220
	EDIT_HISTORIC_MOVE_DISCID                  EditType = 221
	EDIT_HISTORIC_MERGE_RELEASE                EditType = 223
	EDIT_HISTORIC_REMOVE_RELEASES              EditType = 224
	EDIT_HISTORIC_MERGE_RELEASE_MAC            EditType = 225
	EDIT_HISTORIC_EDIT_RELEASE_ATTRS           EditType = 226
	EDIT_HISTORIC_EDIT_RELEASE_EVENTS_OLD      EditType = 229
	EDIT_HISTORIC_ADD_RELEASE_ANNOTATION       EditType = 231
	EDIT_HISTORIC_ADD_DISCID                   EditType = 232
	EDIT_HISTORIC_ADD_LINK                     EditType = 233
	EDIT_HISTORIC_EDIT_LINK                    EditType = 234
	EDIT_HISTORIC_REMOVE_LINK                  EditType = 235
	EDIT_HISTORIC_EDIT_LINK_TYPE               EditType = 237
	EDIT_HISTORIC_REMOVE_LINK_TYPE             EditType = 238
	EDIT_HISTORIC_EDIT_RELEASE_LANGUAGE        EditType = 244
	EDIT_HISTORIC_EDIT_TRACK_LENGTH            EditType = 245
	EDIT_HISTORIC_ADD_RELEASE_EVENTS           EditType = 249
	EDIT_HISTORIC_EDIT_RELEASE_EVENTS          EditType = 250
	EDIT_HISTORIC_REMOVE_RELEASE_EVENTS        EditType = 251
	EDIT_HISTORIC_CHANGE_ARTIST_QUALITY        EditType = 252
	EDIT_HISTORIC_SET_TRACK_LENGTHS_FROM_CDTOC EditType = 253
	EDIT_HISTORIC_REMOVE_LABEL_ALIAS           EditType = 262
	EDIT_HISTORIC_CHANGE_RELEASE_QUALITY       EditType = 263
	EDIT_HISTORIC_CHANGE_RELEASE_GROUP         EditType = 273
	EDIT_RELEASE_DELETE                        EditType = 310
	EDIT_RELEASE_MERGE                         EditType = 311
	EDIT_RELEASE_ARTIST                        EditType = 312
	EDIT_RELEASE_REORDER_MEDIUMS               EditType = 313
	EDIT_RELEASE_ADD_COVER_ART                 EditType = 314
	EDIT_RELEASE_REMOVE_COVER_ART              EditType = 315
	EDIT_RELEASE_EDIT_COVER_ART                EditType = 316
	EDIT_RELEASE_REORDER_COVER_ART             EditType = 317
	EDIT_RELEASE_ADD_ALIAS                     EditType = 318
	EDIT_RELEASE_DELETE_ALIAS                  EditType = 319
	EDIT_RELEASE_EDIT_ALIAS                    EditType = 320
	EDIT_WORK_REMOVE_ISWC                      EditType = 410
	EDIT_RECORDING_ADD_ALIAS                   EditType = 711
	EDIT_RECORDING_DELETE_ALIAS                EditType = 712
	EDIT_RECORDING_EDIT_ALIAS                  EditType = 713
)

func NamedEditType

func NamedEditType(name string) (EditType, error)

NamedEditType returns the edit type corresponding to a human-readable string as returned by EditTypeName.

type EditorID

type EditorID int32

I'm being careful with the sizes of these types since read-mbdump ends up holding a lot of them in memory at once.

type EditorStats

type EditorStats struct {
	ID      EditorID           `json:"id"`
	Name    string             `json:"name"`
	Created time.Time          `json:"created"`
	Active  time.Time          `json:"active"`
	Edits   map[EditType]int32 `json:"edits"`
}

EditorStats contains information about a single editor and counts of their edits within a given time period.

Directories

Path Synopsis
cmd
mbstats
Package main implements the mbstats executable for generating MusicBrainz from read-mbdump data.
Package main implements the mbstats executable for generating MusicBrainz from read-mbdump data.
read-mbdump
Package main implements the read-mbdump executable for summarizing MusicBrainz database dumps.
Package main implements the read-mbdump executable for summarizing MusicBrainz database dumps.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL