Changeset 3168
- Timestamp:
- 2002-06-23T22:58:30+12:00 (22 years ago)
- Location:
- trunk/protemix
- Files:
-
- 7 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/protemix/etc/collect.cfg
r3162 r3168 4 4 5 5 buildtype mgpp 6 #indexes text,Title,Class1,Class2,Class37 6 indexes text,metadata 8 #levels Section 9 #defaultindex text,Title,Class1,Class2,Class3 7 levels Section 10 8 defaultindex text,metadata 11 9 10 collectionmeta .text,metadata "all" 12 11 13 12 plugin GAPlug … … 18 17 classify AZList -metadata Title 19 18 19 format CL1VList \ 20 '<p>[Title]<br><small>\[ [link]HTML</a> \]\[ <a href="_httpcollection_/index/assoc/[archivedir]/[pdf]">PDF</a> \]</small></p>' 21 20 22 format SearchVList \ 21 "<td>[link][icon][/link]</td>{If}{[srclink],<td>[srclink]_iconpdf_</a></td>}<td>{If}{[parent(All': '):Title],[parent(All': '):Title]:}[link][Title][/link]</td>" 22 23 format DocumentText \ 24 "<center><table border=0 cellspacing=0 cellpadding=0 width=_pagewidth_><tr><td>[srclink]_iconpdf_ View PDF version</a></td></tr></table></center>[Text]" 23 '<p>[parent:Title] <small><i>(page [Title])</i><br>\[ [link]HTML</a> \]\[ <a href="_httpcollection_/index/assoc/[parent:archivedir]/[pdf]">Single Page PDF</a> \]\[ <a href="_httpcollection_/index/assoc/[parent:archivedir]/[parent:pdf]">Article PDF</a> \]</small></p>' 25 24 26 25 collectionmeta collectionname "Protemix FDA Submission" 27 26 collectionmeta collectionextra "" 28 27 29 30 28 cgiarg shortname=a argdefault=q -
trunk/protemix/macros/base.dm
r3162 r3168 32 32 _collectionname_ {} 33 33 34 _imagecollection_ {_If_("_iconcollection_" ne "", 35 <a href="_httppageabout_"><img src="_iconcollection_" border=0></a>, 36 _imagecollectionv_} 37 _imagecollectionv_ {_If_(_collectionname_,<br><br><h2><a href="_httppageabout_">_collectionname_</a></h2>)} 34 _imagecollection_ {<img src="_httpcollection_/images/protemixlogo.gif">} 38 35 39 36 ####################################################################### … … 140 137 # the page. 141 138 142 _javalinks_ { _imagehome_}139 _javalinks_ {} 143 140 144 141 -
trunk/protemix/macros/english.dm
r3162 r3168 131 131 _texticonexpandtext_ {Display all text} 132 132 _texticoncontracttext_ {Display text only for currently selected section} 133 _texticonpagepdf_ {Display PDF file of this page} 134 _texticonartpdf_ {Display PDF file of entire article} 135 133 136 134 137 _textgoto_ {go to page} … … 170 173 _httpiconenhlof_ {_httpimg_/enhlof.gif} 171 174 _httpiconenhlon_ {_httpimg_/enhlon.gif} 175 176 ## "SINGLE PAGE PDF" ## document_button ## sppdf ## 177 _httpiconsppdfof_ {_httpcollection_/images/sppdfof.gif} 178 _httpiconsppdfon_ {_httpcollection_/images/sppdfon.gif} 179 180 ## "ARTICLE PDF" ## document_button ## apdf ## 181 _httpiconapdfof_ {_httpcollection_/images/apdfof.gif} 182 _httpiconapdfon_ {_httpcollection_/images/apdfon.gif} 172 183 173 184 ###################################################################### -
trunk/protemix/macros/query.dm
r3162 r3168 28 28 29 29 _iconthispage_ {<img src="_httpiconhsearch_" alt="_texticonthispage_" width="_widthhsearch_" height="_heighthsearch_">} 30 _iconthispage_ [v=1] {<h2>_texticonthispage_</h2>}31 30 32 31 _iconqueryresultsbar_ {<img src="_httpiconqryresb_" width="_widthqryresb_" height="_heightqryresb_" alt="_texticonqueryresultsbar_">} 33 _iconqueryresultsbar_[v=1] {_texticonqueryresultsbar_}34 32 35 33 # _iconnext_ and _iconprev_ are overridden in this package as we 36 34 # don't want alt text here 37 35 _iconnext_{<img src="_httpiconmore_" width=_widthmore_ height=_heightmore_ border=0 align=top>} 38 _iconnext_ [v=1] {}39 36 _iconprev_{<img src="_httpiconless_" width=_widthless_ height=_heightless_ border=0 align=top>} 40 _iconprev_ [v=1] {}41 37 42 38 ####################################################################### … … 75 71 form.c3.options.length = 0; 76 72 73 var isselected = 0; 77 74 for (i = 0; i < options[c2].length; i++) \{ 78 75 form.c3.options[i] = new Option(options[c2][i], options[c2][i]); 76 if (options[c2][i] == "_cgiargc3_") \{ 77 form.c3.selectedIndex = i; 78 isselected = 1; 79 \} 79 80 \} 80 81 form.c3.selectedIndex = 0; 82 81 if (!isselected) form.c3.selectedIndex = 0; 83 82 \} 84 83 } … … 88 87 } 89 88 90 _pagetitle_ { _If_(_cgiargq_,_textquerytitle_,_textnoquerytitle_)}89 _pagetitle_ {} 91 90 92 91 _content_ { … … 97 96 _queryform_ 98 97 </center> 99 _If_(_cgiargq_,<center>_iconqueryresultsbar_</center><br> 100 <small> 101 _freqmsg_ 102 _textpostprocess_</small><br> 98 <center>_iconblankbar_</center><br> 103 99 _resultline_ 104 ,<center>_iconblankbar_</center>)<br>105 100 } 106 101 … … 109 104 <input type=hidden name="a" value="q"> 110 105 <input type=hidden name="r" value="1"> 106 <input type=hidden name="g" value="Section"> 111 107 <input type=hidden name="e" value="_decodedcompressedoptions_"> 112 108 <p> … … 116 112 <td align="center"> 117 113 <select name="c1"> 118 <option value="" >Any119 <option value="Animal" >Animal120 <option value="Human" >Human121 <option value="Other" >Other114 <option value=""_If_(_cgiargc1_,, selected)>Any 115 <option value="Animal"_If_("_cgiargc1_" eq "Animal", selected)>Animal 116 <option value="Human"_If_("_cgiargc1_" eq "Human", selected)>Human 117 <option value="Other"_If_("_cgiargc1_" eq "Other", selected)>Other 122 118 </select> 123 119 </td> … … 129 125 <td align="center"> 130 126 <select name="c2" onChange='initialize()'> 131 <option value="" >Any132 <option value="Pharmacokinetics" >Pharmacokinetics133 <option value="Pharmacodynamics" >Pharmacodynamics134 <option value="Safety/Side Effects/Toxicity" >Safety/Side Effects/Toxicity135 <option value="Other" >Other136 <option value="Efficacy" >Efficacy137 <option value="Contraindications" >Contraindications138 <option value="Precautions" >Precautions127 <option value=""_If_(_cgiargc2_,, selected)>Any 128 <option value="Pharmacokinetics"_If_("_cgiargc2_" eq "Pharmacokinetics", selected)>Pharmacokinetics 129 <option value="Pharmacodynamics"_If_("_cgiargc2_" eq "Pharmacodynamics", selected)>Pharmacodynamics 130 <option value="Safety/Side Effects/Toxicity"_If_("_cgiargc2_" eq "Safety/Side Effects/Toxicity", selected)>Safety/Side Effects/Toxicity 131 <option value="Other"_If_("_cgiargc2_" eq "Other", selected)>Other 132 <option value="Efficacy"_If_("_cgiargc2_" eq "Efficacy", selected)>Efficacy 133 <option value="Contraindications"_If_("_cgiargc2_" eq "Contraindications", selected)>Contraindications 134 <option value="Precautions"_If_("_cgiargc2_" eq "Precautions", selected)>Precautions 139 135 </select> 140 136 </td> … … 153 149 154 150 <tr valign="top"><td colspan="5"> 151 <b>AND</b><br> 155 152 <nobr> 156 153 <input type="text" name="q" value="_cgiargq_" size="40"> … … 162 159 </form> 163 160 } 161 162 # we want to put the links to previous/next pages of results 163 # in the footer 164 _pagefooterextra_ { 165 <center> 166 <table cellspacing=0 cellpadding=0 width=_pagewidth_> 167 <tr> 168 <td align=left>_If_(_prevfirst_,<a href="_httpquery_&r=_prevfirst_">_iconprev__textmatches__prevfirst_ - _prevlast_</a>)</td> 169 <td align=right>_If_(_nextfirst_,<a href="_httpquery_&r=_nextfirst_">_textmatches__nextfirst_ - _nextlast__iconnext_</a>)</td> 170 </tr></table> 171 </center> 172 } -
trunk/protemix/perllib/plugins/ProtemixPlug.pm
r3162 r3168 75 75 } 76 76 77 # read in directory and process individual files78 77 my $dir = File::Basename::dirname($filename); 79 78 79 # associate article level pdf file 80 my ($pdffile) = $dir =~ /([^\/\\]+)$/; 81 $pdffile = &util::filename_cat($dir, $pdffile); 82 $pdffile .= "-all.pdf"; 83 die "$pdffile does not exist" unless -e $pdffile; 84 $doc_obj->associate_file($pdffile, "article.pdf", undef, $topsection); 85 $doc_obj->add_utf8_metadata ($cursection, "pdf", "article.pdf"); 86 87 # read in directory and process individual files 80 88 opendir(DIR, $dir) || die; 81 89 my @files = readdir DIR; … … 103 111 $self->process_section (\$text, '', $thisfile, $doc_obj, $cursection); 104 112 105 # associate PDF file with doc object113 # associate PDF page level pdf file 106 114 my $pdffile = $thisfile; 107 115 $pdffile =~ s/\.html?$/\.pdf/; 108 116 die "no PDF file for $thisfile" unless -e $pdffile; 109 $doc_obj->associate_file($pdffile, "doc$count.pdf", undef, $cursection); 110 my $doclink = "<a href=\"_httpcollection_/index/assoc/[parent(Top):archivedir]/doc$count.pdf\">"; 111 # $doc_obj->add_utf8_metadata ($cursection, "srclink", $doclink); 117 $doc_obj->associate_file($pdffile, "page$count.pdf", undef, $cursection); 118 $doc_obj->add_utf8_metadata ($cursection, "pdf", "page$count.pdf"); 112 119 $doc_obj->add_utf8_metadata ($cursection, "Title", $count); 113 120 114 121 # add any section level metadata we have for this page (set from within the meta.xml file) 115 #if (defined ($self->{'section_metadata'}->{$filesuf})) {116 #foreach my $key (keys %{$self->{'section_metadata'}->{$filesuf}}) {117 #$doc_obj->add_utf8_metadata ($cursection, $key, $self->{'section_metadata'}->{$filesuf}->{$key});118 #}119 #}122 if (defined ($self->{'section_metadata'}->{$filesuf})) { 123 foreach my $key (keys %{$self->{'section_metadata'}->{$filesuf}}) { 124 $doc_obj->add_utf8_metadata ($cursection, $key, $self->{'section_metadata'}->{$filesuf}->{$key}); 125 } 126 } 120 127 121 128 $count ++; -
trunk/protemix/rename.pl
r3162 r3168 97 97 $noncss =~ s/(<table.*?)rules=\"all\"\s+/$1/sig; 98 98 99 # remove empty <div> tags 100 while ($noncss =~ s/(<div[^>]*>\s*<\/div>)//sig) {} 101 102 # remove empty table rows 103 $noncss =~ s/(<tr[^>]*>(\s*<td[^>]*>\s*<\/td>)*\s*<\/tr>)//sig; 104 $noncss =~ s/<table[^>]*>\s*<\/table>//sig; 105 99 106 open (FILE, ">$filename") || die; 100 107 print FILE $header . $noncss . $footer; … … 108 115 $filename =~ s/\s+//g; 109 116 $filename =~ s/^protemix\(\d+\)-?//; 117 $filename =~ s/^OCR\d+-0//; 110 118 111 119 return $filename; -
trunk/protemix/src/recpt/Makefile.in
r3167 r3168 65 65 $(COMPILE) $< 66 66 67 HEADERS = ptmxqueryaction.h 67 HEADERS = ptmxqueryaction.h ptmxdocaction.h 68 68 69 SOURCES = ptmxmain.cpp ptmxqueryaction.cpp browsetools.cpp69 SOURCES = ptmxmain.cpp ptmxqueryaction.cpp ptmxdocaction.cpp browsetools.cpp 70 70 71 OBJECTS = ptmxmain.o ptmxqueryaction.o browsetools.o71 OBJECTS = ptmxmain.o ptmxqueryaction.o ptmxdocaction.o browsetools.o 72 72 73 73 EXEC = ptmx -
trunk/protemix/src/recpt/browsetools.cpp
r3167 r3168 23 23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 24 24 * 25 * $Id$26 25 * 27 26 *********************************************************************/ … … 38 37 ostream &/*logout*/) { 39 38 40 if (args["u"] != "1") { 41 42 FilterResponse_t response; 43 text_tarray metadata; 44 text_tarray buttons; 45 46 text_tarray::const_iterator here = ibuttons.begin(); 47 text_tarray::const_iterator end = ibuttons.end(); 48 49 while (here != end) { 50 51 if (*here == "Detach") 52 buttons.push_back ("_document:imagedetach_"); 53 else if (*here == "Highlight") { 54 if (args["hl"] == "1") 55 buttons.push_back ("_document:imagenohighlight_"); 56 else 57 buttons.push_back ("_document:imagehighlight_"); 58 } else if (*here == "Expand Contents") { 59 if (args["gc"] == "1") 60 buttons.push_back ("_document:imagecontracttoc_"); 61 else 62 buttons.push_back ("_document:imageexpandtoc_"); 63 } else if (*here == "Expand Text") { 64 if (args.getintarg("gt")) 65 buttons.push_back ("_document:imagecontracttext_"); 66 else 67 buttons.push_back ("_document:imageexpandtext_"); 68 } 69 here ++; 70 } 71 72 here = buttons.begin(); 73 end = buttons.end(); 74 int count = 0; 75 while (here != end) { 76 if ((count != 0) && ((count % 2) == 0)) textout << "<br>\n"; 77 textout << outconvert << disp << *here; 78 count ++; 79 here ++; 80 } 81 } 82 } 83 39 textout << outconvert << disp 40 << "_document:imagepagepdf_" 41 << "_document:imagearticlepdf_" 42 << "_document:imagedetach_"; 43 if (args["hl"] == "1") { 44 textout << outconvert << disp << "_document:imagenohighlight_"; 45 } else { 46 textout << outconvert << disp << "_document:imagehighlight_"; 47 } 48 } 84 49 85 50 // at the moment this just writes out the html to display … … 765 730 if ((!fulltoc) && (!args["d"].empty())) { 766 731 textout << "<center>\n"; 767 textout << outconvert << disp << "<p><table width=_pagewidth_ cellpadding=0 cellspacing=0><tr>\n"; 768 textout << "<td valign=top align=left"; 769 if (formatinfo.DocumentContents) textout << " width=200>\n"; 770 else textout << " width=100%>\n"; 771 if (formatinfo.DocumentImages) 772 output_cover_image (args, collectproto, disp, outconvert, textout, logout); 773 else if (formatinfo.DocumentTitles) 774 output_titles (args, collectproto, formatinfo, disp, outconvert, textout, logout); 775 if (args["u"] != "1") { 776 output_controls (args, formatinfo.DocumentButtons, collectproto, disp, 777 outconvert, textout, logout); 778 } 779 textout << "</td><td valign=top>\n"; 732 textout << outconvert << disp 733 << "<p><table width=\"_pagewidth_\" cellpadding=\"0\" cellspacing=\"0\">\n" 734 << "<tr valign=\"top\">\n" 735 << "<td>\n"; 736 output_titles (args, collectproto, formatinfo, disp, outconvert, textout, logout); 737 textout << "</td></tr>\n" 738 << "<tr><td>\n"; 780 739 havecontrols = true; 781 740 } … … 800 759 } 801 760 802 if (havecontrols) textout << "</td></tr></table></center>\n"; 803 804 //if there is a format specified in the config file then 805 //try to display the related documents (may not be displayed 806 //if preference file does not indicate a wish to display 807 //related documents. 808 if (!formatinfo.RelatedDocuments.empty()) 809 output_related_docs(args, collectproto, formatinfo, disp, outconvert, textout, logout); 810 811 } 812 761 if (havecontrols) { 762 textout << "</td></tr>\n" 763 << "<tr><td>\n"; 764 output_controls (args, formatinfo.DocumentButtons, collectproto, disp, 765 outconvert, textout, logout); 766 textout << "</td></tr></table></center>\n"; 767 } 768 } 769 -
trunk/protemix/src/recpt/ptmxmain.cpp
r3167 r3168 43 43 #include "pageaction.h" 44 44 #include "ptmxqueryaction.h" 45 #include " documentaction.h"45 #include "ptmxdocaction.h" 46 46 #include "extlinkaction.h" 47 47 #include "phindaction.h" … … 84 84 recpt.add_action (&aqueryaction); 85 85 86 documentaction adocumentaction;86 ptmxdocaction adocumentaction; 87 87 adocumentaction.set_receptionist (&recpt); 88 88 recpt.add_action (&adocumentaction); -
trunk/protemix/src/recpt/ptmxqueryaction.h
r3162 r3168 26 26 27 27 28 #ifndef PTMXQUERY DOCACTION_H28 #ifndef PTMXQUERYACTION_H 29 29 #define PTMXQUERYACTION_H 30 30
Note:
See TracChangeset
for help on using the changeset viewer.