User Tools

Site Tools


project:bioosm:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
project:bioosm:start [2018/07/12 09:51] – Ruzne ikony i pro celkovou mapu sachyproject:bioosm:start [2018/07/15 18:25] sachy
Line 6: Line 6:
 founder=[[user:sachy:start]]| founder=[[user:sachy:start]]|
 interested=[[user:sumie-dh]]| interested=[[user:sumie-dh]]|
-sw=CC|+sw=CC-BY-SA|
 hw=N/A| hw=N/A|
 status=active}} status=active}}
Line 127: Line 127:
  case "$1" in  case "$1" in
  "Animalia")  "Animalia")
- echo $ICON_animalia;;+ echo "$ICON_animalia";;
  "Bacteria")  "Bacteria")
- echo $ICON_bacteria;;+ echo "$ICON_bacteria";;
  "Fungi")  "Fungi")
- echo $ICON_fungi;;+ echo "$ICON_fungi";;
  "Chromista")  "Chromista")
- echo $ICON_chromista;;+ echo "$ICON_chromista";;
  "Plantae")  "Plantae")
- echo $ICON_plantae;;+ echo "$ICON_plantae";;
  "Protista")  "Protista")
- echo $ICON_protista;;+ echo "$ICON_protista";;
  *)  *)
- echo $ICON_biohazard;;+ echo "$ICON_biohazard";;
  esac  esac
 } }
Line 166: Line 166:
  
 echo "<body>" echo "<body>"
 + echo "<div style='position:absolute;top:0;right:0;margin:1em'><b><a href='./plainlog.htm'>Plaintext log</a></b></div>"
  echo "<h1 id='title'>BioOSM - arma biologica in tuis vicinia</h1>"  echo "<h1 id='title'>BioOSM - arma biologica in tuis vicinia</h1>"
  
Line 221: Line 222:
 ox="" # Old X ox="" # Old X
 oy="" # Old Y oy="" # Old Y
 +datelog="" # Entries sorted by date for plaintext log
 +
  
 while IFS='' read -r radek || [[ -n "$radek" ]]; do while IFS='' read -r radek || [[ -n "$radek" ]]; do
Line 229: Line 232:
  kdex=$(echo "$kde" | grep -oPe '[0-9]{2}\.[0-9]{1,10}$')  kdex=$(echo "$kde" | grep -oPe '[0-9]{2}\.[0-9]{1,10}$')
  kdey=$(echo "$kde" | grep -oPe '^[0-9]{2}\.[0-9]{1,10}')  kdey=$(echo "$kde" | grep -oPe '^[0-9]{2}\.[0-9]{1,10}')
- kdy=$(echo "$radek" | grep -oe ' <taken-date>.*</taken-date> ' | sed -E 's/( )*<(\/)?taken-date>( )*//g')+ kdy=$(echo "$radek" | grep -oe ' <taken-date>.*</taken-date> ' | sed -E 's/( )*<(\/)?taken-date>( )*//g' | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]{4})/\3-\2-\1/g' | sed -E 's/-([0-9])-/-0\1-/g' | sed -E 's/-([0-9])$/-0\1/g')
  skop_typ=$(echo "$radek" | grep -oe ' <new-field-1>.*</new-field-1> ' | sed -E 's/( )*<(\/)?new-field-1>( )*//g')  skop_typ=$(echo "$radek" | grep -oe ' <new-field-1>.*</new-field-1> ' | sed -E 's/( )*<(\/)?new-field-1>( )*//g')
  skop=$(echo "$radek" | grep -oe ' <microscope>.*</microscope> ' | sed -E 's/( )*<(\/)?microscope>( )*//g')  skop=$(echo "$radek" | grep -oe ' <microscope>.*</microscope> ' | sed -E 's/( )*<(\/)?microscope>( )*//g')
Line 267: Line 270:
  detpg="$detpg</head><body>"  detpg="$detpg</head><body>"
  detpg="$detpg<table class='dettbl'><tr>"  detpg="$detpg<table class='dettbl'><tr>"
