DiaColloDB-WWW

 view release on metacpan or  search on metacpan

share/htdocs/help.ttk  view on Meta::CPAN

  wpodurl = "//metacpan.org/pod/distribution/DiaColloDB-WWW"
  qdocurl = "//kaskade.dwds.de/~moocow/software/ddc/querydoc.html"
  %]
[%#=====================================================================
  # config: examples & links
  # %]
[% SET
   puburl = "//kaskade.dwds.de/~jurish/pubs/";

   dcurl.dta = "//kaskade.dwds.de/dstar/dta/diacollo/";
   dcurl.dta_dwds = "//kaskade.dwds.de/dstar/dta+dwds/diacollo/";
   dcurl.kern = "//kaskade.dwds.de/dstar/kern/diacollo/";
   dcurl.spiegel_print = "//kaskade.dwds.de/dstar/spiegel_print/diacollo/";
   dcurl.zeit = "//kaskade.dwds.de/dstar/zeit/diacollo/";
   dcurl.current = dc_root;

   topurl.dta = "//www.deutschestextarchiv.de";
   topurl.kern = "//zwei.dwds.de/r?corpus=kern";
   topurl.spiegel_print = dcurl.spiegel_print _ ".."; #"http://zwei.dwds.de/r?corpus=spiegel_print";
   topurl.dta_dwds = dcurl.dta_dwds _ ".."; #"http://zwei.dwds.de/r?corpus=dta%2Bdwds";
   
   collocates = "<a href=\"#prf-collocations\">collocates</a>";
   unigrams = "<a href=\"#prf-unigrams\">unigrams</a>";
%]
[% PERL %]
  my $cdb = $stash->get('cdb');
  my $dcurl = $stash->get('dcurl');
  *escapeHTML = \&CGI::escapeHTML;
  $stash->set('exlink' => sub {
		my ($corpus,$params) = @_;
		my (@pkeys,$pform);
		if (UNIVERSAL::isa($params,'HASH')) {
		  $pform = $params;
		  @pkeys = sort keys %$pform;
		} else {
		  $pform = { @$params };
		  @pkeys = map {$params->[$_*2]} (0..($#$params/2));
		}
		my $curl = $dcurl->{$corpus} // "../../$corpus/diacollo/";
		my $url = escapeHTML($cdb->quri($curl, $pform));
		my $str = '{'.join(" ; ",
				   map {
				     (qq(<span class="expar">).escapeHTML($_)."</span>"
				      .':'
				      .qq(<span class="exval">).escapeHTML($pform->{$_})."</span>"
				     )
				   } @pkeys).'}';
		return "<a class=\"exlink\" href=\"$url\">$str</a>";
	      });
  $stash->set('corpuslink' => sub {
		my ($corpus,$txt,$params) = @_;
		my $pform = $params ? (UNIVERSAL::isa($params,'HASH') ? $params : { @$params }) : {};
		my $curl  = $dcurl->{$corpus} // "//kaskade.dwds.de/dstar/$corpus/diacollo/";
		my $url   = escapeHTML($cdb->quri($curl, $pform));
		return "<a class=\"corpuslink\" href=\"$url\">".($txt//$corpus)."</a>";
	      });
[% END %]
[% END FILTER null %]
[% cdb.cgi('header','-type'=>'text/html') %]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>[% html_title %]</title>
  [% PROCESS "dc-html-head.ttk" favicon_url=diacollo_icon %]
</head>
<body>
    <div class="outer">
      [% PROCESS diacolloBanner %]
      <div class="headers">
	[% PROCESS diacolloHeaderLogo %]
	<h1>[% html_title %]</h1>
	<div class="linkbar">[% PROCESS "dc-links.ttk" %]</div>
      </div>

      <!-- div.content -->
      <div class="content">

	<!--=================================================-->
	<div id="toc" class="section headers">
	  <a name="toc"><h2>Contents</h2></a>
  	  <ul>
[% PERL %]
  my $toc = [
	     {label=>"Introduction",href=>"#intro",
	      sub=>[
		    {label=>"Requests &amp; Parameters",href=>"#intro_reqs"},
		    {label=>"Profiles &amp; Diffs",href=>"#intro_profiles"},
		    {label=>"Indices &amp; Attributes",href=>"#intro_attrs"},
		    {label=>"Scores &amp; Formats",href=>"#intro_scores"},
   		    {label=>"Souce Code &amp; Services",href=>"#intro_sources"},
		    {label=>"Other Useful Links",href=>"#intro_links"},
	      ]},
	     {label=>"Parameters",href=>"#params",
	      sub=>[
		    {label=>"query",href=>"#query"},
		    {label=>"date",href=>"#date"},
		    {label=>"slice",href=>"#slice"},
		    {label=>"bquery",href=>"#bquery"},
		    {label=>"bdate",href=>"#bdate"},
		    {label=>"bslice",href=>"#bslice"},
		    {label=>"groupby",href=>"#groupby"},
		    {label=>"score",href=>"#score"},
		    {label=>"kbest",href=>"#kbest"},
		    {label=>"cutoff",href=>"#cutoff"},
		    {label=>"diff",href=>"#diff"},
		    {label=>"global",href=>"#global"},
		    {label=>"1pass",href=>"#1pass"},
		    {label=>"debug",href=>"#debug"},
		    {label=>"profile",href=>"#profile"},
		    {label=>"format",href=>"#format"},
	      ]},
	     {label=>"Query Syntax",href=>"#queries",
	     sub=>[
		   {label=>"Native Query Syntax",href=>"#qnative"},
		   {label=>"DDC Query Syntax",href=>"#qddc"},
		   {label=>"Grouping",href=>"#qgroupby"},		   
		  ]},
	     {label=>"Score Functions",href=>"#scores",
	      sub=>[
		    {label=>"f",href=>"#score-f"},



( run in 0.536 second using v1.01-cache-2.11-cpan-9581c071862 )