This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$set(_tmpartist,$if2($getmulti(%artists%, 0),%artist%)) | |
$if($in($lower(%albumartist%),$lower(%_tmpartist%)),%_tmpartist%,%albumartist%)/ | |
[%date%] %album%/ | |
$num(%tracknumber%,2) %title% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
from pathlib import Path | |
from mutagen.flac import FLAC | |
from mutagen import MutagenError | |
for flac_file in Path('..').glob('**/*.flac'): | |
base_name = flac_file.stem | |
lrc_file = flac_file.with_name(base_name + '.lrc') | |
unsynced_lrc_file = flac_file.with_name(base_name + '.txt') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ./download_workshop.sh [steam workshop URL] | |
set -e | |
workshop_id=$(echo "$1" | grep -Po 'steamcommunity\.com/(sharedfiles|workshop)/filedetails/.*id=\K(\d+)') | |
if [ -z "$workshop_id" ]; then | |
echo "Could not extract ID from given URL" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import struct | |
import json | |
class IPC(socket.socket): | |
def __init__(self, socket_path: str, client_id: str) -> None: | |
self.CLIENT_ID = client_id | |
super().__init__(socket.AF_UNIX, socket.SOCK_STREAM) | |
self.connect(socket_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
import requests | |
from urllib.parse import urlencode | |
from mutagen.flac import FLAC | |
from pathlib import Path | |
from math import floor | |
token = '' | |
url = 'https://apic-desktop.musixmatch.com/ws/1.1/macro.subtitles.get' | |
headers = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
from mutagen.flac import FLAC | |
from pathlib import Path | |
import re | |
for p in Path('..').glob('**/*'): | |
if not p.is_file() or p.suffix != '.flac': | |
continue | |
lrcp = p.with_suffix('.lrc') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
find .. -type f -iname "*.flac" | while read -r file; do | |
date_val=$(metaflac --show-tag=DATE "$file" | sed 's/^DATE=//') | |
originaldate_val=$(metaflac --show-tag=ORIGINALDATE "$flac_file" | sed 's/^ORIGINALDATE=//') | |
if [[ -n "$date_val" && -n "$originaldate_val" && "$date_val" != "$originaldate_val" ]]; then | |
echo "$file" | |
echo " $date_val -> $originaldate_val" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
from mutagen.flac import FLAC | |
from pathlib import Path | |
import sys | |
REPLACEMENTS = { | |
'‘': "'", | |
'’': "'", | |
'“': '"', | |
'”': '"', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set up some prerequisites | |
if (typeof _mods === 'undefined') { | |
var _mods; webpackChunkdiscord_app.push([[Symbol()], {}, r => _mods = r.c]); | |
webpackChunkdiscord_app.pop(); | |
} | |
if (typeof findByProps === 'undefined') { | |
var findByProps = (...props) => { | |
for (let m of Object.values(_mods)) { | |
try { | |
if (!m.exports || m.exports === window) continue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import hashlib | |
from urllib.parse import urlencode | |
api_key = input('API Key: ') | |
secret = input('Secret: ') | |
print(f'Open http://www.last.fm/api/auth/?api_key={api_key}') | |
token = input('Enter the token: ') |
NewerOlder