- detpg="$detpg<td><h1>$co</h1>"+ detpg="$detpg<td><h1>$co (<a href='https://en.wikipedia.org/wiki/$co' target='_blank'>wiki</a>)</h1>"
  if [[ "$imp" != "" ]]; then  if [[ "$imp" != "" ]]; then
- detpg="$detpg<b>Imperium:</b> $imp<br>"+ detpg="$detpg<b>Imperium:</b> <a href='https://en.wikipedia.org/wiki/$imp' target='_blank'>$imp</a><br>"
  fi  fi
  if [[ "$reg" != "" ]]; then  if [[ "$reg" != "" ]]; then
- detpg="$detpg<b>Regnum:</b> $reg<br>"+ detpg="$detpg<b>Regnum:</b> <a href='https://en.wikipedia.org/wiki/$reg' target='_blank'>$reg</a><br>"
  fi  fi
  if [[ "$phy" != "" ]]; then  if [[ "$phy" != "" ]]; then
- detpg="$detpg<b>Phylum:</b> $phy<br>"+ detpg="$detpg<b>Phylum:</b> <a href='https://en.wikipedia.org/wiki/$phy' target='_blank'>$phy</a><br>"
  fi  fi
  if [[ "$cla" != "" ]]; then  if [[ "$cla" != "" ]]; then
- detpg="$detpg<b>Classis:</b> $cla<br>"+ detpg="$detpg<b>Classis:</b> <a href='https://en.wikipedia.org/wiki/$cla' target='_blank'>$cla</a><br>"
  fi  fi
  if [[ "$ord" != "" ]]; then  if [[ "$ord" != "" ]]; then
- detpg="$detpg<b>Ordo:</b> $ord<br>"+ detpg="$detpg<b>Ordo:</b> <a href='https://en.wikipedia.org/wiki/$ord' target='_blank'>$ord</a><br>"
  fi  fi
  if [[ "$fam" != "" ]]; then  if [[ "$fam" != "" ]]; then
- detpg="$detpg<b>Familia:</b> $fam<br>"+ detpg="$detpg<b>Familia:</b> <a href='https://en.wikipedia.org/wiki/$fam' target='_blank'>$fam</a><br>"
  fi  fi
  if [[ "$gen" != "" ]]; then  if [[ "$gen" != "" ]]; then
- detpg="$detpg<b>Genus:</b> $gen<br>"+ detpg="$detpg<b>Genus:</b> <a href='https://en.wikipedia.org/wiki/$gen' target='_blank'>$gen</a><br>"
  fi  fi
  if [[ "$spe" != "" ]]; then  if [[ "$spe" != "" ]]; then
Line 331: Line 334:
  detpg="$detpg</body></html>"  detpg="$detpg</body></html>"
  echo "$detpg" > "./det/$detid.htm"  echo "$detpg" > "./det/$detid.htm"
 +
 + # Plain log of entries
 + datelog="$datelog $kdy $kde <a href='./det/$detid.htm' target='_blank'>$co</a><br>\n"
  
  # Pokracujem v hadovi  # Pokracujem v hadovi
Line 342: Line 348:
  fi  fi
  spoj="$spoj<td>$co<br>$kdy</td>"  spoj="$spoj<td>$co<br>$kdy</td>"
- spoj="$spoj<!-- $reg -->"+ spoj="$spoj<!-- $reg -->" # Metadata
  spoj="$spoj</tr>"  spoj="$spoj</tr>"
  ox="$kdex"  ox="$kdex"
Line 353: Line 359:
  # Predchozi pozice jen 1 zaznam?  # Predchozi pozice jen 1 zaznam?
  if [[ "$sam" != "" ]]; then  if [[ "$sam" != "" ]]; then
