https://github.com/diyclassics/perseus-lookup
Lookup Latin/Greek vocabulary from the command line using Python/Beautiful Soup.
https://github.com/diyclassics/perseus-lookup
Last synced: about 1 year ago
JSON representation
Lookup Latin/Greek vocabulary from the command line using Python/Beautiful Soup.
- Host: GitHub
- URL: https://github.com/diyclassics/perseus-lookup
- Owner: diyclassics
- Created: 2014-08-20T19:29:52.000Z (almost 12 years ago)
- Default Branch: main
- Last Pushed: 2024-08-16T20:23:10.000Z (almost 2 years ago)
- Last Synced: 2025-04-23T03:50:06.055Z (about 1 year ago)
- Language: Python
- Size: 1.31 MB
- Stars: 14
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Perseus-Lookup
Experimenting with a way to search the Perseus Word Study Tool from the command line using Python and Beautiful Soup. More description in the docstrings for both lookup scripts. Have successfully used this from the command line (using bash) by making the script executable and including an alias for each script in .bash_profile.
## Requirements
10/3/16: Updated to Python3
(Listed in requirements.txt)
- Beautiful Soup v. 4.5.1
- Requests v. 2.20.0
## Usage
I was able to use this as a command-line lookup tool (bash) by:
1. Making latin-lookup.py and greek-lookup.py executable
2. Adding the following lines to .bash_profile:
- alias latin="python /[...YOUR DIRECTORY...]/latin-lookup.py"
- alias greek="python /[...YOUR DIRECTORY...]/greek-lookup.py"
I can now use these scripts from command line as follows:
```
> latin verba
> verba > verbum: a word
```
```
> greek logos
> logos > λόγος: computation, reckoning
```
Last tested on Mac OS 10.11.6 using Terminal (bash). Feedback, suggestions, etc. for other setups welcome.