Created
August 3, 2021 18:29
-
-
Save vincentjorgensen/28954598fa484d6ac9ffaafc852d30a6 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# Adds links to Perseus Project parsed dictionary entries to a selection of Latin text | |
# Usage: | |
# 1) Save Latin in text file, ex. latin.txt | |
# 2) tufts-to-latin.sh latin.txt > latin.html | |
# 3) open latin.html in a web browser | |
source_file=$1 | |
sed -e 's;\b\([a-zA-z][a-zA-Z]*\)\b;<a href="https://www.perseus.tufts.edu/hopper/morph?l=\1\&la=la" target="_blank" rel="noopener noreferrer">\1</a>;g;s/$/<br>&/g' "${source_file}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Adds links to Perseus Project parsed dictionary entries to a selection of Latin text
Usage:
latin.txt
tufts-to-latin.sh latin.txt > latin.html
latin.html
in a web browser