- ReactiveCocoa
- Alamofire
- Moya
| """ | |
| List songs rated 5 stars, grouped by genre. | |
| """ | |
| import itunes | |
| from collections import defaultdict | |
| def print_(s): |
| """ | |
| In the given directory, print any MP3 files whose gains should be adjusted. | |
| """ | |
| import sys | |
| import os | |
| import subprocess | |
| import csv | |
| from StringIO import StringIO |
| // ==UserScript== | |
| // @name Get Douban song metadata | |
| // @namespace https://github.com/feihong/ | |
| // @description Adds a button to the Douban player page that puts the song metadata onto the clipboard. | |
| // @include http://music.douban.com/artists/player/* | |
| // @version 1 | |
| // @grant GM_setClipboard | |
| // ==/UserScript== | |
| var playlist = unsafeWindow.__bootstrap_data['playlist']; |
| """ | |
| For all the .mp4 files in a given directory, do the following: | |
| - Extract the audio out into a .m4a file. | |
| - Adjust gain. | |
| - Optionally trim running time. | |
| - Add metadata (title, artist, album, artwork). | |
| Usage: python process_mp4_files.py /path/to/mp4/files/ |
| func main() { | |
| let semaphore = dispatch_semaphore_create(0) | |
| println("hello") | |
| println("getting ready to leave now") | |
| let threeSeconds = dispatch_time(DISPATCH_TIME_NOW, Int64(3.0 * Double(NSEC_PER_SEC))) | |
| // Using the main queue doesn't work in a command-line application! | |
| // let queue = dispatch_get_main_queue() | |
| let queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0) |
| """ | |
| Adjust the gain on all .mp4 files within the given directory. | |
| In order to run this script, you must have aacgain installed. On Ubuntu, you | |
| can do so by running these commands: | |
| add-apt-repository ppa:stefanobalocco/ppa | |
| apt-get update | |
| apt-get install aacgain |
| """ | |
| Add metadata to all the .mp4 files within the given directory, based on the file | |
| names of the input files. | |
| Each input file should use the following format for their filename: | |
| [album] [title] [artist] | |
| Note that there are two spaces between each element. |