- samicon=$(geticon $(echo "$sam" | grep -oPe "<b>Regnum:</b> [a-zA-Z0-9]*" | grep -oPe "[a-zA-Z0-9]*$")) + samicon=$(geticon $(echo "$sam" | grep -oPe "<b>Regnum:</b> <[^>]*>[a-zA-Z0-9]*" | grep -oPe "[a-zA-Z0-9]*$")) 
- >&2 echo "$samicon"+ >&2 echo "$samicon"
  
  echo "var n$i = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point($ox,$oy).transform(epsg4326,projectTo),{description:'"$sam"'},{externalGraphic:'./$samicon',graphicHeight:24,graphicWidth:24,graphicXOffset:-12,graphicYOffset:-12});"  echo "var n$i = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point($ox,$oy).transform(epsg4326,projectTo),{description:'"$sam"'},{externalGraphic:'./$samicon',graphicHeight:24,graphicWidth:24,graphicXOffset:-12,graphicYOffset:-12});"
Line 369: Line 375:
  #>&2 echo "*** $spojicon"  #>&2 echo "*** $spojicon"
  else  else
- spojicon=$ICON_biohazard+ spojicon="$ICON_biohazard"
  fi  fi
  echo "var n$i = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point($ox,$oy).transform(epsg4326,projectTo),{description:'<table class=\"hadtbl\">"$spoj"</table>'},{externalGraphic:'./$spojicon',graphicHeight:24,graphicWidth:24,graphicXOffset:-12,graphicYOffset:-12});"  echo "var n$i = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point($ox,$oy).transform(epsg4326,projectTo),{description:'<table class=\"hadtbl\">"$spoj"</table>'},{externalGraphic:'./$spojicon',graphicHeight:24,graphicWidth:24,graphicXOffset:-12,graphicYOffset:-12});"
Line 389: Line 395:
  
  sam="<a href=\"./det/$detid.htm\" target=\"_blank\"><img src=\"./simg/$obr\" alt=\"$co\" class=\"buttimg\"></a>"  sam="<a href=\"./det/$detid.htm\" target=\"_blank\"><img src=\"./simg/$obr\" alt=\"$co\" class=\"buttimg\"></a>"
- sam="$sam<br><span class=\"butttext\"><b>Qualis:</b> $co<br>"+ sam="$sam<br><span class=\"butttext\">
 + sam="$sam<b>Qualis:</b> <a href=\"https://en.wikipedia.org/wiki/$co\" target=\"_blank\">$co</a><br>"
  if [[ "$imp" != "" ]]; then  if [[ "$imp" != "" ]]; then
- sam="$sam<b>Imperium:</b> $imp<br>"+ sam="$sam<b>Imperium:</b> <a href=\"https://en.wikipedia.org/wiki/$imp\" target=\"_blank\">$imp</a><br>"
  fi  fi
  if [[ "$reg" != "" ]]; then  if [[ "$reg" != "" ]]; then
- sam="$sam<b>Regnum:</b> $reg<br>"+ sam="$sam<b>Regnum:</b> <a href=\"https://en.wikipedia.org/wiki/$reg\" target=\"_blank\">$reg</a><br>"
  fi  fi
  if [[ "$phy" != "" ]]; then  if [[ "$phy" != "" ]]; then
- sam="$sam<b>Phylum:</b> $phy<br>"+ sam="$sam<b>Phylum:</b> <a href=\"https://en.wikipedia.org/wiki/$phy\" target=\"_blank\">$phy</a><br>"
  fi  fi
  if [[ "$cla" != "" ]]; then  if [[ "$cla" != "" ]]; then
- sam="$sam<b>Classis:</b> $cla<br>"+ sam="$sam<b>Classis:</b> <a href=\"https://en.wikipedia.org/wiki/$cla\" target=\"_blank\">$cla</a><br>"
  fi  fi
  if [[ "$ord" != "" ]]; then  if [[ "$ord" != "" ]]; then
- sam="$sam<b>Ordo:</b> $ord<br>"+ sam="$sam<b>Ordo:</b> <a href=\"https://en.wikipedia.org/wiki/$ord\" target=\"_blank\">$ord</a><br>"
  fi  fi
  if [[ "$fam" != "" ]]; then  if [[ "$fam" != "" ]]; then
