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
# -*- coding: utf-8 -*- | |
""" | |
Build XML file of all our books' data for lending | |
for the purposes of short-term management of our electronic lending | |
collection in Alma | |
""" | |
import os |
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
git checkout -- . | |
git clean -fd | |
git pull |
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
from markdown2 import markdown | |
from IPython.core.display import HTML | |
with open('README.md', 'r') as fh: | |
m = markdown(fh.read()) | |
HTML(m) |
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
CREATE DEFINER=`root`@`localhost` trigger processtrigger after INSERT ON digitization_process | |
for each row BEGIN | |
UPDATE item | |
SET | |
item.PhysicalState = (SELECT | |
NewPhysState | |
FROM | |
process_type p | |
WHERE | |
NEW.ProcessType = p.ProcessTypeID) |
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
#toc h3 {margin: 16px 8px 16px 0px;} | |
#toc dt {margin: 3px; padding: 4px 0px; font-weight: normal;} | |
#toc dd {margin-top: 3px; margin-left: 16px; padding: 4px 0px;} | |
#toc dt a:link, #toc dd a:link {color: #333; text-decoration: none;} | |
#toc dt a:visited, #toc dd a:visited {color: #679146; text-decoration: none;} | |
#toc dt a:active, #toc dd a:active {color: #679146;} | |
#toc dt a:hover, #toc dd a:hover {color: #679146;} |
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
#toc h3 {margin: 16px 8px 16px 0px;} | |
#toc dt {margin: 3px; padding: 4px 0px; font-weight: normal;} | |
#toc dd {margin-top: 3px; margin-left: 16px; padding: 4px 0px;} | |
#toc dt a:link, #toc dd a:link {color: #333; text-decoration: none;} | |
#toc dt a:visited, #toc dd a:visited {color: #333; text-decoration: none;} | |
#toc dt a:active, #toc dd a:active {color: #679146;} | |
#toc dt a:hover, #toc dd a:hover {color: #679146;} |
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
# delete 599 and 910 fields from a current directory full of individual mrc files | |
# (python 3 script) | |
# pymarc: https://github.com/edsu/pymarc | |
# help found at https://gist.github.com/symac/0133cae8846c134e849c and https://gist.github.com/EG5h/0ac510047f39e0cf930a | |
import os | |
import glob | |
import pymarc | |
errorlist = "" | |
path = os.path.dirname(os.path.abspath(__file__)) + '\\' |
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 two directories recursively and optionally | |
replace directories' contents with the other | |
use case: replacing files from an old backup for | |
a cloned hard drive that has unpredictably corrupt files | |
''' | |
import os |
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
# cleans up the downloaded, bagged masters | |
# and moves to archival storage | |
# | |
# could combine this with the IA download script? | |
# | |
# leaves behind a log file with the id's to plug them into the Access db | |
import os | |
import shutil | |
from tkinter.filedialog import askdirectory |
NewerOlder