[[BioOSM]]
 

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
project:bioosm:start [2018/07/15 16:35]
sachy Added links to wikipedia; plaintext log
project:bioosm:start [2018/11/24 20:24]
sachy implementace RSS
Line 4: Line 4:
 name=Biologicke zbrane ve vasem okoli| name=Biologicke zbrane ve vasem okoli|
 image= bioosm:​bioosm.jpg?​400 | image= bioosm:​bioosm.jpg?​400 |
-founder=[[user:​sachy:start]]|+founder=[[user:​sachy]]|
 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 18: Line 18:
 ==== K cemu to je ==== ==== K cemu to je ====
  
-  *  interaktivni mapa vhodna k zobrazovani vetsiho mnozstvi fotek, brmlabi wiki, sluzby typu phtagr a soup se zdaly nevhodne k publikaci tohoto typu obsahu, wiki by byla prilis obludna, na beznych sdilecich obrazkovych sluzbach se neda nic pohodlne dohledavat a davat tam biologicky smysluplne a prehledne popisky +  * interaktivni mapa vhodna k zobrazovani vetsiho mnozstvi fotek, brmlabi wiki, sluzby typu phtagr a soup se zdaly nevhodne k publikaci tohoto typu obsahu, wiki by byla prilis obludna, na beznych sdilecich obrazkovych sluzbach se neda nic pohodlne dohledavat a davat tam biologicky smysluplne a prehledne popisky 
-  *  monitoring zivocichu a rostlin podle zajmu prispevovatelu  +  * monitoring zivocichu a rostlin podle zajmu prispevovatelu  
-  *  snadne klikaci katalogovani nalezu skrze Tellico nevyzadujici coding skills +  * snadne klikaci katalogovani nalezu skrze Tellico nevyzadujici coding skills 
-  *  TODO - jednoduche selekce zajmoveho okruhu subjektu [napr. podle rodu, biotopu, datumu] na mape+  * TODO - jednoduche selekce zajmoveho okruhu subjektu [napr. podle rodu, biotopu, datumu] na mape
   * procvicovani temne magie commandu grep, sed a regexpu   * procvicovani temne magie commandu grep, sed a regexpu
  
