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
/* 11/27/2017 - Tweaked for a page redesign. | |
* 1/6/2018 - Handle videos in book bundle. | |
*/ | |
var pattern = /(MOBI|EPUB|PDF( ?\(H.\))?|CBZ)$/i; | |
var pattern2 = /(Download)$/; | |
var nodes = document.getElementsByTagName('a'); | |
var downloadCmd = ''; | |
for (i in nodes) { | |
var a = nodes[i]; | |
if (a && a.text && pattern.test(a.text.trim())) { |
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
# I had a lot of duplicate images of the form | |
# IMG_NNNN.JPG and IMG_NNNN-001.JPG | |
# I wanted to delete the -001 versions, but not all -001 files were dupes. | |
alias sortline='tr " " "\n" | sort | tr "\n" "\t"' | |
alias getem='fdupes -1 . |while read line; do echo $line |(sortline; echo)| cut -f1 ; done |xargs -r rm ' | |
for l in 2* ; do (cd $l; getem); done |