You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
3.5 KiB
Markdown

# letters & poetry
1 week ago
Python apps that display random historic love letters and classic poetry from [Project Gutenberg](https://www.gutenberg.org/). Includes a web UI for both at [hicalsoft.com/letters](https://hicalsoft.com/letters) and [hicalsoft.com/poetry](https://hicalsoft.com/poetry).
## Quick Start
```bash
# Love Letters
python3 love_letters.py # Show a random love letter
python3 love_letters.py -n 3 # Show 3 random love letters
python3 love_letters.py --list # List available collections
python3 love_letters.py --source keats_brawne # Filter by source
```
The `letters/` directory ships with 1,300+ pre-parsed letters and `poetry/` with 3,100+ poems — no download needed.
## Refreshing / Adding Sources
To re-download collections from Project Gutenberg:
```bash
# Letters
python3 download_letters.py # Download all letter sources
python3 download_letters.py --list # List available sources
# Poetry
python3 download_poetry.py # Download all poetry sources
python3 download_poetry.py --list # List available sources
```
## Letter Sources
| Collection | Author → Recipient | Period | Letters |
|---|---|---|---|
| Henry VIII to Anne Boleyn | Henry VIII → Anne Boleyn | c. 15271528 | 18 |
| Mary Wollstonecraft to Gilbert Imlay | Mary Wollstonecraft → Gilbert Imlay | 17931795 | 75 |
| Letters of Abelard and Heloise | Abelard & Heloise | 12th century | 6 |
| Napoleon's Letters to Josephine | Napoleon Bonaparte → Josephine | 17961812 | 395 |
| Letters of John Keats to Fanny Brawne | John Keats → Fanny Brawne | 18191820 | 39 |
| Robert Browning & Elizabeth Barrett Barrett, Vol. 1 | Browning ↔ Barrett | 18451846 | 281 |
| Robert Browning & Elizabeth Barrett Barrett, Vol. 2 | Browning ↔ Barrett | 18451846 | 292 |
| Robert Burns to Clarinda | Robert Burns → Agnes McLehose | 17871794 | 60 |
| Dorothy Osborne to Sir William Temple | Dorothy Osborne → William Temple | 16521654 | 51 |
| Beethoven's Letters (love letters selected) | Ludwig van Beethoven | 17901826 | 30 |
| Mozart's Letters (love letters selected) | Wolfgang Amadeus Mozart | 17691791 | 60 |
## Poetry Sources
| Collection | Poet | Period | Poems |
|---|---|---|---|
| Shakespeare's Sonnets | William Shakespeare | 1609 | 154 |
| Poems, Three Series | Emily Dickinson | 18901896 | 439 |
| Leaves of Grass | Walt Whitman | 18911892 | 383 |
| Songs of Innocence and of Experience | William Blake | 17891794 | 43 |
| Poems Published in 1820 | John Keats | 1820 | 10 |
| Complete Poetical Works | Edgar Allan Poe | 18271849 | 108 |
| Sonnets from the Portuguese | Elizabeth Barrett Browning | 1850 | 44 |
| The Waste Land | T.S. Eliot | 1922 | 5 |
| Mountain Interval | Robert Frost | 1916 | 35 |
| Selected Poems | Robert Frost | 19131916 | 47 |
| The Wind Among the Reeds | W.B. Yeats | 1899 | 48 |
| The Rubaiyat of Omar Khayyam | Omar Khayyam (trans. FitzGerald) | 11th12th c. | 176 |
| Poems and Songs | Robert Burns | 17711796 | 563 |
| Lyrical Ballads | William Wordsworth | 1798 | 51 |
| Complete Poetical Works | Percy Bysshe Shelley | 18101822 | 1049 |
All texts are sourced from [Project Gutenberg](https://www.gutenberg.org/) and are in the public domain.
## Web UI
The `hicalsoft.github.io/` directory contains a standalone web interface:
- **[/letters](https://hicalsoft.com/letters)** — Browse love letters by author, with random letter button
- **[/poetry](https://hicalsoft.com/poetry)** — Browse poetry by poet, with random poem button
## Requirements
Python 3.10+ (no external dependencies).