[GRASS-user] Manual to own python script
Johannes Radinger
JRadinger at gmx.at
Thu May 19 10:58:40 EDT 2011
-------- Original-Nachricht --------
> Datum: Mon, 16 May 2011 13:56:10 +0200
> Von: Markus Neteler <neteler at osgeo.org>
> An: Johannes Radinger <JRadinger at gmx.at>
> CC: GRASS user list <grass-user at lists.osgeo.org>
> Betreff: Re: [GRASS-user] Manual to own python script
> On Mon, May 16, 2011 Markus Neteler:
> >> On Thu, May 12, 2011 at 2:17 PM, Johannes Radinger <jradinger at gmx.at>
> ...
> >> If you use a Makefile to install it, the approach as used for the
> >> existing Python
> >> scripts should work. Of course your script must use the GRASS parser.
> >
> > But there is no makefile needed to "install" a python script. It is just
> necessary to copy
> > the *.py into the /bin folder and the script can be called with *.py.
>
> Sure. But then you don't get the advantage of getting the doc
> autogenerated which
> is done by the Makefile.
>
> > Anyhow how would and installation with an makefile work?
>
> Just deposit the html file into the same directory.
> GRASS 6: name as "description.html"
> GRASS 7: name as "<modulename>.html"
>
> > the makefile of python scripts contain only little information,
>
> Yes, we tried to keep it minimalistic.
>
> > I tried to use the r.buffer makefile and adapt it to my script:
> >
> > 1 MODULE_TOPDIR = ../..
> > 2
> > 3 PGM = r.fidimo.py
> > 4
> > 5 include $(MODULE_TOPDIR)/include/Make/Script.make
> > 6
> > 7 default: script
>
> Perfect.
>
>
> > but what now?? How is that connected to the .html file?
>
> The magic is in $(MODULE_TOPDIR)/include/Make/Script.make if you want to
> see how it works. It discovers the HTML file and generates the manual page
> when running
> make
>
> > how do I have to install my script with the makefile (that is very new
> to me)?
>
> I suspect that you are already done.
> Please take a look at
>
> grass70/scripts/<some-script>/
>
> e.g.
> http://trac.osgeo.org/grass/browser/grass/trunk/scripts/
> or in your local copy.
Hello I am still not sure how to install the script. I've now a folder called MyScript including:
* Makefile
* MyScript.py
* MyScript.py.html
What should I do with this folder? I tried to put the folder into the bin directory but then I can't call the module anymore (nothing happens). Just for your information I work on Mac OSX and GRASS GIS 6.5SVN. I know it from the r.stream add-ons, I had to compile them and then put the add-ons manually into the bin folder and the html files into the html folder. But how to do it with my pyhton script?
/johannes
>
> Markus
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
--
NEU: FreePhone - kostenlos mobil telefonieren!
Jetzt informieren: http://www.gmx.net/de/go/freephone
More information about the grass-user
mailing list