Skip to content

Instantly share code, notes, and snippets.

View LordSputnik's full-sized avatar

Ben Ockmore LordSputnik

View GitHub Profile
@LordSputnik
LordSputnik / MassTagger
Created November 19, 2012 00:03
The current output of MassTagger
ben@Mithrandir:~/Music/FLAC/CDs$ ./MassTagger
Boost Version: 1_49
Last Req: 1353686977
Returning from MB
D�cal�|Décalé!
Last Req: 1353686978
Returning from MB
Last Req: 1353686980
Returning from MB
You're Not the First|You’re Not the First!
@LordSputnik
LordSputnik / MassTagger Wishlist
Created November 19, 2012 00:30
Core stuff MusicBrainz MassTagger (MBMT) should update in songs
/* So, what stuff regularly needs updating in my library? Everything? No...
* Recording
* Artist Name
* Album Name
* Release
* Album Art -> libcoverart
* Release Date
* Original Release Date
* Track Number/Total
* Disc Number/Total
function getWikiText(o, callback) {
if (!o['relations']) {
callback('');
return;
}
var wikiLink;
for (var i = 0; i < o['relations'].length; ++i) {
if (o['relations'][i]['type'] == 'wikipedia') {
wikiLink = parseURL(o['relations'][i]['url']);
@LordSputnik
LordSputnik / Template Engine
Created July 8, 2013 18:33
Example of responding to a data request using a fixed template.
from collections import defaultdict
import copy
import json
simulated_release = {
"artist":"The Beatles",
"title":"Collection of Random Hits",
"mbid":3,
}
@LordSputnik
LordSputnik / gist:6771632
Created September 30, 2013 23:10
Python USB Device Code
import pywinusb.hid as hid
import time
import datetime
v_id = 0x04D8
p_id = 0x0042
all_devices = hid.HidDeviceFilter(vendor_id = v_id).get_devices()
target_usage= hid.get_full_usage_id(0xFF00, 0x01)
// ==UserScript==
// @name MusicBrainz Unicode Release Editor
// @namespace http://userscripts.org
// @description A script to add copyable unicode characters to the bottom of the release editor.
// @include http://musicbrainz.org/release/*
// @include http://*.musicbrainz.org/release/*
// @include https://musicbrainz.org/release/*
// @include https://*.musicbrainz.org/release/*
// @version 2
// @grant none
@LordSputnik
LordSputnik / eac-cue-submit-isrc.py
Last active July 9, 2017 07:32
A quick little script I wrote for scanning all the EAC CUE files in a single directory, and uploading any contained ISRCs to MusicBrainz.
#!/usr/bin/env python
# -*- coding: utf8 -*-
# Copyright 2013 Ben Ockmore
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

Documentation Guidelines

Purpose

This guideline is designed to help people write pages of documentation that fit in well with the rest of the BookBrainz user guide. A section on general documentation guidelines is followed by advice for writing specific types of documents. It is hoped that through this guideline, the BookBrainz documentation can remain more consistent and easier to use.

General Guidelines

This section describes general guidelines you should follow when writing any type of documentation.

  • Titles - Try not to use more than the three levels of headings. Text with lots of levels can be hard to understand, and generally covers too much material. Headings should be capitalized just like an Edition alias in BookBrainz - generally, first letters of words should be capitalized, apart from for specific words.
  • Clarity - Documentation should be very easy to understand, so sections should be as simple as possible. If a section becomes too long, move it to a new page and leave a shor
@LordSputnik
LordSputnik / sample_bookshelf_relation_error.js
Created September 1, 2015 07:07
Minimal code demonstrating issue with idAttribute and relations in bookshelf.js
var knex = require('knex')({
client: 'postgresql',
connection: {
host : '127.0.0.1',
user : 'username',
password : 'password',
database : 'database'
}
});
@LordSputnik
LordSputnik / CHANGELOG.md
Last active September 7, 2016 21:05
BookBrainz Change Log

September 2016 (2016-09-07)

Bug

  • [BB-187] - BBID regex matches UUID in the middle of a string
  • [BB-189] - User can register a new user while logged in
  • [BB-195] - Entities with multiple of the same IDs have all of those IDs listed multiple times
  • [BB-197] - Clicking on the revisions tab of an editor while on it 404s

Improvement

  • [BB-190] - Convert React components to one-per-file ES6 classes