Re: [GRASS-user] Using a script as a GRASS addon
Hei Bernado, On Linux you make the script executable: chmod ugo+x path_to/r.ls.func_connectivity.py You can rename it to r.ls.func_connectivity if you want to get rid of the .py ending. Furthermore, the script should be located in directory that is part of your PATH environment variable. e.g. ~/.grass7/addons/scripts/ If the script has a proper shebang (#!/usr/bin/env python3) the python interpreter should be launched when you call the script. On MS Windows things are a bit different and you need a -bat wrapper script… Please also have a look at https://github.com/wenzeslaus/r.example.plus Which is a great start for writing addons, and provides you with a make recipe to install things as usual addons… Hope that helps, Stefan From: grass-user On Behalf Of Bernardo Santos via grass-user Sent: mandag 1. august 2022 14:00 To: GRASS User List Subject: [GRASS-user] Using a script as a GRASS addon Dear all, I have been following some forums and instructions from GRASS documentation to be able to write new GRASS addons - or what I call an addon, basically a python script that does what I want, and follow the same standards of published GRASS addons, with description of the addon and usage, parameters etc, followed be the script with procedures. It seems to work, but I am not sure how I can test them as GRASS addons. Right now, to be able to run them I need to call python like this: python r.ls.func_connectivity.py input=map1 output=map1_func_connect gap_crossing=60 Is there a way I can run that without needing to call python and to use the ".py" in the end of the script? Like a folder where I can place the files, or a way to build it as a formal GRASS addon. What I want is to be able to test it and use it (even if only locally for now) as r.ls.func_connectivity input=map1 output=map1_func_connect gap_crossing=60 Is this documented somewhere? Best wishes, Bernardo ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Using a script as a GRASS addon
Dear all, I have been following some forums and instructions from GRASS documentation to be able to write new GRASS addons - or what I call an addon, basically a python script that does what I want, and follow the same standards of published GRASS addons, with description of the addon and usage, parameters etc, followed be the script with procedures. It seems to work, but I am not sure how I can test them as GRASS addons. Right now, to be able to run them I need to call python like this: python r.ls.func_connectivity.py input=map1 output=map1_func_connect gap_crossing=60 Is there a way I can run that without needing to call python and to use the ".py" in the end of the script? Like a folder where I can place the files, or a way to build it as a formal GRASS addon. What I want is to be able to test it and use it (even if only locally for now) as r.ls.func_connectivity input=map1 output=map1_func_connect gap_crossing=60 Is this documented somewhere? Best wishes,Bernardo ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Fwd: [OSGeo-Discuss] FOSS4G Community Sprint 2022
FYI :) -- Forwarded message - De: Astrid Emde (OSGeo) via Discuss Date: dom, 31 jul 2022 a las 17:02 Subject: [OSGeo-Discuss] Less than a month to the FOSS4G Community Sprint 2022 - August 27th and 28th To: OSGeo Projects , Announce < annou...@lists.osgeo.org>, Discuss Dear FOSS4G community, as you all know, in less than a month, between August the 27th and 28th, the University of Florence will be stage for the gathering of the developers, translators, power users and anyone interested in their most important hands-on meeting of the year: the codesprint of FOSS4G 2022 This is a gentle reminder to add your name and project to this year's wiki page: https://wiki.osgeo.org/wiki/FOSS4G_2022/Community_sprint The better we get an idea of the number of participants and the better we will be able to organize rooms and supplies. And remember, this year we invite seasoned community members to donate time to guide new members through the setup of the development environment or translation tools of their projects. Please state availability in the wiki page. We are looking forward to meeting you! The Codesprint Organization Committee ___ Discuss mailing list disc...@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/discuss ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user