[GRASS-SVN] r64311 - grass-addons/tools/addons
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jan 25 03:02:39 PST 2015
Author: neteler
Date: 2015-01-25 03:02:39 -0800 (Sun, 25 Jan 2015)
New Revision: 64311
Modified:
grass-addons/tools/addons/grass-addons-index.sh
Log:
Addons manual: extract also the one line descriptions
Modified: grass-addons/tools/addons/grass-addons-index.sh
===================================================================
--- grass-addons/tools/addons/grass-addons-index.sh 2015-01-25 09:21:08 UTC (rev 64310)
+++ grass-addons/tools/addons/grass-addons-index.sh 2015-01-25 11:02:39 UTC (rev 64311)
@@ -50,23 +50,27 @@
<p>
<hr> <ul>" > index.html
- ls -1 *.html | sed 's/^/\<li style=\"margin-left: 20px\"\>\<a href=/g' | sed 's/$/\>/g' > /tmp/a.$TMP
+ ls -1 *.html | sed 's+^+<li style="margin-left: 20px"><a href=+g' | sed 's+$+>+g' > /tmp/a.$TMP
- ls -1 *.html | sed 's/\.html$/\<\/a\>\<\/li\>/g' > /tmp/b.$TMP
+ ls -1 *.html | sed 's+\.html$+</a>: +g' > /tmp/b.$TMP
- echo "</ul>" >> index.html
-
# get one-line perhaps like this:
-## awk '/NAME/,/KEYWORDS/' | grep ' - ' *.html
+## ls -1 *.html | awk '/NAME/,/KEYWORDS/' | grep ' - ' | cut -d'-' -f2-
# size
# ls -sh *.html | sed 's/^\ //g' | grep -v total | cut -d' ' -f1 | sed 's/$/\<br\>/g'> /tmp/c.$TMP
# paste -d' ' /tmp/a.$TMP /tmp/b.$TMP /tmp/c.$TMP >> index.html
+
+ awk '/NAME/,/KEYWORDS/' *.html | grep ' - ' | cut -d'-' -f2- | cut -d'<' -f1 > /tmp/c.$TMP
- paste -d' ' /tmp/a.$TMP /tmp/b.$TMP >> index.html
+ ls -1 *.html | sed 's+>$+></li>+g' > /tmp/d.$TMP
+ paste -d' ' /tmp/a.$TMP /tmp/b.$TMP /tmp/c.$TMP /tmp/d.$TMP >> index.html
+
+ echo "</ul>" >> index.html
+
echo "<hr>
-© 2013-2014 <a href="http://grass.osgeo.org">GRASS Development Team</a>, GRASS GIS ${major} Addons Reference Manual<br>" >> index.html
+© 2013-2015 <a href="http://grass.osgeo.org">GRASS Development Team</a>, GRASS GIS ${major} Addons Reference Manual<br>" >> index.html
echo "<i><small>`date -u`</small></i>" >> index.html
echo "</body></html>" >> index.html
rm -f /tmp/a.$TMP /tmp/b.$TMP /tmp/c.$TMP
More information about the grass-commit
mailing list