Skip to content

Instantly share code, notes, and snippets.

View madprops's full-sized avatar

madprops madprops

View GitHub Profile
@madprops
madprops / matchmeta.py
Created October 24, 2017 13:01
Find files that match something in the metadata information and move them to another directory. Useful if you want to move a bunch of files from some artist without descriptive filenames but correct metadata
import os
import shutil
import subprocess
path = "/some/path"
destpath = "/some/other/path"
to_match = "Maybe an Artist name"
filenames = next(os.walk(path))[2]
I have this in settings.py:
OMNIBUS_CONNECTION_FACTORY = 'server.views.connection_factory'
OMNIBUS_AUTHENTICATOR_FACTORY = 'omnibus.factories.userauthenticator_factory'
I have this in views.py
def connection_factory(auth_class, pubsub):
class GeneratedConnection(websocket_connection_factory(auth_class, pubsub)):
I have this in views.py
def connection_factory(auth_class, pubsub):
class GeneratedConnection(websocket_connection_factory(auth_class, pubsub)):
def open_connection(self):
log(self.authenticator)
return super(GeneratedConnection, self).open_connection()
def close_connection(self):