sec03 EN sweep 01-06: +7 files (15,19,31,32,33,36,47) + Eliade canonical move (sec05#07 -> sec03#25)
libgen re-sweep of EN gaps in sections 01-06 (user request; improved sweep: file-level objects[]=f + full 100-row dumps) — 75 candidates, 7 rescues verified: - sec03 #15 Witches Ogres (Shambhala 1992, 236pp, cover OK) - sec03 #19 Hermes and His Children (Daimon 2020 2nd ed., epub ISBN in file) - sec03 #31 European Folktale (Indiana 1986, 204pp, cover OK) - sec03 #32 Fairytale as Art Form (Indiana 1987, 232pp, title OK) - sec03 #33 Once Upon a Time (Ungar 1976 1st ed., 204pp, title OK; RAW 'Indiana 1970' = ISAP typo) - sec03 #36 Irresistible Fairy Tale (Princeton 2012, epub OK) - sec03 #47 Heart of the Hunter (Vintage 2010, mobi) + sec02 #16 A Little Course in Dreams (Shambhala 1986, 137pp, verified) Canonical location fix: Eliade 'Myths, Dreams and Mysteries' files moved sec05 -> sec03 (first appearance); sec03 #25 card ❌ -> ✅ (RU was found in sec05 rescue 2026-09-21, card was stale). Still downloading (queue tools/lgdl-en0106-queue.sh): sec03 #50 (Atlas x4), #55, #57, sec04 #04 (Art of C.G. Jung 2018, 298MB), #17, sec01 #42 (Freud Unconscious Penguin). Rejected: 04#23 Encyclopedia (JSTOR article 467KB), 05#16 Singer 2023 (different book).
This commit is contained in:
parent
7a402ee0ba
commit
99e889d206
30 changed files with 1663 additions and 3432 deletions
138
tools/en_sweep_0106.py
Normal file
138
tools/en_sweep_0106.py
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
#!/usr/bin/env python3
|
||||
"""tools/en_sweep_0106.py — re-sweep EN gaps of sections 01-06 (2026-09-28, user request).
|
||||
|
||||
Round 1: soft libgen queries (author + 1-2 title words), whole-word semantics.
|
||||
Saves data/en-sweep-0106.tsv: sec,item,query,n,top3 (first lines).
|
||||
Polite: 4s between queries. Resume-safe (skips items already in TSV).
|
||||
"""
|
||||
import os, re, sys, time
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
from lg import fetch, UA
|
||||
|
||||
OUT = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "data", "en-sweep-0106.tsv")
|
||||
|
||||
CANDIDATES = [
|
||||
# (sec, item, query, note)
|
||||
("01","13","Franz inferior function","Shambhala 1993"),
|
||||
("01","16","Henderson shadow self","Chiron 1990"),
|
||||
("01","38","Douglas woman mirror","Sigo 1989"),
|
||||
("01","42","Freud unconscious","SE 14"),
|
||||
("01","48","Meier consciousness","Sigo 1989"),
|
||||
("01","50","Molton eternal women","Fisher King 2011"),
|
||||
("01","52","Stevens on jung","Princeton 1990"),
|
||||
("01","54","Ulanov transforming sexuality","Shambhala 1994"),
|
||||
("02","16","little course dreams","Shambhala 1988"),
|
||||
("02","20","way of dream","Windrose 1988"),
|
||||
("02","23","clinical uses dreams","Hall 1977"),
|
||||
("02","42","dream tending","2009"),
|
||||
("03","06","Dieckmann twice told tales","Chiron"),
|
||||
("03","12","archetypal symbols profane","Franz vol1 2021"),
|
||||
("03","13","archetypal symbols hero","Franz vol2 2021"),
|
||||
("03","14","archetypal symbols maiden","Franz vol3 2021"),
|
||||
("03","15","witches ogres","Jacoby/Kast/Riedel 1992"),
|
||||
("03","17","kast emotions maturity","Fromm 1993"),
|
||||
("03","19","Lopez-Pedraza hermes","Daimon 1989"),
|
||||
("03","21","psyche stories","Stein/Corbett Chiron"),
|
||||
("03","31","Luthi european folktale","Indiana 1986"),
|
||||
("03","32","Luthi art form","Indiana"),
|
||||
("03","33","Luthi once upon","Indiana"),
|
||||
("03","36","Zipes irresistible","Princeton 2012"),
|
||||
("03","47","Post heart hunter","Van der Post 1961"),
|
||||
("03","49","animal life myth dreams","Caspari/Robbins Chiron 2003"),
|
||||
("03","50","historical atlas mythology","Caspari/Robbins"),
|
||||
("03","53","folklore mythology legend","Leach/Fried"),
|
||||
("03","54","herder dictionary symbols","Chiron 1993"),
|
||||
("03","55","teutonic myth legend","MacKenzie 2008"),
|
||||
("03","57","primal myths","Sproul 1979"),
|
||||
("03","58","ariadne clue","Stevens 1998"),
|
||||
("03","59","motif index folklore","Thompson"),
|
||||
("03","61","american indian mythology","Burland 1996"),
|
||||
("03","63","animal within","Federer 2002"),
|
||||
("03","64","hill fairy tale drama","Jung and Moreno 2014"),
|
||||
("03","65","gilgamesh significance","Kluger 1991"),
|
||||
("03","67","celtic heritage","Rees 1998"),
|
||||
("04","04","art of jung","Norton 2018"),
|
||||
("04","06","acton paintings","Routledge 2008"),
|
||||
("04","07","acton modern art","Routledge 2004"),
|
||||
("04","08","patterns creative imagination","Brutsche Chiron 2018"),
|
||||
("04","09","creative fingerprint","Carter/Staples 2017"),
|
||||
("04","11","dynamics of symbols","Schaverien 1992"),
|
||||
("04","12","sandplay vulnerable","Pattis Zoja 2011"),
|
||||
("04","13","soul meets matter","Pattis Zoja 2018"),
|
||||
("04","14","painting therapy","Riedel/Henzler Daimon 2022"),
|
||||
("04","15","psyche and the arts","Rowland 2008"),
|
||||
("04","16","revealing image","Schaverien 1999"),
|
||||
("04","17","art psychotherapy psychosis","Routledge 1997"),
|
||||
("04","18","healing transformation sandplay","Ammann 1991"),
|
||||
("04","19","spontaneous paintings","Geigy 1969"),
|
||||
("04","20","life paints span","Bach Daimon 1990"),
|
||||
("04","21","personality tree drawings","Bolander 1977"),
|
||||
("04","23","encyclopedia archetypal symbolism","Shambhala (v1 Moon 1997 / v2 Elder 1996)"),
|
||||
("04","26","secret world drawings","Peiry Sigo 2002"),
|
||||
("04","27","images meanings connection","Goldstein Daimon 1999"),
|
||||
("04","29","horizons sandplay","Kalff T&F 2021"),
|
||||
("04","31","tree test","Huber 1952"),
|
||||
("04","33","imagination in action","McNiff Shambhala 2015"),
|
||||
("04","34","depth psychology of art","C.C. Thomas 1999"),
|
||||
("04","35","integrating arts therapy","C.C. Thomas 2004"),
|
||||
("05","04","buhrmann","Chiron 1993"),
|
||||
("05","05","burleson","1981"),
|
||||
("05","14","thresholds of initiation","Henderson (ia RESTRICTED)"),
|
||||
("05","15","kirsch","SUNY 1997"),
|
||||
("05","16","cultural complex","Singer"),
|
||||
("05","23","lewis-williams dowson","1988"),
|
||||
("06","04","idea of the numinous","Chiron 2006"),
|
||||
("06","07","passion of perpetua","von Franz"),
|
||||
("06","08","niklaus von flue","2022 EN"),
|
||||
("06","10","jung white letters",""),
|
||||
("06","15","jung treatment christianity","Stein (ia CDL)"),
|
||||
("06","21","satan old testament","(ia CDL)"),
|
||||
("06","22","religion greeks romans","(ia CDL)"),
|
||||
]
|
||||
|
||||
def parse_rows(html):
|
||||
rows = re.findall(r"<tr[^>]*>\s*<td[^>]*>.*?</tr>", html, re.S)
|
||||
out = []
|
||||
for r in rows:
|
||||
tds = re.findall(r"<td[^>]*>(.*?)</td>", r, re.S)
|
||||
tds = [re.sub(r"<[^>]+>", "", t).replace("&", "&").strip() for t in tds]
|
||||
tds = [re.sub(r"\s+", " ", t) for t in tds]
|
||||
if len(tds) >= 6:
|
||||
md5s = re.findall(r"ads\.php\?md5=([0-9a-f]{32})", r)
|
||||
ids = re.findall(r"edition\.php\?id=(\d+)", r)
|
||||
out.append((len(tds), tds, md5s[0] if md5s else "", ids[0] if ids else ""))
|
||||
return out
|
||||
|
||||
def main():
|
||||
done = set()
|
||||
if os.path.exists(OUT):
|
||||
for ln in open(OUT):
|
||||
p = ln.split("\t")
|
||||
if len(p) > 1:
|
||||
done.add((p[0], p[1]))
|
||||
new = [c for c in CANDIDATES if (c[0], c[1]) not in done]
|
||||
print(f"{len(new)} candidates to sweep ({len(done)} already done)", flush=True)
|
||||
fh = open(OUT, "a", encoding="utf-8")
|
||||
for i, (sec, item, q, note) in enumerate(new, 1):
|
||||
url = ("https://libgen.vg/index.php?req=" + urllib.parse.quote(q) +
|
||||
"&res=100&columns%5B%5D=t&columns%5B%5D=a&columns%5B%5D=s&columns%5B%5D=y&columns%5B%5D=p&columns%5B%5D=i"
|
||||
"&objects%5B%5D=f&objects%5B%5D=e&objects%5B%5D=s&objects%5B%5D=a&objects%5B%5D=p&objects%5B%5D=w"
|
||||
"&topics%5B%5D=l&topics%5B%5D=c&topics%5B%5D=f&topics%5B%5D=a&topics%5B%5D=m&topics%5B%5D=r&topics%5B%5D=s")
|
||||
try:
|
||||
html = fetch(url, tries=2)
|
||||
rows = parse_rows(html)
|
||||
top = " || ".join(" / ".join(r[1][:6]) + (f" [md5={r[2]}]" if r[2] else "") for r in rows[:4])
|
||||
status = f"HITS={len(rows)}"
|
||||
except Exception as e:
|
||||
status, top = f"ERR {e}", ""
|
||||
fh.write(f"{sec}\t{item}\t{q}\t{status}\t{top[:600]}\n{note}\n")
|
||||
fh.flush()
|
||||
print(f"[{i}/{len(new)}] {sec}#{item} '{q}' -> {status}", flush=True)
|
||||
time.sleep(4)
|
||||
fh.close()
|
||||
print("SWEEP DONE", flush=True)
|
||||
|
||||
import urllib.parse
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
67
tools/en_sweep_0106_r2.py
Normal file
67
tools/en_sweep_0106_r2.py
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Round 2: full-row dumps for high-hit queries; grep targets."""
|
||||
import os, re, sys, time, urllib.parse
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
from lg import fetch
|
||||
|
||||
def fetch_url(url):
|
||||
return fetch(url, tries=2)
|
||||
|
||||
def parse_rows(html):
|
||||
rows = re.findall(r"<tr[^>]*>\s*<td[^>]*>.*?</tr>", html, re.S)
|
||||
out = []
|
||||
for r in rows:
|
||||
tds = re.findall(r"<td[^>]*>(.*?)</td>", r, re.S)
|
||||
tds = [re.sub(r"<[^>]+>", "", t).replace("&", "&").strip() for t in tds]
|
||||
tds = [re.sub(r"\s+", " ", t) for t in tds]
|
||||
if len(tds) >= 6:
|
||||
md5s = re.findall(r"ads\.php\?md5=([0-9a-f]{32})", r)
|
||||
ids = re.findall(r"edition\.php\?id=(\d+)", r)
|
||||
out.append(" / ".join(tds[:9]) + (f" [md5={md5s[0]}]" if md5s else "") + (f" [ed={ids[0]}]" if ids else ""))
|
||||
return out
|
||||
|
||||
# (sec, item, query, grep_pattern, label)
|
||||
JOBS = [
|
||||
("01","42","Freud unconscious", r"the unconscious|unconscious.*191[57]|191[57].*unconscious", "SE14"),
|
||||
("01","52","Stevens on jung", r"jung", "On Jung Princeton"),
|
||||
("02","20","way of dream", r"way of the dream|windrose|von franz|boa", "Windrose 1988"),
|
||||
("03","47","Post heart hunter", r"heart of the hunter|van der post|van der post", "1961"),
|
||||
("03","50","historical atlas mythology", r"atlas|campbell", "Campbell 2 vols"),
|
||||
("03","53","folklore mythology legend", r"leach|fried|funk", "Leach/Fried"),
|
||||
("03","58","ariadne clue", r"stevens|ariadne", "Princeton 1998"),
|
||||
("03","59","motif index folklore", r"thompson|motif.index", "6 vols"),
|
||||
("03","61","american indian mythology", r"burland|north american", "Barnes Noble 1996"),
|
||||
("04","04","art of jung", r"art of (c\.? ?g\.? )?jung|hoerni|norton", "Norton 2018"),
|
||||
("04","21","personality tree drawings", r"bolander|tree drawing", "Basic 1977"),
|
||||
("04","34","depth psychology of art", r"mcniff|thomas|art", "CCT 1999"),
|
||||
("04","35","integrating arts therapy", r"mcniff|integrating", "CCT 2004"),
|
||||
("05","04","buhrmann", r"buhrmann|bürrmann|chiron", "Chiron 1993"),
|
||||
("05","05","burleson", r"burleson", "1981"),
|
||||
("05","14","thresholds of initiation", r"henderson|thresholds", "Henderson"),
|
||||
("05","15","kirsch", r"kirsch.*jung|jung.*kirsch|suny", "SUNY 1997"),
|
||||
("05","16","cultural complex", r"singer|cultural complex", "Singer"),
|
||||
("06","04","idea of the numinous", r"numinous|otto", "Chiron 2006"),
|
||||
("06","07","passion of perpetua", r"fran|perpetua", "von Franz 1980"),
|
||||
("06","10","jung white letters", r"lammers|white letters|jung.white", "Routledge 2005"),
|
||||
("06","21","satan old testament", r"satan|kluger|rivka", "1967"),
|
||||
("06","22","religion greeks romans", r"cumont|greeks and romans", "Cumont"),
|
||||
]
|
||||
|
||||
out = open("data/en-sweep-0106-r2.txt", "w", encoding="utf-8")
|
||||
for sec, item, q, pat, label in JOBS:
|
||||
url = ("https://libgen.vg/index.php?req=" + urllib.parse.quote(q) +
|
||||
"&res=100&columns%5B%5D=t&columns%5B%5D=a&columns%5B%5D=s&columns%5B%5D=y&columns%5B%5D=p&columns%5B%5D=i"
|
||||
"&objects%5B%5D=f&objects%5B%5D=e&objects%5B%5D=s&objects%5B%5D=a&objects%5B%5D=p&objects%5B%5D=w"
|
||||
"&topics%5B%5D=l&topics%5B%5D=c&topics%5B%5D=f&topics%5B%5D=a&topics%5B%5D=m&topics%5B%5D=r&topics%5B%5D=s")
|
||||
try:
|
||||
rows = parse_rows(fetch_url(url))
|
||||
except Exception as e:
|
||||
rows = [f"ERR {e}"]
|
||||
out.write(f"\n{'='*20} {sec}#{item} '{q}' ({label}) — {len(rows)} rows\n")
|
||||
for r in rows:
|
||||
out.write(r + "\n")
|
||||
out.flush()
|
||||
print(f"{sec}#{item}: {len(rows)} rows", flush=True)
|
||||
time.sleep(4)
|
||||
out.close()
|
||||
print("R2 DONE")
|
||||
35
tools/lgdl-en0106-queue.sh
Normal file
35
tools/lgdl-en0106-queue.sh
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
# tools/lgdl-en0106-queue.sh — EN rescue queue sec01-06 (2026-09-28, rebuilt after /tmp loss)
|
||||
# f_ids from libgen sweep (data/en-sweep-0106.tsv); skip-if-exists makes reruns safe.
|
||||
cd /home/dima/jung
|
||||
LOG=/tmp/enq-0106.log
|
||||
mkdir -p "$(dirname "$LOG")"
|
||||
|
||||
dl() {
|
||||
local fid="$1" out="$2" name="$3"
|
||||
if [ -f "$out/$name" ]; then echo "skip $name"; return 0; fi
|
||||
timeout 1500 python3 -u -c "
|
||||
import sys; sys.path.insert(0, 'tools')
|
||||
import lgdl
|
||||
ok = lgdl.download('$fid', '$out', '$name', tries=3)
|
||||
print('DONE $name' if ok else 'FAIL $name')
|
||||
" >> "$LOG" 2>&1
|
||||
}
|
||||
dl 93987210 downloads/02-dreams 16-little-course-in-dreams-en-1986.pdf
|
||||
dl 101436487 downloads/03-myths-fairy-tales 15-witches-ogres-en-1992.pdf
|
||||
dl 98398717 downloads/03-myths-fairy-tales 19-hermes-and-his-children-en-2020.epub
|
||||
dl 99248327 downloads/03-myths-fairy-tales 31-european-folktale-en-1986.pdf
|
||||
dl 112606333 downloads/03-myths-fairy-tales 32-fairytale-art-form-en-1987.pdf
|
||||
dl 114366817 downloads/03-myths-fairy-tales 33-once-upon-a-time-en-1976.pdf
|
||||
dl 92469021 downloads/03-myths-fairy-tales 36-irresistible-fairy-tale-en-2012.epub
|
||||
dl 93681327 downloads/03-myths-fairy-tales 47-heart-of-the-hunter-en-2010.mobi
|
||||
dl 93442007 downloads/03-myths-fairy-tales 50-historical-atlas-vol1-animal-powers-en-1983.pdf
|
||||
dl 93442016 downloads/03-myths-fairy-tales 50-historical-atlas-vol2-seeded-earth-p1-en-1988.pdf
|
||||
dl 93442416 downloads/03-myths-fairy-tales 50-historical-atlas-vol2-seeded-earth-p2-en-1989.pdf
|
||||
dl 93442421 downloads/03-myths-fairy-tales 50-historical-atlas-vol2-seeded-earth-p3-en-1989.pdf
|
||||
dl 92613245 downloads/03-myths-fairy-tales 55-teutonic-myth-legend-en-2020.epub
|
||||
dl 5186594 downloads/03-myths-fairy-tales 57-primal-myths-en-2013.epub
|
||||
dl 93468973 downloads/04-pictures 04-art-of-c-g-jung-en-2018.epub
|
||||
dl 92458404 downloads/04-pictures 17-art-psychotherapy-psychosis-en-1997.pdf
|
||||
dl 105475797 downloads/01-fundamentals 42-freud-unconscious-en-penguin-2005.pdf
|
||||
echo "QUEUE DONE" > /tmp/enq-0106.DONE
|
||||
Loading…
Add table
Add a link
Reference in a new issue