This file contains hidden or 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 datetime import date, datetime | |
| # Get today's date | |
| today = date.today() | |
| # Calculate December 31 of (current year + 5) | |
| expiration_year = today.year + 5 | |
| expiration_date = date(expiration_year, 12, 31) | |
| # Format as YYYY-MM-DDThh:mm:ss |
This file contains hidden or 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 datetime import date, datetime | |
| # Get today's date | |
| today = date.today() | |
| # Calculate December 31 of (current year + 5) | |
| expiration_year = today.year + 5 | |
| expiration_date = date(expiration_year, 12, 31) | |
| # Format as YYYY-MM-DDThh:mm:ss |
This file contains hidden or 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
| <!-- Bethany College WorldCat Discovery search box (Multi-widget safe class structure with OCLC styling) --> | |
| <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" | |
| rel="stylesheet" | |
| integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" | |
| crossorigin="anonymous"> | |
| <style type="text/css"> | |
| /* OCLC CSS rules but adapted for class-based selectors for multi-widget support */ | |
| .worldcat-search-box, .worldcat-search-box * { | |
| box-sizing: border-box !important; |
This file contains hidden or 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
| <style type="text/css"> | |
| .worldcat-search-box, .worldcat-search-box * {box-sizing:border-box!important;margin:0;padding:0;text-align:left} | |
| .worldcat-search-box .material-tab{display:inline-block;user-select:none;cursor:pointer;background-color:#002856;color:#fff;min-height:2em;min-width:1.5rem;padding:.5em;box-sizing:border-box;border-radius:.25em .25em 0 0;margin-right:.4em;z-index:2} | |
| .worldcat-search-form{position:relative;width:auto;padding:1.25em 2em 2em;background-color:#f2f2f2!important;color:#333!important;z-index:1;line-height:initial} | |
| .worldcat-search-box .material-tab.active-tab{background-color:#f2f2f2!important;color:#333!important} | |
| .worldcat-index-container{position:relative;height:3em;background-color:white;color:black} | |
| .worldcat-index-container:after{content:'\f078';display:block;font-family:'FontAwesome',sans-serif;position:absolute;top:0;right:.5em;line-height:3em;z-index:5} | |
| .worldcat-index-container .worldcat-search-select{position:relative;z-index:10;height:100%;min-width:initi |
This file contains hidden or 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
| ##run SQL and write csv for sierra items with mismatched agency and location | |
| import psycopg2 | |
| import csv | |
| ##change report directory and bool number | |
| report = "/your/path/your/csv/filename.csv" | |
| query = """ | |
| SELECT | |
| i.record_type_code || record_num || 'a' AS "Item"/*, |
This file contains hidden or 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
| ##python template for Sierra SQL query | |
| ##write csv for fines to local directory | |
| ##copied SQL from github jmgold/SQL Queries | |
| ##Patrons with high fines detail.sql | |
| ##find/replace FIND '[insert ' in this script for prompts REPLACE [insert /prompt/with/relevant/value | |
| import psycopg2 | |
| import csv |
This file contains hidden or 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
| #workaround to select databases for electronic resource analysis in Springshare LibInsight | |
| #c5DR from libinsight Fetch List to c4 CSV for custom upload | |
| import json | |
| import csv | |
| from collections import defaultdict | |
| from datetime import datetime | |
| import os | |
| import glob |
This file contains hidden or 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
| <! -- reformat HTML from OCLC Service Configuration Discovery Search Box Generator | |
| workaround to create a temporary form when search is submitted instead of directly opening search URL with search box | |
| --> | |
| <! -- search box style - replace with HTML from OCLC search Box Generator as needed --> | |
| <style type="text/css"> | |
| .worldcat-search-box, .worldcat-search-box * {box-sizing:border-box!important;margin:0;padding:0;text-align:left} | |
| .worldcat-search-box .material-tab{display:inline-block;user-select:none;cursor:pointer;background-color:#002856;color:#fff;min-height:2em;min-width:1.5rem;padding:.5em;box-sizing:border-box;border-radius:.25em .25em 0 0;margin-right:.4em;z-index:2} | |
| .worldcat-search-form{position:relative;width:auto;padding:1.25em 2em 2em;background-color:#f2f2f2!important;color:#333!important;z-index:1;line-height:initial} |