-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
*~ | ||
\#* | ||
tmp/ | ||
*.class | ||
respiro.jar | ||
revo/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
#!/bin/bash | ||
|
||
viki_url=http://download.wikimedia.org/eowiki/latest/eowiki-latest-all-titles-in-ns0.gz | ||
#viki_local=${HOME}/tmp/eoviki.gz | ||
viki_local=./tmp/eoviki.gz | ||
viki_local=${HOME}/tmp/eoviki.gz | ||
#viki_local=./tmp/eoviki.gz | ||
#viki_listo=${HOME}/tmp/inx_tmp/viki_listo.xml | ||
|
||
#wget -nv ${viki_url} -O $viki_local | ||
curl -Lo $viki_local ${viki_url} | ||
|
||
echo '<?xml version="1.0"?>' | ||
echo '<viki>' | ||
echo '<?xml version="1.0"?>' | ||
echo '<viki>' | ||
# Elfiltru tiujn titolojn, kiuj ne enhavas ion krom literoj kaj strekoj, | ||
# la dua litero estu minusklo por eksludi mallongigojn. | ||
# Ni akceptas ankaŭ literojn ciriclajn ktp. pro simpligo. | ||
# Restos tiel proksimume 2/3 de la titoloj. La substrekon ni jam anstataŭigas per spaco(?) | ||
gzip -d < $viki_local | grep -E "^[[:upper:]][-[:lower:]][-_[:alpha:]]*$" | sed -E 's%^(.*)$%<v>\1</v>%' # | sed 's/_/ /g' | ||
# Restos tiel proksimume 2/3 de la titoloj. | ||
gzip -d < $viki_local | grep -E "^[[:upper:]][-[:lower:]][-_[:alpha:]]*$" | sed -E 's%^(.*)$%<v>\1</v>%' | ||
|
||
echo '</viki>' | ||
|
||
# por ŝarniri la viki-titolojn kun la derivaĵoj/kapvorotj ni bezonas ekstrakti poste | ||
# el inx_kat.xml parojn @mrk=k laŭ //v@mrk/k | ||
# | ||
# sur tiu paĝo estas xml-iloj konsiderindaj por tiu tasko: https://github.com/dbohdan/structured-text-tools#xml-html | ||
|