qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.55k stars 2.99k forks source link

Macro like recording - export QGIS actions as Python code #13042

Open qgib opened 14 years ago

qgib commented 14 years ago

Author Name: Nathan Woodrow (@NathanW2) Original Redmine Issue: 2982

Redmine category:python_plugins


The general idea is that QGIS would send the the Python code for each action (or just the more common ones) that it preforms. Code could be sent to file or console so that people could copy and paste it into a script and run it later. Of course you wouldn't do this all the time only when a certain trigger is set in the Python console or a config screen.

For example, say the user opens a table from a [[PostGIS]] database and sets its style to fill solid red. QGIS would output the needed Python code to open the table, add it to the map canvas and change its color.

[[MapInfo]] does this with [[MapBasic]] and I know it was handy for me to learn how to use the [[MapBasic]] APIs when I first started by just watching what it generated.

I'm not sure how hard this would be or even if anyone else thinks it's worth having but could be handy for people to learn the QGIS python API and help with writing scripts.

qgib commented 12 years ago

Author Name: Alister Hood (@AlisterH)


It seems there is a Python macro recorder for Blender - maybe this could provide some inspiration/code.


qgib commented 12 years ago

Author Name: Jürgen Fischer (@jef-n)


qgib commented 12 years ago

Author Name: Pirmin Kalberer (Pirmin Kalberer)


qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


yportier commented 4 years ago

Perhaps the Layer Styling tab could be a good place to start ?