<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 5, 2016 at 9:06 PM, Martin Landa <span dir="ltr"><<a href="mailto:landa.martin@gmail.com" target="_blank">landa.martin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<span class=""><br>
2016-04-05 20:59 GMT+02:00 Ken Mankoff <<a href="mailto:mankoff@gmail.com">mankoff@gmail.com</a>>:<br>
> Where should this script go, and do you have advice on what language to use? My first thought was to make it a bash shell script and put it in ~/bin/ or ~/bin/grass/ and add that to GRASS_ADDON_PATH. Is there standard location for things like this?<br>
<br>
</span>I would choose ~/bin/grass (~/bin is not good choice because than your<br>
scripts will be in default PATH, so visible also outside of GRASS).<br></blockquote><div><br></div><div>If you are on Linux, I think you can copy your script to the same folder that is used by g.extension to install addon scripts. For me that is ~/.grass7/addons/scripts , but I assume that is the same on most Linux systems.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><br>
> And should it be in Python or bash? Seems like either works right now, but will bash be phased out in the future?<br></span></blockquote><div><br></div><div>From what I understand, there are no plans to phase out bash, so you could use that if that works best for you. For sharing with others python is probably the better choice, especially because of compatibility issues on Windows.<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">
<br>
</span>For simple/quick stuff I would use Bash. For the rest (more complex<br>
stuff, anything you want to publish as addons) I would choose Python.<br>
Please note that GRASS 7 supports only Python for Addons.<br></blockquote><div><br></div><div>That depends how you define addons. You cannot install shell scripts with g.extension, but if you put them in ~/.grass7/addons/scripts they should work fine. Having said that, Python would still be the better option.<br><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Ma<br>
<span class=""><font color="#888888"><br>
--<br>
Martin Landa<br>
<a href="http://geo.fsv.cvut.cz/gwiki/Landa" rel="noreferrer" target="_blank">http://geo.fsv.cvut.cz/gwiki/Landa</a><br>
<a href="http://gismentors.cz/mentors/landa" rel="noreferrer" target="_blank">http://gismentors.cz/mentors/landa</a><br>
</font></span><div class=""><div class="h5">_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a></div></div></blockquote></div><br></div></div>