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
sox 'INPUT.flac' OUTPUT.flac silence 1 0.50 0.1% 1 1.0 0.1% : newfile : restart |
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
pip install pywb | |
wb-manager init my-web-archive | |
wb-manager add my-web-archive <path/to/my_warc.warc.gz> | |
wayback |
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
ls SOURCE | while read FILE ; do target=$(basename "$FILE"); if [ "$(find NEW-LOCATION -iname "$target")" ] ; then echo "found ${target}"; else echo "not found ${target}" ; fi; done > ~/Desktop/results.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
function checkCollection() { | |
if ( window.location.href.split('/collection/')[1] != undefined){ | |
var collectionToSearch = window.location.href.split('/collection/')[1].split('/')[0]; | |
collectionButton = document.getElementsByClassName("btn-see-more-less")[0].click(); | |
document.getElementsByName("selectAll")[0].click(); | |
var collectionToSearch = window.location.href.split('/collection/')[1].split('/')[0]; | |
document.getElementsByName(collectionToSearch)[0].click(); | |
collectionButton = document.getElementsByClassName("btn-see-more-less")[0].click(); | |
document.querySelectorAll("[data-id='updateBtn']")[0].click(); | |
} |
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
curl 'https://research.libraries.wsu.edu:8443/oai/request?verb=GetRecord&metadataPrefix=xoai&identifier=urn:URN-HERE' | xmlstarlet format --indent-tab > output.xml |
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
-c:v libx264 -x264opts bff |
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
ffmpeg -f dshow -pixel_format yuyv422 -i video="Osprey-827e MFI Video Device 1":audio="Unbal Input 1 (Osprey-827e 1)" -color_primaries smpte170m -color_trc bt709 -colorspace smpte170m -c:a pcm_s24le -c:v ffv1 -level 3 -g 1 -slices 16 -slicecrc 1 -vf setsar=40/27,setdar=4/3,setfield=bff,fieldorder=bff -y OUTPUT -f nut -vf setsar=40/27,setdar=4/3 - | ffplay - |
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
# xpath to type for xoai | |
# puts doc.xpath("//record/metadata/metadata/element/*[@name='type']/element/field")[0].content | |
doc = File.open("TARGET.XML") { |f| Nokogiri::XML(f) } | |
doc.remove_namespaces! | |
single_text = Array.new | |
publisher_text = Array.new | |
relation_text = Array.new | |
doc.xpath("//record").each do |record_element| | |
if (record_element.xpath('metadata/dc/type').count == 1 && record_element.xpath('metadata/dc/type').text == 'Text') | |
single_text << record_element.xpath('metadata/dc/type').text |
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
var="100" | |
curl 'http://research.wsulibs.wsu.edu:8080/oai/request?verb=ListRecords&metadataPrefix=oai_dc' | xmlstarlet format -s 2 > dspace-dump_000.xml | |
while [ $var -lt 13300 ] ; do | |
echo "Gathering records from number $var" | |
curl "http://research.wsulibs.wsu.edu:8080/oai/request?verb=ListRecords&resumptionToken=oai_dc////$var" | xmlstarlet format -s 2 >> "dspace-dump_$var.xml" | |
var=$((var + 100)) | |
done | |
echo '<?xml version="1.0" encoding="UTF-8"?> | |
<?xml-stylesheet type="text/xsl" href="static/style.xsl"?> | |
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"> |
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
doc.xpath("//record/metadata/metadata/element/*[@name='type']/element").each do |line| | |
if line.xpath("field").count > 1 | |
puts line.xpath("field")[2].content | |
end | |
end ; nil | |
# Delete 'text' | |
doc.xpath("//record/metadata/metadata/element/*[@name='type']/element").each do |line| | |
if line.xpath("field").count > 1 |