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
| # based on https://josh.fail/2022/merging-git-repos-with-git-filter-repo/ | |
| # First, make a clean checkout of all the repositories | |
| REPO_ROOT=~/Repositories/babel-merge | |
| # REPO_ROOT=$(dirname $(realpath $0)) | |
| git_filter_repo="git filter-repo" | |
| GIT_BASE=git@github.com:hathitrust | |
| export REPO_ROOT git_filter_repo GIT_BASE |
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 pairtree import id_encode | |
| import sys | |
| import os.path | |
| def topath(ident): | |
| encodedid = id_encode(ident) | |
| filepath = [] while encodedid: | |
| filepath.append(encodedid[:2]) | |
| encodedid = encodedid[2:] | |
| return os.path.join(*filepath) |
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
| # Sample meta.yml file with page tagging for the above. | |
| capture_date: 2025-10-20T15:04:00-04:00 | |
| scanner_user: "Test Scanner User" | |
| scanner_make: "Test Scanner Make" | |
| scanner_model: "Test Scanner Model" | |
| pagedata: | |
| 00000001.tif: { label: "FRONT_COVER" } | |
| 00000004.tif: { label: "BLANK" } |
OlderNewer