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
' Usage: Select/place your cursor in the cell you want to copy text TO, | |
' then run the macro. It will loop through all rows, so only select | |
' one cell. | |
' The first macro will copy text into blank cells for the currently | |
' selected table. | |
' | |
' The second will do this for the selected columns in all tables | |
' in the document. | |
' |
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
require 'octokit' | |
require_relative 'gapi_config' | |
############################################################################ | |
# Copy issues and comments from one repository to another (sort of). # | |
# Because there is no way to copy issues directly, this script will # | |
# create new issues with the original metadata in the issue's body. # | |
# # | |
# NOTE: Assignees and issue status are included in the metadata block, # | |
# but the new issue itself will be open and unassigned. # |
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
{ | |
"translatorID": "508a49ba-18cb-4ead-b928-2a7b230450aa", | |
"label": "Stack Exchange", | |
"creator": "Rachel Donahue", | |
"target": "(http)(s)?:\\/\\/(\\w*\\.)?(stack)(overflow|exchange)(\\.com)(\\/questions)(.*)", | |
"minVersion": "3.0", | |
"maxVersion": "", | |
"priority": 100, | |
"inRepository": true, | |
"translatorType": 4, |
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
// Currently only creates slightly wonky Report items, as there is no way to identify itemType from the page content. | |
{ | |
"translatorID": "3f682e1e-a845-41f3-a5e9-4aad993e5090", | |
"label": "NALDC", | |
"creator": "Rachel Donahue", | |
"target": "http://naldc.nal.usda.gov/[\\w-_]*", | |
"minVersion": "3.0", | |
"maxVersion": "", | |
"priority": 100, |
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
' The final step in the process requires pandoc http://pandoc.org/ | |
' This was designed for our particular Finding Aid template, so some sections might not apply. The ConvertHeadings function, in particular, references a custom style and decrements all Heading sizes by 1. | |
' Running the prepWordForHtml macro will do the following: | |
' - Remove all Content Controls (but preserve the content) | |
' - Convert list numbering to plain text | |
' - Change Box Heading Style to Heading 3 | |
' - Change Heading 2 to Heading 3 | |
' - Change Heading 1 to Heading 2 | |
' - Delete Captions | |
' - Delete TOC Heading 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
// Omeka loads jQuery No Conflict by default, so we can't use $ | |
jQuery(document).ready(function() { | |
/* Code to make fancybox more accessible | |
Be sure to also set .fancybox-nav span's visibility to "visible" | |
so buttons are shown without the mouse. */ | |
jQuery('.fancybox').fancybox({ | |
openEffect : 'none', | |
closeEffect : 'none', |
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 browseForFolder() | |
Dim intResult As Integer | |
Dim strPath As String | |
'the dialog is displayed to the user | |
intResult = Application.FileDialog(msoFileDialogFolderPicker).Show | |
'checks if user has cancled the dialog | |
If intResult <> 0 Then | |
'dispaly message box | |
browseForFolder = Application.FileDialog(msoFileDialogFolderPicker).SelectedItems(1) | |
End If |
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
#-------------------------------------------------------------------------------------------------------------- | |
# This is the script I use to add real dates, change frequencies, and priorities to Omeka items, | |
# exhibits, and simple pages to sitemaps generated with the XML Sitemap tool. | |
# https://www.xml-sitemaps.com/standalone-google-sitemap-generator.html | |
# | |
# I use the following settins in order to keep the number of URLs down (only include simple pages, exhibits | |
# and exhibit pages, exhibit items, and collection pages). | |
# | |
# Exclude from sitemap extensions: | |
# divx flv zip m4a m4v rar tar bz2 tgz exe gif tif jpg png class jar mpeg mpg mp3 wav mp4 avi wmv |
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
# REQUIRES os_dir, available at https://gist.github.com/sheepeeh/39c25bd67ccc09ad78a0 | |
# place in an easy to remember directory or add to your PATH. Expects (C/T)SV headings "oldname" and "newname." | |
# USAGE: filename.rb file_with_filenames.csv | |
require 'csv' | |
require_relative 'os_dir' | |
def rename_files(source) | |
current_dir |
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
require 'rbconfig' | |
def init | |
@os | |
@current_dir | |
end | |
def os | |
@os ||= ( | |
host_os = RbConfig::CONFIG['host_os'] |
NewerOlder