This file contains 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
# First export the iTunes ( aka "Music") Library.xml | |
# Get a list of all years present | |
cat Library.xml|grep Year |grep integer |sed 's/[^0-9]*//g' |sort |uniq >allyears.txt | |
# get a list of years to compare against (change to appropiate start and end years) | |
seq 1500 2024 >from1500.txt | |
# now see which years are missing | |
comm -13 allyears.txt from1500.txt | |
# To see what are the most common years: | |
cat Library.xml|grep Year |grep integer |sed 's/[^0-9]*//g' |sort |uniq -c |sort -n |
This file contains 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
// Output 1 line mediainfo for files | |
// TYPICAL USAGE: | |
// mediainfo sourceDir --Output=JSON > source.json | |
// node outputMusicList.js source.json | |
const fs = require("fs"); | |
var args = process.argv; | |
if (args.length < 3) { | |
console.error("Usage: node outputMusicList.js fileWithSource.json"); |
This file contains 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
const fs = require('fs'); | |
const filename = process.argv[2]; | |
const mediacontents = JSON.parse(fs.readFileSync(filename, "utf8")); | |
const index = {}; | |
const genres = {}; | |
mediacontents.forEach((file) => { | |
try { | |
const filename = file.media["@ref"]; |
This file contains 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
mediainfo -Output=JSON . > musicFiles.json | |
cat musicFiles.json |jq '.[].media| "\(."@ref") = \(.track[0].Genre)"' >genres.txt |
This file contains 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
// Compare to mediainfo json files generated with mediainfo . --Output=JSON | |
// run with node findDupMusic.js source.json possibleDups.json | |
// Will output files in possibleDups that are in source | |
// add trailing -delete option to delete these duplicate files | |
// A trailing -fource after delete will delete even if source file not present | |
// All options are super dumb and dependent on place | |
const fs = require("fs"); | |
const getOptions = (args) => { | |
const options = {}; |
This file contains 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
<xsl:stylesheet | |
version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:atom="http://www.w3.org/2005/Atom" | |
exclude-result-prefixes="atom" | |
> | |
<xsl:output method="html" omit-xml-declaration="no"/> | |
<xsl:template match="/atom:feed"> | |
<h1>Feed</h1> | |
<xsl:for-each select="atom:entry"> |
This file contains 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
#!/usr/local/bin/python3 | |
# Save the html from Delta Skymiles account activity as "skymiles.html" | |
# Then run this python script | |
# It will output tab delimited output with date, description, miles, and details | |
# Will be sorted from oldest to newest | |
from bs4 import BeautifulSoup as bs | |
from bs4 import BeautifulSoup |
This file contains 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
5 DIMN$(144) | |
6 SP$=" " | |
10 PRINT"MINI LISTER" | |
20 PRINT"LIST PROGRAM SEQUENTIAL, OR ALL":F=0 | |
30 GETA$:IFA$=""THEN30 | |
40 IFA$="P"THENF=1:GOTO65 | |
65 PRINT" PRESS ANY KEY WHEN PRINTER ON LINE, AND" | |
66 PRINT" DISK IS IN DRIVE READY TO BE CATALOGED":POKE198,0:WAIT198,1 | |
67 OPEN4,4:POKE198,0 | |
70 OPEN1,8,0,"$0 |
This file contains 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
// Sort an array in "Spiral" fashion, something like a snail | |
const spiral = (arr) => { | |
let out = []; | |
let k; | |
while (arr.length) { | |
// top | |
while (k = arr[0].shift()) { out.push(k); } | |
arr.shift(); | |
if (!arr.length) { |
NewerOlder