Forked from CliffordAnderson/full-text-metadata.xqy
Last active
October 28, 2016 21:14
-
-
Save AdamSteffanick/c134c6631d33a52dbe9d9efa8fe6274a to your computer and use it in GitHub Desktop.
Full Text IA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for $doc in fn:collection("books")//book[@full-text eq "true"] | |
where fn:not($doc//subjects/subject = "Protected DAISY") (: existential quantification! :) | |
for $key in $doc/key/text() | |
let $data := fetch:text("https://openlibrary.org" || $key || ".json") => json:parse() | |
let $ocaid := $data//ocaid/text() | |
for $book in $ocaid | |
return fetch:text("https://archive.org/5/items/" || $book || "/" || $book || "_djvu.txt") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment