[GRASS-SVN] r65891 - grass-addons/tools/addons
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 11 07:13:09 PDT 2015
Author: martinl
Date: 2015-08-11 07:13:09 -0700 (Tue, 11 Aug 2015)
New Revision: 65891
Removed:
grass-addons/tools/addons/build-index.sh
Modified:
grass-addons/tools/addons/README.txt
grass-addons/tools/addons/build-xml.py
grass-addons/tools/addons/compile-xml.sh
grass-addons/tools/addons/compile.sh
grass-addons/tools/addons/grass-addons.sh
grass-addons/tools/addons/update_manual.py
Log:
update readme, clean up, basic documentation
Modified: grass-addons/tools/addons/README.txt
===================================================================
--- grass-addons/tools/addons/README.txt 2015-08-11 13:14:50 UTC (rev 65890)
+++ grass-addons/tools/addons/README.txt 2015-08-11 14:13:09 UTC (rev 65891)
@@ -1,30 +1,39 @@
-These scripts run on grass.osgeo.org, currently in
-/home/martinl/src/grass-addons/tools/addons/
+These scripts are used for building addons modules (on build server,
+currently at the CTU in Prague) and publishing their manual pages on
+publishing server (grass.osgeo.org).
WORKFLOW
-TODO: - please update
+On building server are run two scripts (see crontab.build):
-* build-index.sh --? still used?
-* build-xml.py
-* compile.sh --? still used?
-* compile-xml.sh
-* grass-addons-index.sh
-* grass-addons-public.sh
-* grass-addons-publish.sh
-* grass-addons.sh
-* update_manual.py
+1) grass-addons.sh to recompile GRASS locally
-crontab file: for the server.
+2) grass-addons-build.sh to build addons modules on build server, the
+script provides tarballs with created addons manual pages and logs for
+publishing
+Result is copied to publishing server by (see crontab.publish):
+3) grass-addons-publish.sh downloads provided tarballs (2) and creates
+index.html page on publishing server
+
+SCRIPTS OVERVIEW
+
+* build-xml.py - support Python script called by compile-xml.sh
+* compile.sh - support script to compile GRASS Addons modules called by compile-xml.sh
+* compile-xml.sh - creates XML file for each addons module (used by g.extension)
+* grass-addons-index.sh - creates ovewview index page, called by grass-addons-publish.sh
+* grass-addons-build.sh - called on Building server (2)
+* grass-addons-publish.sh - called on Publishing server (1)
+* grass-addons.sh - compiles GRASS and Addons, called by grass-addons-build.sh
+* update_manual.py - support Python script which modifies addons
+ manual pages for Publishing server (called by grass-addons-build.sh)
+
RESULTS
* manual pages at: http://grass.osgeo.org/grass70/manuals/addons/
-* XML file at ...?
-* Windows binaries at: ...
+* XML file at: https://grass.osgeo.org/addons/
-
SEE ALSO
https://trac.osgeo.org/grass/wiki/AddOnsManagement
Deleted: grass-addons/tools/addons/build-index.sh
===================================================================
--- grass-addons/tools/addons/build-index.sh 2015-08-11 13:14:50 UTC (rev 65890)
+++ grass-addons/tools/addons/build-index.sh 2015-08-11 14:13:09 UTC (rev 65891)
@@ -1,75 +0,0 @@
-#!/bin/sh
-
-# Markus Neteler 9/2002
-# updated for GRASS GIS Addons, 2013
-
-# Generates index.html for existing directory
-
-if test -z "$1" ; then
- echo "Missing DEST"
- exit 1
-fi
-
-DEST="$1"
-MAJOR="$2"
-MINOR="$3"
-
-cd $DEST/grass${MAJOR}${MINOR}/manuals/addons
-
-if test -f index.html ; then
- mv index.html index.html.bak
-fi
-
-TMP=$$
-
-echo "<html>
-<head>
- <title>GRASS GIS ${MAJOR} Addons Manual pages</title>
- <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
- <meta name=\"Author\" content=\"GRASS Development Team\">
- <link rel=\"stylesheet\" href=\"grassdocs.css\" type=\"text/css\">
-</head>
-<body width=\"100%\">
-<h1>GRASS GIS ${MAJOR} Addons Manual pages</h1>
-
-<a href=\"http://grass.osgeo.org\">GRASS GIS</a> is free software, anyone may develop his/her own extensions.
-The <a href=\"http://grasswiki.osgeo.org/wiki/AddOns/GRASS_${MAJOR}\">GRASS GIS Add-ons Wiki page</a>
-contains a growing list of links to GRASS GIS extensions,
-which are currently not part of the standard distribution. They can be easily
-added to the local installation through the graphical user interface
-(Menu - Settings - Addons Extension - Install) or via the <a href=\"http://grass.osgeo.org/grass${MAJOR}${MINOR}/manuals/g.extension.html\">g.extension</a> command.
-<p>
-<i>These manual pages are updated regularly.</i>
-<p>
-How to contribute?
-<p>
-Please upload your add-ons to <strong>GRASS Add-ons repository</strong>.
-Further details about gaining access to our SVN repository can be found in
-<a href=\"http://trac.osgeo.org/grass/wiki/HowToContribute#WriteaccesstotheGRASS-Addons-SVNrepository\">this document</a>.
-<p>
-<hr>
-<ul>
-" > index.html
-ls -1 *.html | sed 's/^/\<li style=\"padding: 5px\"\>\<a href=/g' | sed 's/$/\>/g' > /tmp/a.$TMP
-ls -1 *.html | sed 's/$/\<\/a\>\<\/li\>/g' | sed 's/.html//g' > /tmp/b.$TMP
-
-# get one-line perhaps like this:
-## awk '/NAME/,/KEYWORDS/' | grep ' - ' *.html
-
-# 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
-
-paste -d' ' /tmp/a.$TMP /tmp/b.$TMP >> index.html
-
-year=`date +%Y`
-echo "</ul><hr>
-© 2013-${year} <a href="http://grass.osgeo.org">GRASS Development Team</a>, GRASS GIS 7 Addons Reference Manual<br>" >> index.html
-echo "<i>`date -u`</i>" >> index.html
-echo "</body></html>" >> index.html
-rm -f /tmp/a.$TMP /tmp/b.$TMP /tmp/c.$TMP
-
-chgrp -R grass $DEST/grass${MAJOR}${MINOR}/manuals/addons
-chmod -R g+w $DEST/grass${MAJOR}${MINOR}/manuals/addons
-
-exit 0
Modified: grass-addons/tools/addons/build-xml.py
===================================================================
--- grass-addons/tools/addons/build-xml.py 2015-08-11 13:14:50 UTC (rev 65890)
+++ grass-addons/tools/addons/build-xml.py 2015-08-11 14:13:09 UTC (rev 65891)
@@ -1,5 +1,7 @@
#!/usr/bin/env python
+# Support Python script used by compile-xml.sh
+
import os
import sys
import glob
Modified: grass-addons/tools/addons/compile-xml.sh
===================================================================
--- grass-addons/tools/addons/compile-xml.sh 2015-08-11 13:14:50 UTC (rev 65890)
+++ grass-addons/tools/addons/compile-xml.sh 2015-08-11 14:13:09 UTC (rev 65891)
@@ -19,8 +19,6 @@
# update GRASS Addons SVN
(cd ..; svn up || (svn cleanup && svn up))
-### export GISRC=$HOME/grassdata/demolocation/.grassrc70
-
# compile AddOns for GRASS 7 and GRASS 6.5
compile ../../grass7 ~/src/grass70_release/dist.x86_64-unknown-linux-gnu /tmp/.grass7/addons
compile ../../grass6 ~/src/grass64_release/dist.x86_64-unknown-linux-gnu /tmp/.grass6/addons
Modified: grass-addons/tools/addons/compile.sh
===================================================================
--- grass-addons/tools/addons/compile.sh 2015-08-11 13:14:50 UTC (rev 65890)
+++ grass-addons/tools/addons/compile.sh 2015-08-11 14:13:09 UTC (rev 65891)
@@ -1,5 +1,7 @@
#!/bin/sh
+# This script compiles GRASS Addons, it's called by compile-xml.sh.
+
if [ -z "$3" ]; then
echo "usage: $0 svn_path topdir addons_path [separate]"
echo "eg. $0 ~/src/grass-addons/grass7/ ~/src/grass_trunk/dist.x86_64-unknown-linux-gnu ~/.grass7/addons"
Modified: grass-addons/tools/addons/grass-addons.sh
===================================================================
--- grass-addons/tools/addons/grass-addons.sh 2015-08-11 13:14:50 UTC (rev 65890)
+++ grass-addons/tools/addons/grass-addons.sh 2015-08-11 14:13:09 UTC (rev 65891)
@@ -66,9 +66,6 @@
cp ${m}docs/html/* $dst
fi
done
-
- cd $DIR/grass-addons/tools/addons
- ./build-index.sh $MANDIR ${major} ${minor}
}
export GRASS_SKIP_MAPSET_OWNER_CHECK="1"
Modified: grass-addons/tools/addons/update_manual.py
===================================================================
--- grass-addons/tools/addons/update_manual.py 2015-08-11 13:14:50 UTC (rev 65890)
+++ grass-addons/tools/addons/update_manual.py 2015-08-11 14:13:09 UTC (rev 65891)
@@ -1,5 +1,8 @@
#!/usr/bin/python
+# Support Python scripts which modifies Addons manual pages for
+# publishing server
+
import os
import sys
import re
More information about the grass-commit
mailing list