├── __init__.py ├── norway └── __init__.py ├── sweden ├── __init__.py ├── README.md ├── data.py └── scraper.py ├── denmark ├── __init__.py ├── README.md └── data.py └── README.md /__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /norway/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sweden/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /denmark/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /denmark/README.md: -------------------------------------------------------------------------------- 1 | # Denmark runes 2 | 3 | ```python 4 | little_jelling_stone = "᛬ᚴᚢᚱᛘᛦ᛬ᚴᚢᚾᚢᚴᛦ᛬ᚴ(ᛅᚱ)ᚦᛁ᛬ᚴᚢᛒᛚ᛬ᚦᚢᛋᛁ᛬ᛅ(ᚠᛏ)᛬ᚦᚢᚱᚢᛁ᛬ᚴᚢᚾᚢ᛬ᛋᛁᚾᛅ᛬ᛏᛅᚾᛘᛅᚱᚴᛅᛦ᛬ᛒᚢᛏ᛬" 5 | ``` 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Corpus of runic inscriptions 2 | 3 | We have currently many runic inscriptions coming from Sweden. If you have runic inscriptions to Denmark and Norway, please open an issue here (or better, open a pull request). 4 | -------------------------------------------------------------------------------- /denmark/data.py: -------------------------------------------------------------------------------- 1 | """ 2 | Sources: 3 | Little Jelling Stone https://fr.wikipedia.org/wiki/Petite_pierre_de_Jelling 4 | """ 5 | 6 | __author__ = ["Clément Besnier ", ] 7 | 8 | 9 | little_jelling_stone = "᛬ᚴᚢᚱᛘᛦ᛬ᚴᚢᚾᚢᚴᛦ᛬ᚴ(ᛅᚱ)ᚦᛁ᛬ᚴᚢᛒᛚ᛬ᚦᚢᛋᛁ᛬ᛅ(ᚠᛏ)᛬ᚦᚢᚱᚢᛁ᛬ᚴᚢᚾᚢ᛬ᛋᛁᚾᛅ᛬ᛏᛅᚾᛘᛅᚱᚴᛅᛦ᛬ᛒᚢᛏ᛬" 10 | big_jelling_stone = "ᚼᛅᚱᛅᛚᛏᚱ᛬ᚴᚢᚾᚢᚴᛦ᛬ᛒᛅᚦ᛬ᚴᛅᚢᚱᚢᛅ ᚴᚢᛒᛚ᛬ᚦᛅᚢᛋᛁ᛬ᛅᚠᛏ᛬ᚴᚢᚱᛘ ᚠᛅᚦᚢᚱ ᛋᛁᚾ ᛅᚢᚴ ᛅᚠᛏ᛬ᚦᚭᚢᚱᚢᛁ᛬ᛘᚢᚦᚢᚱ᛬ᛋᛁᚾᛅ᛬ᛋᛅ " \ 11 | "ᚼᛅᚱᛅᛚᛏᚱ(᛬)ᛁᛅᛋ᛬ᛋᚭᛦ᛫ᚢᛅᚾ᛫ᛏᛅᚾᛘᛅᚢᚱᚴ\nᛅᛚᛅ᛫ᛅᚢᚴ᛫ᚾᚢᚱᚢᛁᚴ\n᛫ᛅᚢᚴ᛫ᛏ(ᛅ)ᚾᛁ(᛫ᚴᛅᚱᚦᛁ᛫)ᚴᚱᛁᛋᛏᚾᚭ" 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /sweden/README.md: -------------------------------------------------------------------------------- 1 | # Sweden runes 2 | 3 | * **data.py** 4 | ```python 5 | 6 | ramsund_runestone = "ᛋᛁᚱᚦ᛬ᚴᛁᛅᚱᚦᛁ᛬ᛒᚢᚦ᛬ᚦᚭᛋᛁ᛬ᛘᚢᚦᛁᛦ᛬ᛅᛚᚱᛁᚴᛋ᛬ᛏᚢᛏᛁᛦ᛬ᚢᚱᛘᛋ᛬ᚠᚢᚱ᛬ᛋᛅᛚᚢ᛬ᚼᛅᛚᚢ᛬ᚼᚢᛚᛘᚴᛁᚱᛋ᛬ᚠᛅᚦᚢᚱ᛬ᛋᚢᚴᚱᚢᚦᛅᚱ᛬ᛒᚢᛅᛏᛅ᛬ᛋᛁᛋ" 7 | 8 | 9 | 10 | 11 | 12 | ``` 13 | * **scraper.py** retrieves runic inscriptions from http://runes.verbix.com/index.html 14 | * __retrieve_sweden_runic_inscriptions__ downloads from the source all the runic inscriptions and stores them in a JSON file. 15 | * __read_sweden_runic_inscriptions__ reads the JSON file. 16 | ```python 17 | retrieve_sweden_runic_inscriptions() 18 | read_sweden_runic_inscriptions() 19 | ``` 20 | -------------------------------------------------------------------------------- /sweden/data.py: -------------------------------------------------------------------------------- 1 | """ 2 | Sources: 3 | 4 | 5 | ed_inscription: http://runes.verbix.com/vikingage/Uppland.html 6 | The Ed (Boulder) Inscription from Uppland, Sweden 7 | 8 | u448: https://en.wikipedia.org/wiki/Uppland_Runic_Inscription_448 9 | 10 | u92: https://en.wikipedia.org/wiki/Uppland_Runic_Inscription_92 11 | """ 12 | 13 | __author__ = ["Clément Besnier ", ] 14 | 15 | ramsund_runestone = "ᛋᛁᚱᚦ᛬ᚴᛁᛅᚱᚦᛁ᛬ᛒᚢᚦ᛬ᚦᚭᛋᛁ᛬ᛘᚢᚦᛁᛦ᛬ᛅᛚᚱᛁᚴᛋ᛬ᛏᚢᛏᛁᛦ᛬ᚢᚱᛘᛋ᛬ᚠᚢᚱ᛬ᛋᛅᛚᚢ᛬ᚼᛅᛚᚢ᛬ᚼᚢᛚᛘᚴᛁᚱᛋ᛬ᚠᛅᚦᚢᚱ᛬ᛋᚢᚴᚱᚢᚦᛅᚱ᛬ᛒᚢᛅᛏᛅ᛬ᛋᛁᛋ" 16 | 17 | 18 | ed_inscription = "ᚱᛅᚼᚾᚢᛅᛚᛏᚱ ᛫ ᛚᛁᛏ ᛫ ᚱᛁᛋᛏᛅ ᛫ ᚱᚢᚾᛅᚱ ᛫ ᚽᚡᛦ ᛫ ᚡᛅᛋᛏᚢᛁ ᛫ ᛘᚬᚦᚢᚱ ᛫ ᛋᛁᚾᛅ ᛫ ᚬᚾᚽᛘᛋ ᛫ ᛏᚬᛏᛦ ᛫ ᛏᚬ ᛁ ᛫ " \ 19 | "ᛅᛁᚦᛁ ᛫ ᚴᚢᚦ ᚼᛁᛅᛚᛒᛁ ᛫ ᛅᚾᛏ ᛫ ᚼᚽᚾᛅ ᛫ " \ 20 | "§B ᚱᚢᚾᛅ ᛫ ᚱᛁᛋᛏᛅ ᛫ ᛚᛁᛏ ᛫ ᚱᛅᚼᚾᚢᛅᛚᛏᚱ ᛫ ᚼᚢᛅᚱ ᛅ × ᚵᚱᛁᚴᛚᛅᚾᛏᛁ ᛫ ᚢᛅᛋ ᛫ ᛚᛁᛋ ᛫ ᚡᚬᚱᚢᚾᚴᛁ ᛫" 21 | 22 | 23 | u448 = "ᚴᚢᛚ᛫ᛅᚢᚴ᛫ᛒᛁᚢᚱᚾ᛫ᛚᛁᛏᚢ᛫ᚱᛅᛁᛋᛅ᛫ᛋᛏᛅᛁᚾ᛫ᛂᚠᛏᛁᛦ᛫ᚦᚢᚱᛋᛏᛅᛁᚾ᛫ᚠᛅᚦᚢᚱ" 24 | 25 | 26 | u92 = "ᚴᚾᚢᛏᚱ ' ᛁ ᚢᛁᚴ'ᚼᚢᛋᚢᛘ ' ᛚᛁᛏ ' ᛋᛏᛅᛁᚾ ' ᚱᛁᛏᛅ ' ᚢᚴ ' ᛒᚱᚬ ' ᚴᛁᚱᛅ ᛫ ᛁᚡᛏᛁᛦ ' ᚡᛅᚦᚢᚱ ᚢᚴ ᛫ ᛘᚬᚦᚬᚱ ᛫ ᚢᚴ ᛫" \ 27 | " ᛒᚱᚤᚦᚱ ᛫ ᛋᛁᚾᛅ ᛫ ᚢᚴ ᛫ ᛋᚢᛋᛏᚢᚱ" 28 | 29 | 30 | sweden_runic_inscription_filename = "sweden_runes.json" 31 | 32 | -------------------------------------------------------------------------------- /sweden/scraper.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | """ 4 | 5 | import time 6 | import json 7 | from lxml import html 8 | import requests 9 | 10 | from .data import sweden_runic_inscription_filename 11 | 12 | __author__ = ["Clément Besnier ", ] 13 | 14 | 15 | def retrieve_sweden_runic_inscriptions(): 16 | site = "http://runes.verbix.com/index.html" 17 | rrunes = requests.get(site) 18 | tree = html.fromstring(rrunes.text) 19 | links = [i.get("href") for i in tree.xpath("//a") if "vikingage" in i.get("href")] 20 | runes = {} 21 | for link in links: 22 | page = requests.get("http://runes.verbix.com/"+link) 23 | tree = html.fromstring(page.text) 24 | rune_blocks = tree.xpath('//p[@class="rrune"]') 25 | print(len(rune_blocks)) 26 | content = [rb.text for rb in rune_blocks] 27 | runes[link] = content 28 | print(content) 29 | time.sleep(1) 30 | with open(sweden_runic_inscription_filename, "w") as f: 31 | json.dump(runes, f) 32 | 33 | 34 | def read_sweden_runic_inscriptions(): 35 | with open(sweden_runic_inscription_filename, "r") as f: 36 | loaded_runes = json.load(f) 37 | 38 | print(loaded_runes.keys()) 39 | 40 | 41 | if __name__ == "__main__": 42 | retrieve_sweden_runic_inscriptions() 43 | read_sweden_runic_inscriptions() 44 | --------------------------------------------------------------------------------