Thank you Moritz,
I succeed to install python script, But.. my script use a custom lib in
a sub-folder for my shared functions, so g.extension fails with the line
"from gg.geolib import *". How may I manage this included lib ?
Without this include, install works (only on console, not with gui) and
allows to exec the script from console. I notice encoding manual is not
in UTF-8. Is it possible to force UTF-8 encoding ?. However, my custom
menu (toolboxes.xml) fails with the following error :
"/usr/local/grass-7.4.0svn/gui/wxpython/lmgr/frame.py", line
905, in OnMenuCmd
GUI(parent=self, giface=self._giface).ParseCommand(cmd)
File
"/usr/local/grass-7.4.0svn/gui/wxpython/gui_core/forms.py",
line 2834, in ParseCommand
raise gcmd.GException(e.value)
core.gcmd
.
GException
:
Unable to fetch interface description for command
'gzvibin.py'.
Details: [Errno 2] No such file or directory
Thank you for your help.
Frank
Le 26/04/2018 à 14:36, Moritz Lennert a écrit :
On 26/04/18 12:05, Frank David wrote:
Dear all,
I would like to setup the manual page of my python scripts in the gui. I
alreaday create them from --html-description and put them in my script
directory. But it does not work. I tried in ../docs/html/ but without
sccess. If I copy them in /usr/local/grass-7.4.0/docs/html it works !
Is there any way (html path variable ?) to use html from a personnal
directory ?
You can install your scripts as extension modules. Then the man pages
will be installed in .grass7/addons/docs.
The easiest would be to create a directory for each module with the
code, a ModuleName.html file with the sections DESCRIPTION, NOTES,
AUTHOR, etc (but not the output of --html-description, this will be
added automatically !), and a Makefile. You can then call g.extension
with the url= parameter pointing to that directory and everything will
be installed automatically. Look at any of the Python modules in
https://trac.osgeo.org/grass/browser/grass-addons/grass7 to see how to
write the Makefile and what the content of the .html file looks like.
Moritz
--
*Geophom*
327 rue de Vieille Cour 44521 OUDON
Tel +33(0)2 85 52 02 59 - Port +33(0)6 04 47 91 06
www.geophom.fr
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user