- sam="$sam<b>Familia:</b> $fam<br>"+ sam="$sam<b>Familia:</b> <a href=\"https://en.wikipedia.org/wiki/$fam\" target=\"_blank\">$fam</a><br>"
  fi  fi
  if [[ "$gen" != "" ]]; then  if [[ "$gen" != "" ]]; then
- sam="$sam<b>Genus:</b> $gen<br>"+ sam="$sam<b>Genus:</b> <a href=\"https://en.wikipedia.org/wiki/$gen\" target=\"_blank\">$gen</a><br>"
  fi  fi
  if [[ "$spe" != "" ]]; then  if [[ "$spe" != "" ]]; then
Line 438: Line 445:
  sam="$sam</span>"  sam="$sam</span>"
  
- #>&2 echo "$sam" 
  >&2 echo "$co $obs"  >&2 echo "$co $obs"
  
Line 459: Line 465:
  samicon=$(geticon $(echo "$spoj" | grep -oPe "<!-- [a-zA-Z0-9]* -->" | grep -oPe "[a-zA-Z0-9]*" | sort | uniq))  samicon=$(geticon $(echo "$spoj" | grep -oPe "<!-- [a-zA-Z0-9]* -->" | grep -oPe "[a-zA-Z0-9]*" | sort | uniq))
  else  else
- samicon=$ICON_biohazard+ samicon="$ICON_biohazard"
  fi  fi
  sam="<table style=\"hadtbl\">$spoj</table>"  sam="<table style=\"hadtbl\">$spoj</table>"
Line 471: Line 477:
  
 echo "var ALL = new OpenLayers.Layer.Vector('Overlay',{attribution:'<a href=\"http://brmlab.cz\">Brmlab</a>'});" echo "var ALL = new OpenLayers.Layer.Vector('Overlay',{attribution:'<a href=\"http://brmlab.cz\">Brmlab</a>'});"
-spagety "$praseTC" "ALL" $ICON_biohazard+spagety "$praseTC" "ALL"$ICON_biohazard"
 echo "map.addLayer(ALL);" echo "map.addLayer(ALL);"
 +
 +# Create plaintext log JUST AFTER "spagety ALL"
 +dateloghtm="<html><head>"
 +dateloghtm="$dateloghtm<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>"
 +dateloghtm="$dateloghtm<link rel='stylesheet' href='./style.css' type='text/css'>"
 +dateloghtm="$dateloghtm<title>Brmlab - BioOSM plaintext log</title>"
 +dateloghtm="$dateloghtm</head><body>"
 +datelogsort=$(echo -e "$datelog" | sort -r | uniq)
 +dateloghtm="$dateloghtm $datelogsort"
 +dateloghtm="$dateloghtm</body></html>"
 +echo "$dateloghtm" > "./plainlog.htm"
  
 echo "var laycon = [vectorLayer,ALL];" # Layer controls JS array echo "var laycon = [vectorLayer,ALL];" # Layer controls JS array
Line 486: Line 503:
 spg=$(echo "$praseTC" | grep "<phylum>Platyhelminthes</phylum>") spg=$(echo "$praseTC" | grep "<phylum>Platyhelminthes</phylum>")
 echo "var Platyhelminthes = new OpenLayers.Layer.Vector('Overlay',{attribution:'<a href=\"http://brmlab.cz\">Brmlab</a>'});" echo "var Platyhelminthes = new OpenLayers.Layer.Vector('Overlay',{attribution:'<a href=\"http://brmlab.cz\">Brmlab</a>'});"
-spagety "$spg" "Platyhelminthes" $ICON_plostenkoid+spagety "$spg" "Platyhelminthes"$ICON_plostenkoid"
 echo "laycon.push(Platyhelminthes)" echo "laycon.push(Platyhelminthes)"
  
project/bioosm/start.txt · Last modified: 2023/09/21 12:15 by sachy