Skip to content

Commit

Permalink
Added rigs to SquigCrawler. Renamed squig sites' over-ear rigs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaakkopasanen committed Dec 11, 2023
1 parent 07154ab commit e2339f0
Show file tree
Hide file tree
Showing 28 changed files with 2,099 additions and 2,043 deletions.
83 changes: 59 additions & 24 deletions dbtools/db.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 4,
"id": "e94fc711-2209-42e4-85cb-bb84d9d24211",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -266,15 +266,15 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 6,
"id": "54495976-3851-4ba8-9515-41b243a28c51",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"achoreviews, adri-n, aftersound, animagus, ankramutt, arn, auricularesargentina, aydn, bakkwatan, bedrock, bryaudioreviews, bukanaudiophile, cammyfi, cqtek, dchpgall, dhrme, dl, eliseaudio, eplv, fahryst, filk, freeryder05, gadgetrytech, harpo, hbb, hobbytalk, hore, ianfann, iemworld, ish, jacstone, jaytiss, kazi, kr0mka, kuulokenurkka, listener, melatonin, mmagtech, musicafe, nymz, practiphile, precog, pw, ragnarok, recode, regancipher, rg, sai, seanwee, smirk, soundcheck39, superreview, suporsalad, tanchjim, tedthepraimortis, tgx78, therollo9, timmyv, tonedeafmonk, vortexreviews, vsg, yanyin\n"
"achoreviews, adri-n, aftersound, animagus, ankramutt, arc, arn, auricularesargentina, aydn, bakkwatan, bedrock, bryaudioreviews, bukanaudiophile, cammyfi, cqtek, dchpgall, dhrme, dl, eliseaudio, eplv, fahryst, filk, freeryder05, gadgetrytech, harpo, hbb, hobbytalk, hore, ianfann, iemworld, ish, jacstone, jaytiss, kazi, kr0mka, kuulokenurkka, listener, melatonin, mmagtech, musicafe, nymz, practiphile, precog, pw, ragnarok, recode, regancipher, rg, sai, seanwee, smirk, soundcheck39, superreview, suporsalad, tanchjim, tedthepraimortis, tgx78, therollo9, timmyv, tonedeafmonk, vortexreviews, vsg, yanyin\n"
]
}
],
Expand Down Expand Up @@ -615,20 +615,50 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"id": "7dad9e32-864c-4edd-bc54-5992096e4e66",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "aeaa3e08edc946119cddd8ce89a4397d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(VBox(layout=Layout(max_height='600px', overflow='auto', width='324px')), VBox()))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"display(manager.run('rg').widget)"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"id": "05bfdfc8-3010-4736-a30b-56cfd009bf8f",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d55060aa5ee5446781e9d6c57de0b92d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
" 0%| | 0/189 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"manager.process('rg')"
]
Expand Down Expand Up @@ -846,7 +876,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 9,
"id": "3ce7a1e1-1613-42d2-a79f-32c901a5fa17",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -1467,20 +1497,25 @@
},
{
"cell_type": "code",
"execution_count": null,
"id": "a2b6a298-1081-4f66-ac57-e3141724f753",
"metadata": {},
"outputs": [],
"source": [
"update_results('RikudouGoku', 'over-ear', new_only=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 10,
"id": "16c10754-b19f-4ba1-91d3-afdb4d0cf428",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "dc05ba9b21e34691a00bd0d9ff15f154",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
" 0%| | 0/1 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"update_results('RikudouGoku', 'in-ear', new_only=True)"
]
Expand Down Expand Up @@ -1546,7 +1581,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 11,
"id": "67b4aa57-c478-47b5-b140-272ef4a93b07",
"metadata": {},
"outputs": [
Expand All @@ -1560,7 +1595,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6954d78ca2634f98adb6506fa340eb7b",
"model_id": "81046a2ba02743e19a3831235f3e31c2",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -1584,7 +1619,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "aad2a3bf6fbd46738f86f5a3084178b2",
"model_id": "c61dfdc6766c4eaeabb27ef2e79d5f04",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -1605,7 +1640,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c42552dc70e444839c4e42d356e3e7a6",
"model_id": "6996b2edb6224ca7bb69d71951d9390b",
"version_major": 2,
"version_minor": 0
},
Expand Down
23 changes: 22 additions & 1 deletion dbtools/squig_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,27 @@
from dbtools.constants import MEASUREMENTS_PATH


_squig_rigs = {
'Auriculares Argentina': {'in-ear': '711', 'over-ear': 'KB501x + 711'},
'Bakkwatan': {'in-ear': '711'},
'DHRME': {'in-ear': '711'},
'Fahryst': {'in-ear': '711'},
'Filk': {'in-ear': '711', 'over-ear': 'KB006x + 711'},
'freeryder05': {'in-ear': '711'},
'Harpo': {'in-ear': '711'},
'Hi End Portable': {'in-ear': '711'},
'Jaytiss': {'in-ear': '711'},
'Kazi': {'in-ear': '711'},
'kr0mka': {'in-ear': '711', 'over-ear': 'KB501x + 711'},
'Kuulokenurkka': {'in-ear': '711', 'over-ear': 'KB501x + 711'},
'Regan Cipher': {'in-ear': '711', 'over-ear': 'KB500x + 711'},
'RikudouGoku': {'in-ear': '711'},
'Super Review': {'in-ear': '711', 'over-ear': 'KB006x + 711'},
'Ted\'s Squig Hoard': {'in-ear': '711', 'over-ear': 'KB500x + 711'},
'ToneDeafMonk': {'in-ear': '711'},
}


class SquigCrawlerManager:
def __init__(self):
sites = requests.get('https://squig.link/squigsites.json', headers={
Expand Down Expand Up @@ -112,7 +133,7 @@ def crawl(self):
url=f'{self.db_url(db)}/{anchor["href"]}',
source_name=book[normalized_file_name] if normalized_file_name in book else None,
form=form,
rig=db['rig'] if 'rig' in db and db['rig'] else None # TODO
rig=_squig_rigs[self.name][form]
)
self.resolve(item)
self.crawl_index.add(item)
Expand Down
Loading

0 comments on commit e2339f0

Please sign in to comment.