Skip to content

Instantly share code, notes, and snippets.

View Vocaned's full-sized avatar
🐦‍⬛

Vocaned Vocaned

🐦‍⬛
View GitHub Profile
@Vocaned
Vocaned / filename.ptsp
Last active August 2, 2025 10:02
Picard tagger scripts
$set(_tmpartist,$if2($getmulti(%artists%, 0),%artist%))
$if($in($lower(%albumartist%),$lower(%_tmpartist%)),%_tmpartist%,%albumartist%)/
[%date%] %album%/
$num(%tracknumber%,2) %title%
#!/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')
#!/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
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)
#!/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 = {
#!/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')
#!/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"
#!/bin/python
from mutagen.flac import FLAC
from pathlib import Path
import sys
REPLACEMENTS = {
'‘': "'",
'’': "'",
'“': '"',
'”': '"',
// 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;
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: ')