diff --git a/BibliographyLoader.php b/BibliographyLoader.php index 54b28de..38c2a74 100644 --- a/BibliographyLoader.php +++ b/BibliographyLoader.php @@ -25,7 +25,7 @@ class BibliographyLoader { static public function getSources(&$ignored = array()) { - $pageids = WikiLoader::getCategoryMembers('Kategorie:Skm/Quelle'); + $pageids = WikiLoader::getCategoryMembers('Kategorie:Gc/Quelle'); $entries = WikiLoader::getEntries($pageids, true, true); $sources = array(); diff --git a/FragmentLoader.php b/FragmentLoader.php index 7ad7f73..76f4bdd 100644 --- a/FragmentLoader.php +++ b/FragmentLoader.php @@ -50,13 +50,13 @@ class FragmentLoader { static public function getFragments(&$ignored = array()) { - $entries = WikiLoader::getEntriesWithPrefix('Skm/Fragment', true, true); + $entries = WikiLoader::getEntriesWithPrefix('Gc/Fragment', true, true); return self::processFrags($entries, $ignored); } static public function getFragmentsKM2001(&$ignored = array()) { - $entries = WikiLoader::getEntriesWithPrefix('Skm/Koch-Mehrin-2001/', true, true); + $entries = WikiLoader::getEntriesWithPrefix('Gc/Chatzimarkakis-2000/', true, true); $fragmentTitles = array(); foreach($entries as $e) { if(preg_match('/^Skm/Koch-Mehrin-2001\/(\d{3})$/', $e['title'], $match) && $match[1] >= 1) { diff --git a/WikiLoader.php b/WikiLoader.php index e1cca9d..cb72761 100644 --- a/WikiLoader.php +++ b/WikiLoader.php @@ -9,6 +9,7 @@ class WikiLoader { static private function queryPrefixList($prefix, $ignoreRedirects = false) { + // &gapnamespace=2 $url = self::API.'?action=query&prop=&format=php&generator=allpages&gaplimit=500&gapprefix='.urlencode($prefix); if ($ignoreRedirects) $url .= '&gapfilterredir=nonredirects'; diff --git a/buildcache.php b/buildcache.php index 32c91f4..7ef1c3f 100644 --- a/buildcache.php +++ b/buildcache.php @@ -54,7 +54,8 @@ $cache['fragmenttypes'] = FragmentLoader::getFragmentTypes($ignoredFragmentTypes print "fertig!\n"; # Quellen laden -print "Lade Quellen... "; flush(); + +#print "Lade Quellen... "; flush(); $ignoredSources = array(); $cache['sources'] = BibliographyLoader::getSources($ignoredSources); print "fertig!\n"; diff --git a/skm-overlay.php b/skm-overlay.php index 5292668..92b8540 100644 --- a/skm-overlay.php +++ b/skm-overlay.php @@ -1269,32 +1269,35 @@ function filterTextWords($textwords, $only_footnotes) { } function kochMehrinMustFilter($textpage) { - return $textpage->label != 58 && $textpage->label != 59 - && $textpage->label != 69; + return False; +# return $textpage->label != 58 && $textpage->label != 59 +# && $textpage->label != 69; } function kochMehrinMustScale($textpage) { - return $textpage->getPaperType() != "A5 Portrait"; + return False; +# return $textpage->getPaperType() != "A5 Portrait"; } function kochMehrinScale($textwords, $textpage) { - $result = array(); - if ($textpage->label % 2 == 0) { - $xshift = -39.5; - $yshift = -52.0; - } else { - $xshift = -31.5; - $yshift = -50.5; - } - foreach ($textwords as $textword) { - $newtextword = clone $textword; - $newtextword->xMin += $xshift; - $newtextword->yMin += $yshift; - $newtextword->xMax += $xshift; - $newtextword->yMax += $yshift; - $result[] = $newtextword; - } - return $result; +return $textwords; +# $result = array(); +# if ($textpage->label % 2 == 0) { +# $xshift = -39.5; +# $yshift = -52.0; +# } else { +# $xshift = -31.5; +# $yshift = -50.5; +# } +# foreach ($textwords as $textword) { +# $newtextword = clone $textword; +# $newtextword->xMin += $xshift; +# $newtextword->yMin += $yshift; +# $newtextword->xMax += $xshift; +# $newtextword->yMax += $yshift; +# $result[] = $newtextword; +# } +# return $result; } function longestCommonSubsequence($x, $y) { @@ -1494,11 +1497,11 @@ foreach($cache['fragmenttypes'] as $fragtype) { } # Textpositionen laden -if(!file_exists('Koch-Mehrin.xml')) { - print "Fehler: Koch-Mehrin.xml existiert nicht!\n"; +if(!file_exists('0140.xml')) { + print "Fehler: 0140.xml existiert nicht!\n"; exit(1); } -$textpages = parseTextPageFragments("Koch-Mehrin.xml"); +$textpages = parseTextPageFragments("0140.xml"); cleanupTextPageFragments($textpages); $pdfpagenums = getPDFPageNums($textpages); @@ -1537,9 +1540,9 @@ foreach ($cache['fragments'] as $f) { $expected_wikititle = sprintf("Skm/Fragment %03d %02d-%02d", $frag_realpagenum, $frag_linestart, $frag_lineend); } - if ($frag_wikititle != $expected_wikititle) { - print "Warning: $frag_wikititle: wikititle seems wrong, expected: $expected_wikititle\n"; - } +# if ($frag_wikititle != $expected_wikititle) { +# print "Warning: $frag_wikititle: wikititle seems wrong, expected: $expected_wikititle\n"; +# } $frag_plagtext = $f[3]; $frag_src_page = $f[4]; @@ -1673,7 +1676,7 @@ $per_page_textblocks[0][] = $textblock; # Write output to overlay-file.tex $file = fopen("overlay-file.tex", "w"); -fwrite($file, "\\documentclass[10pt,a5paper]{article}\n"); +fwrite($file, "\\documentclass[10pt,a4paper]{article}\n"); fwrite($file, "\\usepackage[ngerman]{babel}\n"); #fwrite($file, "\\usepackage[absolute,overlay,showboxes]{textpos}\n"); fwrite($file, "\\usepackage[absolute,overlay]{textpos}\n");