Line 28: Line 28:
 Podklad jsou [[https://​openstreetmap.org|OSM]],​ ktere maji API [[http://​openlayers.org/​|OpenLayers]] jez umoznuje pridavat do mapy vlastni body, vrstvy... Podklad jsou [[https://​openstreetmap.org|OSM]],​ ktere maji API [[http://​openlayers.org/​|OpenLayers]] jez umoznuje pridavat do mapy vlastni body, vrstvy...
  
-Jednotliva pozorovani jsou v databazi [[http://​tellico-project.org/​|Tellico]]. Udelal jsem script parse_tellico.sh,​ ktery z .tc databaze (je to vlastne ZIP s XML uvnitr) vyparsuje jednotlive polozky a vygeneruje HTML soubor s mapou a podadresar "​det"​ s HTML strankami s detaily jednotlivych pozorovani.+Jednotliva pozorovani jsou v databazi [[http://​tellico-project.org/​|Tellico]]. Udelal jsem script parse_tellico.sh,​ ktery z .tc databaze (je to vlastne ZIP s XML uvnitr) vyparsuje jednotlive polozky a vygeneruje HTML soubor s mapou a podadresar "​det"​ s HTML strankami s detaily jednotlivych pozorovani. ​Vygeneruje se taky JSON s vyparsovanymi polozkami, ktery lze z webu projektu stahnout. 
 + 
 +Pro nadsence je vygenerovany taky prehled prispevku plainlog.htm serazeny dle data pridani do databaze. 
 + 
 +Pokud chcete vedet co je noveho, odebirejte projektovou [[http://​brmlab.s0c4.net/​bioosm/​bioosm.rss|RSS]]
  
 Obrazky v plnem rozliseni jsou v podadresari "​img",​ nahledy v "​simg"​. Videa jsou nahrana na YT a misto nahledu maji generickou ikonu. Obrazky v plnem rozliseni jsou v podadresari "​img",​ nahledy v "​simg"​. Videa jsou nahrana na YT a misto nahledu maji generickou ikonu.
  
-Pozorovani ktera se v mape zobrazi lze filtrovat dle prislusnosti k radu (bakterie, zvirata, rostliny,​...) ​pripadne cimkoli co lze grepnout z Tellico XML.+Pozorovani ktera se v mape zobrazi lze filtrovat dle prislusnosti k radu (bakterie, zvirata, rostliny,​...) ​az po prislusnost k jednotlivym druhum.
  
 === Tellico sample database === === Tellico sample database ===
Line 110: Line 114:
 # #
 # Creates: # Creates:
-#   (to stdout) ​index.htm ​file with the map and static entries+#   (to stdout) ​HTML file with the map and static entries
 #   ​./​det/​ID.htm details of each and every entry #   ​./​det/​ID.htm details of each and every entry
 +#   ​./​bioosm.json JSON of all entries
 +#   ​./​bioosm.rss updated RSS feed
 +#   ​./​plainlog.htm sorted entries for easy human/alg
 # #
 +
 +rm -rfv "​./​det/​*"​
 +mkdir -p "​./​det"​
  
 ICON_animalia="​animalia.png"​ ICON_animalia="​animalia.png"​
Line 122: Line 132:
 ICON_protista="​protista.png"​ ICON_protista="​protista.png"​
 ICON_biohazard="​biohazard.svg"​ ICON_biohazard="​biohazard.svg"​
 +
 +json=""​
 +
 +rss=$'<?​xml version="​1.0"​ encoding="​UTF-8"​ ?>​\n'​
 +rss+=$'<​rss version="​2.0">​\n'​
 +rss+=$'<​channel>​\n'​
 +rss+=$'<​title>​Brmlab BioOSM RSS feed</​title>​\n'​
 +rss+=$'<​description>​New entries on BioOSM database</​description>​\n'​
 +rss+=$'<​link>​https://​bioosm.s0c4.net</​link>​\n'​
 +rss+=$'<​lastBuildDate></​lastBuildDate>​\n'​
 +rss+=$'<​pubDate></​pubDate>​\n'​
 +rss+=$'<​ttl>​86400</​ttl>​\n'​
  
 # Return icon by Regnum # Return icon by Regnum
Line 142: Line 164:
  esac  esac
 } }
 +
 +function safehtml () {
 + echo "​$1"​ | sed -e "​s/'/​\&#​39;/​g"​ -e '​s/"/​\&#​34;/​g'​ -e '​s/</​\&​lt;/​g'​ -e '​s/>/​\&​gt;/​g'​ -e 's/^[ ]*//g' -e 's/[ ]*$//​g'​
 +}
 +
 +i=1 # GLOBAL increment must persist multiple spagety() calls; incremented to infinity
 +# Core function generating entries matching selection criteria (ie Kingdom)
 +# !!! BEZ ODSAZENI !!!
 +# $1 = list of entries
 +# $2 = layer name
 +# $3 = icon of the points
 +function spagety () {
 +
 + bylo=""​ # Minula pozice
 + sam=""​ # HTML samostatneho zaznamu
 + osam=""​ # predchozi $sam
 + spoj=""​ # HTML had z popisu stejnych pozic
 + ospoj=""​ # Predchozi $spoj
 + ox=""​ # Old X
 + oy=""​ # Old Y
 + datelog=""​ # Entries sorted by date for plaintext log
 + json="​var data='​{\"​version\":​\"​$(date --rfc-3339=seconds)\",​\"​arma\":​["​
 +
 + while IFS=''​ read -r radek || [[ -n "​$radek"​ ]]; do
 + co=$(echo "​$radek"​ | grep -oe ' <​title>​.*</​title>​ ' | sed -E 's/( )*<​(\/​)?​title>​( )*//​g'​)
 + co=$(safehtml "​$co"​)
 + obr=$(echo "​$radek"​ | grep -oe ' <​image>​.*</​image>​ ' | sed -E 's/( )*<​(\/​)?​image>​( )*//g' | grep -oPe '​[^/​]*$'​)
 + obr=$(safehtml "​$obr"​)
 + kde=$(echo "​$radek"​ | grep -oe '<​locality>​.*</​locality>'​ | grep -oPe '​[0-9]{2}\.[0-9]{1,​10}[,​ ]*[0-9]{2}\.[0-9]{1,​10}'​)
 + kde=$(safehtml "​$kde"​)
 + kdex=$(echo "​$kde"​ | grep -oPe '​[0-9]{2}\.[0-9]{1,​10}$'​)
 + kdex=$(safehtml "​$kdex"​)
 + kdey=$(echo "​$kde"​ | grep -oPe '​^[0-9]{2}\.[0-9]{1,​10}'​)
 + kdey=$(safehtml "​$kdey"​)
 + 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'​)
 + kdy=$(safehtml "​$kdy"​)
 + skop_typ=$(echo "​$radek"​ | grep -oe ' <​new-field-1>​.*</​new-field-1>​ ' | sed -E 's/( )*<​(\/​)?​new-field-1>​( )*//​g'​)
 + skop_typ=$(safehtml "​$skop_typ"​)
 + skop=$(echo "​$radek"​ | grep -oe ' <​microscope>​.*</​microscope>​ ' | sed -E 's/( )*<​(\/​)?​microscope>​( )*//​g'​)
 + skop=$(safehtml "​$skop"​)
 + imp=$(echo "​$radek"​ | grep -oe ' <​new-field-3>​.*</​new-field-3>​ ' | sed -E 's/( )*<​(\/​)?​new-field-3>​( )*//​g'​)
 + imp=$(safehtml "​$imp"​)
 + reg=$(echo "​$radek"​ | grep -oe ' <​new-field-4>​.*</​new-field-4>​ ' | sed -E 's/( )*<​(\/​)?​new-field-4>​( )*//​g'​)
 + reg=$(safehtml "​$reg"​)
 + phy=$(echo "​$radek"​ | grep -oe ' <​phylum>​.*</​phylum>​ ' | sed -E 's/( )*<​(\/​)?​phylum>​( )*//​g'​)
 + phy=$(safehtml "​$phy"​)
 + cla=$(echo "​$radek"​ | grep -oe ' <​class>​.*</​class>​ ' | sed -E 's/( )*<​(\/​)?​class>​( )*//​g'​)
 + cla=$(safehtml "​$cla"​)
 + ord=$(echo "​$radek"​ | grep -oe ' <​order>​.*</​order>​ ' | sed -E 's/( )*<​(\/​)?​order>​( )*//​g'​)
 + ord=$(safehtml "​$ord"​)
 + fam=$(echo "​$radek"​ | grep -oe ' <​family>​.*</​family>​ ' | sed -E 's/( )*<​(\/​)?​family>​( )*//​g'​)
 + fam=$(safehtml "​$fam"​)
 + gen=$(echo "​$radek"​ | grep -oe ' <​genus>​.*</​genus>​ ' | sed -E 's/( )*<​(\/​)?​genus( )*>//​g'​)
 + gen=$(safehtml "​$gen"​)
 + spe=$(echo "​$radek"​ | grep -oe ' <​species>​.*</​species>​ ' | sed -E 's/( )*<​(\/​)?​species>​( )*//​g'​)
 + spe=$(safehtml "​$spe"​)
 + loc=$(echo "​$radek"​ | grep -oe ' <​locality---plaintext>​.*</​locality---plaintext>​ ' | sed -E 's/( )*<​(\/​)?​locality---plaintext>​( )*//​g'​)
 + loc=$(safehtml "​$loc"​)
 + des=$(echo "​$radek"​ | grep -oe ' <​description>​.*</​description>​ ' | sed -E 's/( )*<​(\/​)?​description>​( )*//​g'​)
 + des=$(safehtml "​$des"​)
 + vid=$(echo "​$radek"​ | grep -oe ' <​videolink>​.*</​videolink>​ ' | sed -E 's/( )*<​(\/​)?​videolink>​( )*//​g'​)
 + vid=$(safehtml "​$vid"​)
 + bio=$(echo "​$radek"​ | grep -oe ' <​biotope>​.*</​biotope>​ ' | sed -E 's/( )*<​(\/​)?​biotope>​( )*//​g'​)
 + bio=$(safehtml "​$bio"​)
 + eng=$(echo "​$radek"​ | grep -oe ' <​enlargement>​.*</​enlargement>​ ' | sed -E 's/( )*<​(\/​)?​enlargement>​( )*//​g'​)
 + eng=$(safehtml "​$eng"​)
 + obs=$(echo "​$radek"​ | grep -oe ' <​observer>​.*</​observer>​ ' | sed -E 's/( )*<​(\/​)?​observer>​( )*//​g'​)
 + obs=$(safehtml "​$obs"​)
 + lnk=$(echo "​$radek"​ | grep -oe ' <​localitylink>​.*</​localitylink>​ ' | sed -E 's/( )*<​(\/​)?​localitylink>​( )*//​g'​)
 + lnk=$(safehtml "​$lnk"​)
 + detid=$(echo "​brmlab$co$obr$kde$kdy"​ | md5sum | grep -oe '​[a-zA-Z0-9]*'​)
 +
 + if [[ "​$kdex"​ = ""​ ]]; then
 + >&​2 echo $(echo "​$radek"​ | grep -oe '<​locality>​.*</​locality>'​) " $co"
 + continue;​
 + fi
 + zkurvenetellico=$(echo "​$obr"​ | grep -oe '​\.[a-zA-Z]*$'​)
 + if [[ "​$zkurvenetellico"​ = "​.jpeg"​ ]]; then
 + >&​2 echo "$obr $co"
 + continue;​
 + fi
 +
 + if [[ "​$spe"​ = "​sp."​ ]]; then
 + wikisp="​https://​en.wikipedia.org/​wiki/​$gen"​
 + else
 + wikisp="​https://​en.wikipedia.org/​wiki/​$gen $spe"
 + fi
 +
 + json+="​{"​
 + json+="​ \"​qualis\":​\"​$co\","​
 + json+="​ \"​imperium\":​\"​$imp\","​
 + json+="​ \"​regnum\":​\"​$reg\","​
 + json+="​ \"​phylum\":​\"​$phy\","​
 + json+="​ \"​classis\":​\"​$cla\","​
 + json+="​ \"​ordo\":​\"​$ord\","​
 + json+="​ \"​familia\":​\"​$fam\","​
 + json+="​ \"​genus\":​\"​$gen\","​
 + json+="​ \"​specie\":​\"​$spe\","​
 + json+="​ \"​locus\":​\"​$kde\","​
 + json+="​ \"​x\":​\"​$kdex\","​
 + json+="​ \"​y\":​\"​$kdey\","​
 + json+="​ \"​locplain\":​\"​$loc\","​
 + json+="​ \"​depictio\":​\"​$des\","​
 + json+="​ \"​quando\":​\"​$kdy\","​
 + json+="​ \"​obr\":​\"​$obr\","​
 + json+="​ \"​micro\":​\"​$skop\","​
 + json+="​ \"​microtyp\":​\"​$skop_typ\","​
 + json+="​ \"​vid\":​\"​$vid\","​
 + json+="​ \"​bio\":​\"​$bio\","​
 + json+="​ \"​amp\":​\"​$eng\","​
 + json+="​ \"​spec\":​\"​$obs\","​
 + json+="​ \"​detid\":​\"​$detid\","​
 + json+="​ \"​lnk\":​\"​$lnk\""​ # Lastone without ','​
 + json+="​},"​
 +
 +
 + rss+=$'<​item>​\n'​
 + rss+=$' ​ <​title>'"​$co"​$'</​title>​\n'​
 + rss+=$' ​ <​description>'"​$des"​$'</​description>​\n'​
 + rss+=$' ​ <​link>​http://​brmlab.s0c4.net/​bioosm/​det/'"​$detid"​$'​.htm</​link>​\n'​
 + rss+=$' ​ <guid isPermaLink="​false">'"​$detid"​$'</​guid>​\n'​
 + rss+=$' ​ <​pubDate>'"​$kdy"​$'</​pubDate>​\n'​
 + rss+=$'</​item>​\n'​
 +
 +
 + # Generate detail page
 + detid=$(echo "​brmlab$co$obr$kde$kdy"​ | md5sum | grep -oe '​[a-zA-Z0-9]*'​)
 + detpg="<​html><​head>"​
 + detpg="​$detpg<​meta http-equiv='​Content-Type'​ content='​text/​html;​ charset=utf-8'>"​
 + detpg="​$detpg<​link rel='​stylesheet'​ href='​../​style.css'​ type='​text/​css'>"​
 + detpg="​$detpg<​title>​Brmlab - BioOSM $co $kde</​title>"​
 + detpg="​$detpg</​head><​body>"​
 + detpg="​$detpg<​table class='​dettbl'><​tr>"​
 + detpg="​$detpg<​td><​h1>​$co (<a href='​$wikisp'​ target='​_blank'>​wiki</​a>​)</​h1>"​
 + if [[ "​$imp"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Imperium:</​b>​ <a href='​https://​en.wikipedia.org/​wiki/​$imp'​ target='​_blank'>​$imp</​a><​br>"​
 + fi
 + if [[ "​$reg"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Regnum:</​b>​ <a href='​https://​en.wikipedia.org/​wiki/​$reg'​ target='​_blank'>​$reg</​a><​br>"​
 + fi
 + if [[ "​$phy"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Phylum:</​b>​ <a href='​https://​en.wikipedia.org/​wiki/​$phy'​ target='​_blank'>​$phy</​a><​br>"​
 + fi
 + if [[ "​$cla"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Classis:</​b>​ <a href='​https://​en.wikipedia.org/​wiki/​$cla'​ target='​_blank'>​$cla</​a><​br>"​
 + fi
 + if [[ "​$ord"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Ordo:</​b>​ <a href='​https://​en.wikipedia.org/​wiki/​$ord'​ target='​_blank'>​$ord</​a><​br>"​
 + fi
 + if [[ "​$fam"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Familia:</​b>​ <a href='​https://​en.wikipedia.org/​wiki/​$fam'​ target='​_blank'>​$fam</​a><​br>"​
 + fi
 + if [[ "​$gen"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Genus:</​b>​ <a href='​https://​en.wikipedia.org/​wiki/​$gen'​ target='​_blank'>​$gen</​a><​br>"​
 + fi
 + if [[ "​$spe"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Specie:</​b>​ <a href='​$wikisp'​ target='​_blank'>​$spe</​a><​br>"​
 + fi
 + detpg="​$detpg<​br>"​
 + if [[ "​$kdy"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Quando:</​b>​ $kdy<​br>"​
 + fi
 + if [[ "​$lnk"​ != ""​ ]]; then
 + loc="<​a href=\"​$lnk\"​ target=\"​_blank\">​$loc</​a>"​ # Yes, escaped "
 + fi
 + detpg="​$detpg<​b>​Locus:</​b>​ $kde ($loc)<​br>"​
 + if [[ "​$obs"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Spectator:</​b>​ $obs<​br>"​
 + fi
 + if [[ "​$bio"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Biotope:</​b>​ $bio<​br>"​
 + fi
 + detpg="​$detpg<​br>"​
 + if [[ "​$skop"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Microscopium:</​b>​ $skop ($skop_typ)<​br>"​
 + fi
 + if [[ "​$eng"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Amplificatio:</​b>​ $eng<​br>"​
 + fi
 + detpg="​$detpg<​br>"​
 + if [[ "​$des"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Depictio:</​b>​ $des<​br>"​
 + fi
 + if [[ "​$vid"​ != ""​ ]]; then
 + detpg="​$detpg<​b>​Video:</​b>​ <a href=\"​$vid\"​ target=\"​_blank\">​$vid</​a><​br>"​
 + fi
 + detpg="​$detpg<​br><​b>​More on <a href=\"​../​\">​BioOSM map</​a></​b><​br>"​
 +
 + detpg="​$detpg</​td><​td style='​min-width:​66%'>"​
 + if [[ "​$obr"​ != ""​ ]]; then
 + detpg="​$detpg<​a href=\"​../​img/​$obr\"><​img src=\"​../​img/​$obr\"​ alt=\"​$co\"​ class='​detimg'></​a>"​
 + else
 + if [[ "​$vid"​ != ""​ ]]; then
 + detyt=$(echo "​$vid"​ | sed -e '​s/​youtube.com\/​watch?​v=/​youtube.com\/​embed\//​g'​)
 + detpg="​$detpg<​iframe class='​detvid'​ src='​$detyt'​ frameborder='​0'​ allow='​encrypted-media'​ allowfullscreen></​iframe>"​
 + else
 + detpg="​$detpg<​img src=\"​../​$3\"​ alt=\"​video\"​ class='​detimg'>"​
 + fi
 + fi
 + detpg="​$detpg</​td></​tr></​table>"​
 + detpg="​$detpg</​body></​html>"​
 + echo "​$detpg"​ > "​./​det/​$detid.htm"​
 +
 + # Plain log of entries
 + datelog+="​$kdy $kde <a href='​./​det/​$detid.htm'​ target='​_blank'>​$co</​a><​br>​\n"​
 +
 + >&​2 echo "$co $obs"
 +
 + ox="​$kdex"​
 + oy="​$kdey"​
 +
 + i=$(($i+1))
 +
 + done <<<​ $(echo "​$1"​) # Zere parametr spaget, nikoli $1 scriptu !!!
 + echo "​$json{}]}"​ | sed -e "​s/​^var data='//​g"​ > "​./​bioosm.json"​
 + echo "​$json{}]}'"​
 +
 + rss+=$'</​channel>​\n'​
 + rss+=$'</​rss>​\n'​
 + echo "​$rss"​ > "​./​bioosm.rss"​
 +
 +} # KONEC FCE SPAGETY
  
  
-rm -rfv "​./​det/​*"​ 
-mkdir -p "​./​det"​ 
-#cat "​./​index_head.htm"​ 
  
 # Parse Tellico file to list of entries # Parse Tellico file to list of entries
Line 153: Line 394:
 # Sorted unique Kingdoms (to be passed as selection criteria) # Sorted unique Kingdoms (to be passed as selection criteria)
 kingdoms=$(echo "​$praseTC"​ | grep -oe ' <​new-field-4>​.*</​new-field-4>​ ' | sed -E 's/( )*<​(\/​)?​new-field-4>​( )*//g' | sort | uniq) kingdoms=$(echo "​$praseTC"​ | grep -oe ' <​new-field-4>​.*</​new-field-4>​ ' | sed -E 's/( )*<​(\/​)?​new-field-4>​( )*//g' | sort | uniq)
- 
  
 echo '<​!DOCTYPE html>'​ echo '<​!DOCTYPE html>'​
Line 164: Line 404:
 echo '​ <​script src="​./​OpenLayers.js"></​script>'​ echo '​ <​script src="​./​OpenLayers.js"></​script>'​
 echo '</​head>'​ echo '</​head>'​
 +echo '<​body>'​
 +# Generate select
 +echo "<​div id='​plainlog'><​b><​a href='​./​bioosm.rss'>​RSS feed</​a><​br><​a href='​./​plainlog.htm'>​Quick news log</​a></​b></​div>"​
 +echo "<​h1 id='​title'>​BioOSM - arma biologica in tuis vicinia</​h1>"​
 +ksel="<​select id='​reg'​ onChange='​genphy()'>"​
 +ksel="​$ksel<​option value='​ALL'​ selected>​ALL</​option>"​
 +while IFS=''​ read -r king || [[ -n "​$king"​ ]]; do
 + ksel="​$ksel<​option value='"​$king"'>​$king</​option>"​
 +done <<<​ $(echo "​$kingdoms"​)
 +ksel="​$ksel</​select>"​
 +echo "​Regnum:​ $ksel "
  
-echo "<body>"​ +echo "Phylum: ​<select id='​phy'​ onChange='​gencla()'><​option>​ALL</​option></​select> " 
- echo "<div style='position:​absolute;​top:​0;​right:​0;​margin:​1em'><​b><​a href='./​plainlog.htm'>Plaintext log</a></b></div>"​ +echo "Classis: ​<select id='cla' ​onChange='genord()'><​option>ALL</option></select> " 
- echo "<h1 id='title'>BioOSM - arma biologica in tuis vicinia</h1>"​ +echo "Ordo: <select ​id='ord' onChange='​genfam()'><​option>​ALL</option></​select> " 
- +echo "Familia: ​<select id='fam' onChange='​gengen()'><​option>​ALL</​option></​select> " 
- # Generate select +echo "​Genus:​ <select id='gen' ​onChange='genspe()'><​option>​ALL</option></​select>"​ 
- ksel="<​select id='kin' onChange='​kinchange()'>​+echo "Specie: <select id='​spe'​ onChange='​armageddon()'><​option>​ALL</​option>​</​select>"​ 
- ksel="​$ksel<​option ​value='​ALL'​ selected>​ALL</​option>"​ +echo "<​br><​input type='​button'​ value='​Platyhelminthes'​ onClick='​plostenkoidy()'>​
- while IFS='' ​read -r king || [[ -n "​$king"​ ]]; do +#echo "<​input type='​button'​ value='​Bugs' onClick='​buggy()'>​
- ksel="​$ksel<​option value='"​$king"​'>$king</​option>"​ +echo "<​br><​br><​div id='​map'​ class='​smallmap'></​div>"​ 
- done <<<​ $(echo "$kingdoms"​) +echo "<​br><​p>​Welcome! You can download the <a href='​./​bioosm.json'​ target='​_blank'>​source data as JSON file</​a><​br>"​ 
- ksel="$ksel</​select>"​ +echo "This site is owned by members of the <a href='​https://​brmlab.cz'​ target='​_blank'>​hackerspace brmlab</​a>​. See our wiki page for <a href='​https://​brmlab.cz/​project/​bioosm/​start'​ target='​_blank'>​details and contact info</​a><​br>​License:​ CC-BY-SA</​p>"
- echo "Regnum: $ksel | +
- echo "<​input type='​button'​ value='​Plostenkoidy' onClick='​plostenkoid()'><​br><​br>​+
- +
-  echo "<div id='​map'​ class='​smallmap'></​div>"​+
 echo "</​body>"​ echo "</​body>"​
  
-echo '<​script>​+echo "<​script>​"
 echo 'map = new OpenLayers.Map("​map"​);'​ echo 'map = new OpenLayers.Map("​map"​);'​
 echo '​map.addLayer(new OpenLayers.Layer.OSM());'​ echo '​map.addLayer(new OpenLayers.Layer.OSM());'​
Line 199: Line 445:
 echo ' new OpenLayers.Geometry.Point(14.41876,​ 50.10554).transform(epsg4326,​ projectTo),'​ echo ' new OpenLayers.Geometry.Point(14.41876,​ 50.10554).transform(epsg4326,​ projectTo),'​
 echo '​ {description:"​Atomovy atol Brmkini"​} ,' echo '​ {description:"​Atomovy atol Brmkini"​} ,'
-echo '​ {externalGraphic:​ "​./​biohazard.svg",​ graphicHeight:​24, graphicWidth:​24, graphicXOffset:​-12, graphicYOffset:​-12},'+echo '​ {externalGraphic:​ "​./​biohazard.svg",​ graphicHeight:​8, graphicWidth:​8, graphicXOffset:​-4, graphicYOffset:​-4},'
 echo '​);'​ echo '​);'​
 echo '​vectorLayer.addFeatures(atol);'​ echo '​vectorLayer.addFeatures(atol);'​
Line 205: Line 451:
 echo "​map.addLayer(vectorLayer);"​ echo "​map.addLayer(vectorLayer);"​
  
 +spagety "​$praseTC"​ "​ALL"​ "​$ICON_biohazard"​
  
 +echo '</​script>'​
 +echo '<​script src="​./​bioosm.js"></​script>'​ # Must be after JSON
 +echo "</​html>"​
  
-i=1 GLOBAL increment must persist multiple spagety() calls; incremented to infinity +Create plaintext log 
-# Core function generating entries matching selection criteria (ie Kingdom) +dateloghtm="<​html><​head>"​ 
-# !!! BEZ ODSAZENI !!! +dateloghtm+="<​meta http-equiv='​Content-Type'​ content='​text/​html;​ charset=utf-8'>"​ 
-# $1 list of entries +dateloghtm+="<​link rel='​stylesheet'​ href='​./​style.css'​ type='​text/​css'>"​ 
-# $2 layer name +dateloghtm+="<​title>​Brmlab - BioOSM plaintext log</​title>"​ 
-# $3 icon of the points +dateloghtm+="</​head><​body>"​ 
-function spagety ​() {+datelogsort=$(echo -e "​$datelog"​ | sort -r | uniq) 
 +dateloghtm+="​$datelogsort"​ 
 +dateloghtm+="</​body></​html>"​ 
 +echo "​$dateloghtm"​ > "​./​plainlog.htm"​ 
 +</​code>​
  
-bylo=""​ # Minula pozice +==== bioosm.js ​====
-sam=""​ # HTML samostatneho zaznamu +
-osam=""​ # predchozi $sam +
-spoj=""​ # HTML had z popisu stejnych pozic +
-ospoj=""​ # Predchozi $spoj +
-ox=""​ # Old X +
-oy=""​ # Old Y +
-datelog=""​ # Entries sorted by date for plaintext log+
  
 +<code javascript bioosm.js>​
 +var blob=JSON.parse(data)
 +var arma=blob.arma
  
-while IFS='' ​read -r radek || [[ -n "$radek" ​]]do+var vectorLayerDynamic ​new OpenLayers.Layer.Vector('Overlay',​{attribution:'<​a href="http://​brmlab.cz">​Brmlab</​a>'​});​ 
 +map.addLayer(vectorLayerDynamic);
  
- co=$(echo "​$radek"​ | grep -oe ' <​title>​.*</​title>​ ' | sed -E 's/)*<​(\/​)?​title>​( )*//​g'​) +var regsel=document.getElementById("reg") 
- obr=$(echo ​"$radek" ​| grep -oe ' <​image>​.*</​image>​ ' | sed -E 's/( )*<​(\/​)?​image>​( )*//g' | grep -oPe '​[^/​]*$'​+var physel=document.getElementById("phy") 
- kde=$(echo "​$radek"​ | grep -oe '<​locality>​.*</​locality>'​ | grep -oPe '​[0-9]{2}\.[0-9]{1,​10}[,​ ]*[0-9]{2}\.[0-9]{1,​10}'​) +var clasel=document.getElementById("cla") 
- kdex=$(echo "$kde" ​| grep -oPe '​[0-9]{2}\.[0-9]{1,​10}$'​+var ordsel=document.getElementById("ord") 
- kdey=$(echo "​$kde"​ | grep -oPe '​^[0-9]{2}\.[0-9]{1,​10}'​) +var famsel=document.getElementById("fam") 
- 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'​+var gensel=document.getElementById("gen") 
- skop_typ=$(echo "​$radek"​ | grep -oe ' <​new-field-1>​.*</​new-field-1>​ ' | sed -E 's/( )*<​(\/​)?​new-field-1>​( )*//​g'​) +var spesel=document.getElementById("​spe"​)
- skop=$(echo "$radek" ​| grep -oe ' <​microscope>​.*</​microscope>​ ' | sed -E 's/( )*<​(\/​)?​microscope>​( )*//g'+
- imp=$(echo "​$radek"​ | grep -oe ' <​new-field-3>​.*</​new-field-3>​ ' | sed -E 's/)*<​(\/​)?​new-field-3>​( )*//​g'​) +
- reg=$(echo ​"$radek" ​| grep -oe ' <​new-field-4>​.*</​new-field-4>​ ' | sed -E 's/( )*<​(\/​)?​new-field-4>​( )*//g'+
- phy=$(echo "​$radek"​ | grep -oe ' <​phylum>​.*</​phylum>​ ' | sed -E 's/)*<​(\/​)?​phylum>​( )*//​g'​) +
- cla=$(echo ​"$radek" ​| grep -oe ' <​class>​.*</​class>​ ' | sed -E 's/( )*<​(\/​)?​class>​( )*//g'+
- ord=$(echo "​$radek"​ | grep -oe ' <​order>​.*</​order>​ ' | sed -E 's/)*<​(\/​)?​order>​( )*//​g'​) +
- fam=$(echo ​"$radek"​ | grep -oe ' <​family>​.*</​family>​ ' | sed -E 's/( )*<​(\/​)?​family>​( )*//​g'​) +
- gen=$(echo "​$radek"​ | grep -oe ' <​genus>​.*</​genus>​ ' | sed -E 's/( )*<​(\/​)?​genus( )*>//​g'​) +
- spe=$(echo ​"$radek"​ | grep -oe ' <​species>​.*</​species>​ ' | sed -E 's/( )*<​(\/​)?​species>​( )*//​g'​) +
- loc=$(echo "​$radek"​ | grep -oe ' <​locality---plaintext>​.*</​locality---plaintext>​ ' | sed -E 's/( )*<​(\/​)?​locality---plaintext>​( )*//​g'​) +
- des=$(echo "​$radek"​ | grep -oe ' <​description>​.*</​description>​ ' | sed -E 's/( )*<​(\/​)?​description>​( )*//​g'​) +
- vid=$(echo "​$radek"​ | grep -oe ' <​videolink>​.*</​videolink>​ ' | sed -E 's/( )*<​(\/​)?​videolink>​( )*//​g'​) +
- bio=$(echo "​$radek"​ | grep -oe ' <​biotope>​.*</​biotope>​ ' | sed -E 's/( )*<​(\/​)?​biotope>​( )*//​g'​) +
- eng=$(echo "​$radek"​ | grep -oe ' <​enlargement>​.*</​enlargement>​ ' | sed -E 's/( )*<​(\/​)?​enlargement>​( )*//​g'​) +
- obs=$(echo "​$radek"​ | grep -oe ' <​observer>​.*</​observer>​ ' | sed -E 's/( )*<​(\/​)?​observer>​( )*//g')+
  
 +var ICON_animalia="​animalia.png"​
 +var ICON_bacteria="​bacteria.png"​
 +var ICON_fungi="​fungi.png"​
 +var ICON_chromista="​chromista.png"​
 +var ICON_plantae="​plantae.svg"​
 +var ICON_plostenkoid="​plostenkoid.png"​
 +var ICON_protista="​protista.png"​
 +var ICON_biohazard="​biohazard.svg"​
  
- if [[ "​$kdex" ​= "" ​]]; then +// Return icon by Regnum 
- >&2 echo $(echo "$radek" ​| grep -oe '<​locality>​.*</​locality>'​) " ​$co+function geticon (a,i) 
- continue; +
- fi + var r=""​ 
- zkurvenetellico=$(echo "$obr" ​| grep -oe '\.[a-zA-Z]*$'+ if(document.getElementById("reg").value!="ALL") 
- if [[ "​$zkurvenetellico" ​= ".jpeg" ​]]then + r=document.getElementById("reg").value 
- >&2 echo "$obr $co" + else 
- continue; +
- fi+ r=a[i].regnum 
 + for(var e=i;e>=0 && ​a[e].locus==a[i].locus;​e--) 
 + if(a[e].regnum!=a[i].regnum) 
 +
 + r="ALL"; 
 + break; 
 + } 
 + }
  
 + switch (r)
 + {
 + case "​Animalia":​
 + return ICON_animalia;​
 + case "​Bacteria":​
 + return ICON_bacteria;​
 + case "​Fungi":​
 + return ICON_fungi;
 + case "​Chromista":​
 + return ICON_chromista;​
 + case "​Plantae":​
 + return ICON_plantae;​
 + case "​Protista":​
 + return ICON_protista;​
 + default:
 + return ICON_biohazard
 + }
 +}
  
- # Generate detail page +function genphy() { 
- detid=$(echo "​brmlab$co$obr$kde$kdy"​ | md5sum | grep -oe '​[a-zA-Z0-9]*'​+ physel.innerHTML="<option>ALL</option>"​ 
- detpg="<​html><​head>"​ + clasel.innerHTML="<option>ALL</option>"​ 
- detpg="​$detpg<​meta http-equiv='​Content-Type'​ content='​text/​html;​ charset=utf-8'>"​ + ordsel.innerHTML="<option>ALL</option>"​ 
- detpg="​$detpg<​link rel='​stylesheet'​ href='../​style.css'​ type='​text/​css'>"​ + famsel.innerHTML="<option>ALL</option>"​ 
- detpg="$detpg<title>Brmlab - BioOSM $co $kde</title>"​ + gensel.innerHTML="<option>ALL</option>"​ 
- detpg="​$detpg</​head><​body>"​ + spesel.innerHTML="<option>ALL</option>"
- detpg="​$detpg<​table class='​dettbl'><​tr>"​ +
- detpg="​$detpg<​td><​h1>​$co (<a href='​https://​en.wikipedia.org/​wiki/​$co'​ target='​_blank'>​wiki</​a>​)</​h1>​" +
- if [[ "​$imp"​ != ""​ ]]; then +
- detpg="​$detpg<b>Imperium:</b> <a href='​https://​en.wikipedia.org/​wiki/​$imp'​ target='​_blank'>​$imp</​a><​br>"​ +
- fi +
- if [[ "​$reg"​ != ""​ ]]; then +
- detpg="​$detpg<​b>​Regnum:</​b>​ <a href='​https://​en.wikipedia.org/​wiki/​$reg'​ target='​_blank'>​$reg</​a><​br>"​ +
- fi +
- if [[ "​$phy"​ != ""​ ]]; then +
- detpg="$detpg<b>Phylum:</b> <a href='​https://​en.wikipedia.org/​wiki/​$phy'​ target='​_blank'>​$phy</​a><​br>"​ +
- fi +
- if [[ "​$cla"​ != ""​ ]]; then +
- detpg="​$detpg<​b>​Classis:</​b>​ <a href='​https://​en.wikipedia.org/​wiki/​$cla'​ target='​_blank'>​$cla</​a><​br>"​ +
- fi +
- if [[ "​$ord"​ != ""​ ]]; then +
- detpg="$detpg<b>Ordo:</b> <a href='​https://​en.wikipedia.org/​wiki/​$ord'​ target='​_blank'>​$ord</​a><​br>"​ +
- fi +
- if [[ "​$fam"​ != ""​ ]]; then +
- detpg="​$detpg<​b>​Familia:</​b>​ <a href='​https://​en.wikipedia.org/​wiki/​$fam'​ target='​_blank'>​$fam</​a><​br>​" +
- fi +
- if [[ "​$gen"​ != ""​ ]]; then +
- detpg="​$detpg<b>Genus:</b> <a href='​https://​en.wikipedia.org/​wiki/​$gen'​ target='​_blank'>​$gen</​a><​br>"​ +
- fi +
- if [[ "​$spe"​ != ""​ ]]; then +
- detpg="​$detpg<​b>​Specie:</​b>​ $spe<​br>"​ +
- fi +
- detpg="​$detpg<​br>"​ +
- if [[ "​$kdy"​ != ""​ ]]; then +
- detpg="​$detpg<​b>​Quando:</​b>​ $kdy<​br>"​ +
- fi +
- detpg="​$detpg<​b>​Locus:</​b>​ $kde ($loc)<​br>"​ +
- if [[ "​$obs"​ != ""​ ]]; then +
- detpg="​$detpg<​b>​Spectator:</​b>​ $obs<​br>"​ +
- fi +
- if [[ "​$bio"​ != ""​ ]]; then +
- detpg="​$detpg<​b>​Biotope:</​b>​ $bio<​br>"​ +
- fi +
- detpg="​$detpg<​br>"​ +
- if [[ "​$skop"​ != ""​ ]]; then +
- detpg="​$detpg<​b>​Microscopium:</​b>​ $skop ($skop_typ)<​br>"​ +
- fi +
- if [[ "​$eng"​ != ""​ ]]; then +
- detpg="​$detpg<​b>​Amplificatio:</​b>​ $eng<​br>"​ +
- fi +
- detpg="​$detpg<​br>"​ +
- if [[ "​$des"​ != ""​ ]]; then +
- detpg="​$detpg<​b>​Depictio:</​b>​ $des<​br>"​ +
- fi +
- if [[ "​$vid"​ != ""​ ]]; then +
- detpg="​$detpg<​b>​Video:</​b>​ <a href=\"​$vid\"​ target=\"​_blank\">​$vid</​a><​br>"​ +
- fi +
- detpg="​$detpg</​td><​td style='​min-width:​66%'>"​ +
- if [[ "​$obr"​ != ""​ ]]; then +
- detpg="​$detpg<​a href=\"​../​img/​$obr\"><​img src=\"../​img/​$obr\"​ alt=\"​$co\"​ class='​detimg'>​</​a>"​ +
- else +
- if [[ "​$vid"​ != ""​ ]]; then +
- detyt=$(echo "​$vid"​ | sed -e '​s/​youtube.com\/​watch?​v=/​youtube.com\/​embed\//​g'​) +
- detpg="​$detpg<​iframe class='​detvid'​ src='​$detyt'​ frameborder='​0'​ allow='​encrypted-media'​ allowfullscreen></iframe>+
- else +
- detpg="​$detpg<​img src=\"​../​$3\"​ alt=\"​video\"​ class='​detimg'>"​ +
- fi +
- fi +
- detpg="​$detpg</​td></​tr></​table>"​ +
- detpg="​$detpg</​body></​html>"​ +
- echo "​$detpg"​ > "​./​det/​$detid.htm"+
  
- # Plain log of entries + var phyarr=[] 
- datelog="​$datelog $kdy $kde <a href='./det/$detid.htm' target='​_blank'​>$co</a><br>\n"+ for (var i=0;i<arma.length-1;​i++) 
 +
 + if(regsel.value==arma[i].regnum && arma[i].phynum!=""​) 
 + phyarr.push(arma[i].phylum) 
 +
 + phyarr.sort() 
 + for (var i=0;​i<​phyarr.length;​i++) 
 +
 + if(i==0) 
 +
 + physel.innerHTML+="<​option>"​+phyarr[0]+"​</option>
 + continue 
 +
 + if(phyarr[i]!=phyarr[i-1]) 
 + physel.innerHTML+="​<option>"+phyarr[i]+"</​option>"​ 
 +
 + armageddon() // Populate the map with monsters... 
 +}
  
- # Pokracujem v hadovi +function gencla() { 
- if [[ "​$kde" ​= "$bylo" ]]; then + clasel.innerHTML="<option>ALL</option>"​ 
- sam="";​ + ordsel.innerHTML="<option>ALL</option>"​ 
- spoj="​$spoj<tr><td><a href=\"​./det/​$detid.htm\"​ target=\"​_blank\"​>"​ + famsel.innerHTML="<option>ALL</option>"​ 
- if [[ "​$obr"​ != ""​ ]]; then + gensel.innerHTML="<option>ALL</option>"​ 
- spoj="​$spoj<​img src=\"./​simg/​$obr\"​ class=\"hadimg\">​</a></td>"​ + spesel.innerHTML="<option>ALL</option>"
- else +
- spoj="​$spoj<​img src=\"./$3\" class=\"hadimg\">​</a></td>"​ +
- fi +
- spoj="$spoj<​td>​$co<br>$kdy</td>"​ +
- spoj="$spoj<!-- $reg -->" # Metadata +
- spoj="​$spoj</tr>" +
- ox="​$kdex"​ +
- oy="​$kdey"​ +
- continue;​ +
- fi+
  
- # Bud prvni zaznam, nebo zmena pozice+ var claarr=[] 
 + for (var i=0;​i<​arma.length-1;​i++) 
 +
 + if(physel.value==arma[i].phylum && arma.classis!=""​) 
 + claarr.push(arma[i].classis) 
 +
 + claarr.sort() 
 + for (var i=0;​i<​claarr.length;​i++) 
 +
 + if(i==0) 
 +
 + clasel.innerHTML+="<​option>"​+claarr[0]+"</​option>"​ 
 + continue 
 +
 + if(claarr[i]!=claarr[i-1]) 
 + clasel.innerHTML+="<​option>"​+claarr[i]+"</​option>"​ 
 +
 + armageddon() // Populate the map with monsters... 
 +}
  
- # Predchozi pozice jen 1 zaznam? +function genord() { 
- if [[ "$sam" ​!= "" ​]]; then + ordsel.innerHTML="<​option>​ALL</​option>​" 
- samicon=$(geticon $(echo ​"$sam" ​| grep -oPe "<b>Regnum:</b> <[^>]*>[a-zA-Z0-9]*" ​| grep -oPe "[a-zA-Z0-9]*$")) + famsel.innerHTML="<​option>​ALL</​option>​
- >&2 echo "$samicon"+ gensel.innerHTML="<​option>​ALL</​option>​" 
 + spesel.innerHTML="<option>ALL</option>
 + var ordarr=[] 
 + for (var i=0;i<arma.length-1;​i++) 
 +
 + if(clasel.value==arma[i].classis && arma[i].ordo!=""​
 + ordarr.push(arma[i].ordo) 
 +
 + ordarr.sort() 
 + for (var i=0;​i<​ordarr.length;​i++) 
 + { 
 + if(i==0) 
 +
 + ordsel.innerHTML+="<​option>"+ordarr[0]+"</​option>"​ 
 + continue 
 +
 + if(ordarr[i]!=ordarr[i-1]) 
 + ordsel.innerHTML+="<​option>"​+ordarr[i]+"</​option>"​ 
 +
 + armageddon() // Populate the map with monsters... 
 +}
  
- 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});​+function genfam() 
- echo "$2.addFeatures(n$i);"​ + famsel.innerHTML="<​option>​ALL<​/option>
- spoj=""​ + gensel.innerHTML="<​option>​ALL</​option>​
- sam=""​ + spesel.innerHTML="<​option>​ALL</​option>​
- fi # ELSE vytvori prazdny radek + var famarr=[] 
- # Predchozi pozice vic zaznamu? + for (var i=0;​i<​arma.length-1;​i++) 
- if [[ "​$spoj" ​!= "" ​]]; then +
- muchicons=$(echo "​$spoj"​ | grep -oPe "<​!-- ​[a-zA-Z0-9]* -->"​ | grep -oPe "​[a-zA-Z0-9]*"​ | sort | uniq | wc -l+ if(ordsel.value==arma[i].ordo && arma[i].familia!=""​) 
- #>&​2 echo "*** $muchicons"​ + famarr.push(arma[i].familia) 
- if [[ "​$muchicons" ​== "​1"​ ]]; then +
- spojicon=$(geticon $(echo "​$spoj"​ | grep -oPe "<!-- [a-zA-Z0-9]* -->" ​| grep -oPe "[a-zA-Z0-9]*" ​| sort | uniq)) + famarr.sort(
- #>&2 echo "*** $spojicon" + for (var i=0;​i<​famarr.length;​i++) 
- else + { 
- spojicon="​$ICON_biohazard"​ + if(i==0) 
- 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});​+ famsel.innerHTML+="<option>"+famarr[0]+"</option>"​ 
-    echo "​$2.addFeatures(n$i);" + continue 
- spoj=""​ + } 
- sam=""​ + if(famarr[i]!=famarr[i-1]) 
- fi+ famsel.innerHTML+="<option>"+famarr[i]+"</option>"​ 
 +
 + armageddon() // Populate the map with monsters... 
 +}
  
- bylo="​$kde"​ +function gengen() { 
- spoj="<tr><td><a href=\"./​det/​$detid.htm\"​ target=\"​_blank\">"​ + gensel.innerHTML="<option>ALL</option>" 
- if [[ "​$obr"​ !""​ ]]; then + spesel.innerHTML="<​option>​ALL</​option>"​ 
- spoj="​$spoj<​img src=\"./​simg/​$obr\"​ class=\"hadimg\"></​a></​td>"​ + var genarr=[] 
- else + for (var i=0;i<​arma.length-1;​i++) 
- spoj="​$spoj<​img src=\"./$3\" class=\"​hadimg\"</a></td>"​ + { 
- fi + if(famsel.value==arma[i].familia && arma[i].genus!=""​
- spoj="​$spoj<​td>​$co<​br>​$kdy</​td>"​ + genarr.push(arma[i].genus) 
- spoj="$spoj<!-- $reg -->" ​# Metadata pyco +
- spoj="$spoj</tr>"+ genarr.sort() 
 + for (var i=0;i<genarr.length;​i++) 
 + { 
 + if(i==0) 
 +
 + gensel.innerHTML+="<option>"​+genarr[0]+"​</option>"​ 
 + continue 
 +
 + if(genarr[i]!=genarr[i-1]) 
 + gensel.innerHTML+="<option>"+genarr[i]+"</option>" 
 +
 + //genspe() // ...and here we go 
 + armageddon() // Populate the map with monsters... 
 +}
  
- sam="<​a href=\"​./​det/​$detid.htm\"​ target=\"_blank\">​<img src=\"​./​simg/​$obr\"​ alt=\"​$co\"​ class=\"​buttimg\"​></a>"​ +function genspe() 
- sam="​$sam<​br><​span class=\"​butttext\">"​ +
- sam="$sam<b>​Qualis:</​b>​ <a href=\"​https://​en.wikipedia.org/​wiki/​$co\"​ target=\"​_blank\">​$co</​a><​br>"​ + spesel.innerHTML="<option>ALL</option>"​ 
- if [[ "​$imp"​ != ""​ ]]then + var spearr=[] 
- sam="​$sam<​b>​Imperium:</​b>​ <a href=\"​https://​en.wikipedia.org/​wiki/​$imp\"​ target=\"​_blank\">​$imp</​a><​br>"​ + for (var i=0;i<arma.length-1;i++) 
- fi + { 
- if [[ "​$reg"​ != "" ​]]; then + if(gensel.value==arma[i].genus && arma[i].specie!=""​) 
- sam="​$sam<​b>​Regnum:</​b>​ <a href=\"​https://​en.wikipedia.org/​wiki/​$reg\"​ target=\"​_blank\">​$reg</​a><​br>"​ + spearr.push(arma[i].specie) 
- fi + } 
- if [[ "​$phy"​ != "" ​]]; then + spearr.sort() 
- sam="​$sam<​b>​Phylum:</​b>​ <a href=\"​https://​en.wikipedia.org/​wiki/​$phy\"​ target=\"​_blank\">​$phy</​a><​br>"​ + for (var i=0;i<spearr.length;i++) 
- fi + { 
- if [[ "​$cla" ​!= "" ​]]; then + if(i==0) 
- sam="​$sam<​b>​Classis:</​b>​ <a href=\"​https://​en.wikipedia.org/​wiki/​$cla\"​ target=\"​_blank\">​$cla</​a><​br>"​ + { 
- fi + spesel.innerHTML+="<option>"+spearr[0]+"</option>"​ 
- if [[ "​$ord"​ != "" ​]]; then + continue 
- sam="​$sam<​b>​Ordo:</​b>​ <a href=\"​https://​en.wikipedia.org/​wiki/​$ord\"​ target=\"​_blank\">​$ord</​a><​br>"​ + } 
- fi + if(spearr[i]!=spearr[i-1]) 
- if [[ "​$fam"​ != ""​ ]]; then + spesel.innerHTML+="<option>"+spearr[i]+"</option>"​ 
- sam="​$sam<​b>​Familia:</​b>​ <a href=\"​https://​en.wikipedia.org/​wiki/​$fam\"​ target=\"​_blank\">​$fam</​a><​br>"​ + } 
- fi + armageddon() ​// Populate the map with monsters... 
- if [[ "​$gen"​ !""​ ]]then +}
- sam="​$sam<b>​Genus:</​b>​ <a href=\"​https://​en.wikipedia.org/​wiki/​$gen\"​ target=\"​_blank\">​$gen</​a><​br>"​ +
- fi +
- if [[ "​$spe"​ != ""​ ]]; then +
- sam="​$sam<​b>​Specie:</​b>​ $spe<​br>"​ +
- fi +
- if [[ "​$bio"​ !""​ ]]; then +
- sam="​$sam<​b>​Biotope:</​b>​ $bio<​br>"​ +
- fi +
- if [[ "​$kdy"​ != ""​ ]]; then +
- sam="​$sam<​b>​Quando:</​b>​ $kdy<​br>"​ +
- fi +
- sam="$sam<b>​Locus:</​b>​ $kde ($loc)<​br>" +
- if [[ "​$obs"​ != "" ​]]; then +
- sam="$sam<​b>​Spectator:​</b> $obs<br>"​ +
- fi +
- if [[ "​$skop"​ != ""​ ]]; then +
- sam="​$sam<​b>​Microscopium:</​b>​ $skop ($skop_typ)<​br>"​ +
- fi +
- if [[ "​$eng" ​!= "" ​]]; then +
- sam="$sam<b>​Amplificatio:</​b>​ $eng<br>" +
- fi +
-# if [[ "​$des"​ != "" ​]]; then +
-# sam="$sam<​b>​Depictio:​</b> $des<br>"​ +
-# fi +
- if [[ "​$vid"​ != ""​ ]]; then +
- sam="​$sam<​b>​Video:<​/b> <a href=\"​$vid\"​ target=\"​_blank\">​$vid<​/a><​br>"​ +
- fi +
- sam="​$sam</​span>"​+
  
- >&2 echo "$co $obs"+function armageddon() 
 +
 + var speval=document.getElementById("spe").value 
 + var genval=document.getElementById("​gen"​).value 
 + var famval=document.getElementById("​fam"​).value 
 + var ordval=document.getElementById("​ord"​).value 
 + var claval=document.getElementById("​cla"​).value 
 + var phyval=document.getElementById("​phy"​).value 
 + var regval=document.getElementById("​reg"​).value 
 + var a=[]
  
 + if(speval!="​ALL"​)
 + {
 + for(var i=0;​i<​arma.length-1;​i++)
 + if(arma[i].specie==speval && arma[i].genus==genval) // Check genus because of unknown "​sp."​
 + a.push(arma[i])
 + }
 + else if(genval!="​ALL"​)
 + {
 + for(var i=0;​i<​arma.length-1;​i++)
 + if(arma[i].genus==genval)
 + a.push(arma[i])
 + }
 + else if(famval!="​ALL"​)
 + {
 + for(var i=0;​i<​arma.length-1;​i++)
 + if(arma[i].familia==famval)
 + a.push(arma[i])
 + }
 + else if(ordval!="​ALL"​)
 + {
 + for(var i=0;​i<​arma.length-1;​i++)
 + if(arma[i].ordo==ordval)
 + a.push(arma[i])
 + }
 + else if(claval!="​ALL"​)
 + {
 + for(var i=0;​i<​arma.length-1;​i++)
 + if(arma[i].classis==claval)
 + a.push(arma[i])
 + }
 + else if(phyval!="​ALL"​)
 + {
 + for(var i=0;​i<​arma.length-1;​i++)
 + if(arma[i].phylum==phyval)
 + a.push(arma[i])
 + }
 + else if(regval!="​ALL"​)
 + {
 + for(var i=0;​i<​arma.length-1;​i++)
 + if(arma[i].regnum==regval)
 + a.push(arma[i])
 + }
 + else // Regnum: ALL
 + {
 + for(var i=0;​i<​arma.length-1;​i++)
 + a.push(arma[i])
 + }
  
- ox="​$kdex"​ + icongeddon(a) 
- oy="​$kdey"​+}
  
 +function buggy()
 +{
 + var p=[]
 + for(var i=0;​i<​arma.length-1;​i++)
 + {
 + if(arma[i].regnum==""​||
 +      ​arma[i].phylum==""​||
 +      ​arma[i].classis==""​||
 +      ​arma[i].ordo==""​||
 +      ​arma[i].familia==""​||
 +      ​arma[i].genus==""​)
 +   p.push(arma[i])
 + }
 + icongeddon(p)
 +}
  
- i=$(($i+1))+function plostenkoidy() 
 +
 + var p=[] 
 + for(var i=0;​i<​arma.length-1;​i++) 
 +
 + if(arma[i].phylum=="​Platyhelminthes"​) 
 + p.push(arma[i]) 
 +
 + icongeddon(p) 
 +}
  
- # Precti XML, vyfiltruj jen to co ma prijit do mapy serad to dle umisteni +function icongeddon(a) 
- ​Umisteni je razene kvuli vic vzorkum z jednoho mista+
 + //​alert(a.length) // #thingies to show in the map' 
 + while(map.popups.length) 
 + map.removePopup(map.popups[0]) 
 + vectorLayerDynamic.destroyFeatures()
  
-done <<<​ $(echo ​"$1"​) ​# Zere parametr spaget, nikoli $1 scriptu !!!+ var bylo="" // Minula pozice 
 + var sam=""​ // HTML samostatneho zaznamu 
 + var osam=""​ // predchozi ​$sam 
 + var spoj="" // HTML had z popisu stejnych pozic 
 + var ospoj=""​ // Predchozi spoj 
 + var ox=""​ // Old X 
 + var oy=""​ // Old Y 
 + var datelog=""​ // Entries sorted by date for plaintext log 
 + var i=0 // Iterator over a[] (needed after FOR) 
 + var n=[] // New points in the layer 
 + var muchicons=0 // How much Regnum'​s?​ 
 + var samicon=ICON_biohazard // Icon 
 + var spojicon=ICON_biohazard // Icon
  
-# Do not forget to print last line when WHILE ends! + for(;​i<​a.length;​i++) // -1 fix for last empty entry 
-if [[ "$sam" ​= "" ​]]then +
- muchicons=$(echo ​"$spoj" | grep -oPe "<!-- [a-zA-Z0-9]* -->"​ | grep -oPe "[a-zA-Z0-9]*" ​| sort | uniq | wc -l) + // Pokracujem v hadovi 
- if ["$muchicons" == "1" ​]]; then + if(a[i].locus == bylo) 
- samicon=$(geticon $(echo ​"$spoj" | grep -oPe "<!-- [a-zA-Z0-9]* -->" | grep -oPe "​[a-zA-Z0-9]*"​ | sort | uniq)) +
- else + sam="";​ 
- samicon="$ICON_biohazard"​ + spoj+="<​tr><​td>​" 
- fi + spoj+='​<a href="./​det/'​+a[i].detid+'​.htm" ​target="​_blank">'​ 
- sam="<table style=\"​hadtbl\">$spoj</table>" + if(a[i].obr != ""​
-else + spoj+='<​img src="./​simg/'​+a[i].obr+'"​ class="hadimg"></a></​td>'​ 
- samicon=$(geticon $(echo "​$sam"​ | grep -oPe "<b>​Regnum:</​b> [a-zA-Z0-9]*" ​| grep -oPe "[a-zA-Z0-9]*$")) + else 
-fi + spoj+='<​img src=./"'+ICON_biohazard+'" ​class="hadimg"></​a></​td>'​ 
-echo "var n$i new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point($kdex,​$kdey).transform(epsg4326,​projectTo),​{description:'​"$sam"'​},​{externalGraphic:'​./$samicon',​graphicHeight:​24,​graphicWidth:​24,​graphicXOffset:​-12,​graphicYOffset:​-12});​+ spoj+="<td>"+a[i].qualis+"<br>"+a[i].quando+"</​td>​
-echo "$2.addFeatures(n$i);"+ spoj+="</tr>
 + ox=a[i].
 + oy=a[i].y 
 + continue; 
 + }
  
-} # KONEC FCE SPAGETY !!!+ if(a[i].specie=="​sp."​) 
 + wikisp="​https://​en.wikipedia.org/​wiki/"​+a[i].genus 
 + else 
 + wikisp="​https://​en.wikipedia.org/​wiki/"​+a[i].genus+"​ "​+a[i].specie
  
-echo "var ALL = new OpenLayers.Layer.Vector('​Overlay',​{attribution:'<​a href=\"​http:​//brmlab.cz\">​Brmlab</​a>'​});"​ + // Bud prvni zaznam, nebo zmena pozice
-spagety "​$praseTC"​ "​ALL"​ "​$ICON_biohazard"​ +
-echo "​map.addLayer(ALL);"​+
  
-# Create plaintext log JUST AFTER "​spagety ALL" + // Predchozi pozice jen 1 zaznam? 
-dateloghtm="<​html><​head>​+ if(sam != ""​) 
-dateloghtm="​$dateloghtm<​meta http-equiv='Content-Type' ​content='text/html; charset=utf-8'>"​ +
-dateloghtm="​$dateloghtm<​link rel='stylesheet' ​href='./style.css' ​type='text/css'>" + samicon=geticon(a,i-1) 
-dateloghtm="$dateloghtm<​title>​Brmlab - BioOSM plaintext log</​title>​+ 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});​ 
-dateloghtm="$dateloghtm</​head><​body>​+ vectorLayerDynamic.addFeatures(n[i]);​ 
-datelogsort=$(echo -e "$datelog" ​| sort -r | uniq+ spoj=""​ 
-dateloghtm="​$dateloghtm $datelogsort"​ + sam=""​ 
-dateloghtm="$dateloghtm</body></html>"​ + } // ELSE vytvori prazdny radek 
-echo "$dateloghtm" ​"./​plainlog.htm"+ // Predchozi pozice vic zaznamu? 
 + if(spoj!=""​) 
 +
 + spojicon=geticon(a,​i-1) 
 + 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});​ 
 + vectorLayerDynamic.addFeatures(n[i]);​ 
 + spoj=""​ 
 + sam=""​ 
 + }
  
-echo "var laycon ​= [vectorLayer,​ALL];" # Layer controls JS array + bylo=a[i].locus 
-while IFS='' ​read -r spag || [[ -n "$spag" ​]]; do + spoj='<​tr><​td><​a href="​./​det/​'+a[i].detid+'​.htm" ​target="_blank">'​ 
- echo "var $spag new OpenLayers.Layer.Vector('​Overlay',​{attribution:​'<a href=\"http://brmlab.cz\">Brmlab</​a>'​});" + if(a[i].obr != "") 
- spg=$(echo "$praseTC" ​| grep "<new-field-4>$spag</new-field-4>") + spoj+='<img src="./simg/'+a[i].obr+'"​ class="​hadimg"></​a></td>'​ 
- icon=$(geticon "​$spag"​) + else 
- spagety "​$spg"​ "​$spag"​ "​$icon"​ + spoj+='<​img src="​./'​+geticon(a,i)+'" ​class="hadimg"</a></td>' 
- echo "​laycon.push($spag);"​ + spoj+='<​td>'​+a[i].qualis+'​<br>'​+a[i].quando+'​</​td>'​ 
-done <<< ​$(echo ​"$kingdoms"​)+ spoj+="​</tr>"
  
-# Plostenky 
-spg=$(echo "​$praseTC"​ | grep "<​phylum>​Platyhelminthes</​phylum>"​) 
-echo "var Platyhelminthes = new OpenLayers.Layer.Vector('​Overlay',​{attribution:'<​a href=\"​http://​brmlab.cz\">​Brmlab</​a>'​});"​ 
-spagety "​$spg"​ "​Platyhelminthes"​ "​$ICON_plostenkoid"​ 
-echo "​laycon.push(Platyhelminthes)"​ 
  
 + sam='<​a href="​./​det/'​+a[i].detid+'​.htm"​ target="​_blank"><​img src="​./​simg/'​+a[i].obr+'"​ alt="'​+a[i].qualis+'"​ class="​buttimg"></​a>'​
 + sam+='<​br><​span class="​butttext">'​
 + sam+='<​b>​Qualis:</​b>​ <a href="'​+wikisp+'"​ target="​_blank">'​+a[i].qualis+'</​a><​br>'​
 + if(a[i].imperium != ""​)
 + sam+='<​b>​Imperium:</​b>​ <a href="​https://​en.wikipedia.org/​wiki/'​+a[i].imperium+'"​ target="​_blank">'​+a[i].imperium+'</​a><​br>'​
 + if(a[i].regnum != ""​)
 +    sam+='<​b>​Regnum:</​b>​ <a href="​https://​en.wikipedia.org/​wiki/'​+a[i].regnum+'"​ target="​_blank">'​+a[i].regnum+'</​a><​br>'​
 + if(a[i].phylum != ""​)
 + sam+='<​b>​Phylum:</​b>​ <a href="​https://​en.wikipedia.org/​wiki/'​+a[i].phylum+'"​ target="​_blank">'​+a[i].phylum+'</​a><​br>'​
 + if(a[i].classis != ""​)
 + sam+='<​b>​Classis:</​b>​ <a href="​https://​en.wikipedia.org/​wiki/'​+a[i].classis+'"​ target="​_blank">'​+a[i].classis+'</​a><​br>'​
 + if(a[i].ordo != ""​)
 + sam+='<​b>​Ordo:</​b>​ <a href="​https://​en.wikipedia.org/​wiki/'​+a[i].ordo+'"​ target="​_blank">'​+a[i].ordo+'</​a><​br>'​
 + if(a[i].familia != ""​)
 + sam+='<​b>​Familia:</​b>​ <a href="​https://​en.wikipedia.org/​wiki/'​+a[i].familia+'"​ target="​_blank">'​+a[i].familia+'</​a><​br>'​
 + if(a[i].genus != ""​)
 + sam+='<​b>​Genus:</​b>​ <a href="​https://​en.wikipedia.org/​wiki/'​+a[i].genus+'"​ target="​_blank">'​+a[i].genus+'</​a><​br>'​
 + if(a[i].specie != ""​)
 + sam+='<​b>​Specie:</​b>​ <a href="'​+wikisp+'"​ target="​_blank">'​+a[i].specie+'</​a><​br>'​
 + if(a[i].bio != ""​)
 + sam+="<​b>​Biotope:</​b>​ "​+a[i].bio+"<​br>"​
 + if(a[i].quando != ""​)
 + sam+="<​b>​Quando:</​b>​ "​+a[i].quando+"<​br>"​
 + sam+="<​b>​Locus:</​b>​ "​+a[i].locus+"​ ("​+a[i].locplain+"​)<​br>"​
 + if(a[i].spec != ""​)
 + ​ sam+="<​b>​Spectator:</​b>​ "​+a[i].spec+"<​br>"​
 + if(a[i].micro != ""​)
 + sam+="<​b>​Microscopium:</​b>​ "​+a[i].micro+"​ ("​+a[i].microtyp+"​)<​br>"​
 + if(a[i].amp != ""​)
 + sam+="<​b>​Amplificatio:</​b>​ "​+a[i].amp+"<​br>"​
 + /* if [[ "​$des"​ != ""​ ]]; then
 + #   ​sam="​$sam<​b>​Depictio:</​b>​ $des<​br>"​
 + # fi */
 + if(a[i].vid != ""​)
 + sam+='<​b>​Video:</​b>​ <a href="'​+a[i].vid+'"​ target="​_blank">'​+a[i].vid+'</​a><​br>'​
 + sam+="</​span>"​
  
-echo "var controls ​{" + ox=a[i].x 
-echo "​ selector:​ new OpenLayers.Control.SelectFeature(laycon,​ { onSelect: createPopup,​ onUnselect: destroyPopup })" + oy=a[i].y 
-echo "​};"​ + } // Konec prochazeni a[]
-echo "​map.addControl(controls['​selector'​]);" +
-echo "​controls['​selector'​].activate();"​+
  
 + // Do not forget to print last line when FOR ends!
 + samicon=geticon(a,​i-1)
 + if(sam == ""​)
 + sam='<​table style="​hadtbl">'​+spoj+'</​table>'​
  
 + n[i]=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(a[i-1].x,​a[i-1].y).transform(epsg4326,​projectTo),​{description:"'"​+sam+"'"​},​{externalGraphic:​samicon,​graphicHeight:​24,​graphicWidth:​24,​graphicXOffset:​-12,​graphicYOffset:​-12});​
 + vectorLayerDynamic.addFeatures(n[i]);​
  
 +} // Konec armageddonu
  
 +var laycon = [vectorLayer,​vectorLayerDynamic];​
  
-echo "​function createPopup(feature) ​{+var controls = {selector: ​new OpenLayers.Control.SelectFeature(laycon{ onSelect: createPopup,​ onUnselect: destroyPopup })}; 
- echo "​ feature.popup = new OpenLayers.Popup.FramedCloud('​pop'​,+map.addControl(controls['​selector'​]);​ 
- echo "​ feature.geometry.getBounds().getCenterLonLat(),"​ +controls['​selector'​].activate();
- echo "​ null,"​ +
- echo "​ '<​div class=\"​markerContent\">'​+feature.attributes.description+'</​div>',"​ +
- echo "​ null,"​ +
- echo "​ false,"​ +
- echo "​ function() { controls['​selector'​].unselectAll(); }" +
- echo "​ );"​ +
- echo "​ //​feature.popup.closeOnMove = true;"​ +
- echo "​ map.addPopup(feature.popup);+
-echo "​}"​+
  
-echo "function ​destroyPopup(feature) {" +function ​createPopup(feature) 
- echo " feature.popup.destroy();" +
- echo "​ feature.popup = null;" + feature.popup ​= new OpenLayers.Popup.FramedCloud('​pop',​ 
-echo "}"+ feature.geometry.getBounds().getCenterLonLat(),​ 
 + null, 
 + '<​div class="markerContent">'​+feature.attributes.description+'</​div>',​ 
 + null, 
 + false, // Close button? 
 + function() { controls['​selector'​].unselectAll();​ } 
 + ); 
 + //feature.popup.closeOnMove ​true; 
 + map.addPopup(feature.popup)
 +}
  
 +function destroyPopup(feature) {
 + feature.popup.destroy();​
 + feature.popup = null;
 +}
  
-echo "​function kinchange() {" +// Run armageddon on initial load 
- echo "​ kinsel=document.getElementById('​kin'​);" +armageddon() 
- echo "​ kinopt=kinsel.options[kinsel.selectedIndex].text;"​ +</code>
- echo " for (var i = map.layers.length - 1; i >= 1; i--) {" +
- echo "​ map.removeLayer(map.layers[i]);"​ +
- echo "​ }"​ +
- echo "​ map.addLayer(window[kinopt])"​ +
-echo "​}"​+
  
-echo "​function plostenkoid() {" +==== Taxonomie dle rodoveho jmena ====
- echo " for (var i=map.layers.length-1;​i>​=1;i--) {" +
- echo "​ map.removeLayer(map.layers[i]);"​ +
- echo "​ }"​ +
- echo "​ map.addLayer(Platyhelminthes)"​ +
-echo "​}"​+
  
 +Script bere jako jediny parametr rodove jmeno a z wikipedie vyparsuje zbytek taxonomie.
 +<code bash tax.sh>
 +#!/bin/bash
  
-echo "</script>+wat=$(wget -q -O - "https://​en.wikipedia.org/​wiki/​Template:​Taxonomy/​$1"​ 2>/​dev/​null | tr -d '​\n'​ | sed -e $'s/<\/tr>/<​\/​tr>​\\n/​g'​ | grep "<tr>"​ | sed -e 's/<[^>]*>//​g'​ | grep -o -e "​^[a-zA-Z]*:​[a-zA-Z]*"​) 
-echo "</html>"+ 
 +echo $(echo "​$wat"​ | grep "​Domain:"​) 
 +echo $(echo "​$wat"​ | grep "​Kingdom:"​) 
 +echo $(echo "​$wat"​ | grep "​Phylum:"​) 
 +echo $(echo "​$wat"​ | grep "​Class:"​) 
 +echo $(echo "​$wat"​ | grep "​Order:"​) 
 +echo $(echo "​$wat"​ | grep "​Family:"​) 
 +echo $(echo "​$wat"​ | grep "​Genus:​")
 </​code>​ </​code>​
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki