Skip to content

Instantly share code, notes, and snippets.

View mdiller's full-sized avatar
🥔

Malcolm Diller mdiller

🥔
View GitHub Profile
@mdiller
mdiller / update_botdata.py
Created June 10, 2017 00:22
updates the botdata.json file to the new format
import json
from collections import OrderedDict
userinfo_defaults = OrderedDict([
("steam32", None),
("intro", ""),
("outro", "")
])
@mdiller
mdiller / mp3ytclipper.py
Created February 9, 2017 16:52
Python script for downloading the audio of a Youtube video, clipping a certain section of it, adding a slight fade in and out, and saving the clip to a file.
#!/usr/bin/python3.5
#example usage: mp3ytclipper.py "https://www.youtube.com/watch?v=MgxK5vm6lvk" later 44.3 46.3
import sys, re, subprocess, youtube_dl, os
if len(sys.argv) != 5:
print("usage: mp3ytclipper.py <youtubeurl> <outfilename> <starttime> <endtime>")
exit()