Bug 253305 - [Patch] Allow Marble to be controlled on commandline
Summary: [Patch] Allow Marble to be controlled on commandline
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR wishlist
Target Milestone: 1.0 (KDE 4.6)
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-05 12:33 UTC by Dik Takken
Modified: 2010-11-01 14:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dik Takken 2010-10-05 12:33:31 UTC
Version:           unspecified
OS:                Linux

It would be great if Marble could be controlled from the commandline, through DBus or other means. Then one could for instance use Marble to generate animations, periodically produce a world map and publish it on a web server, and so on. In a loop, one could send commands:

1. Load Google KML file
2. Export high resolution PNG file to disk
3. Repeat



Reproducible: Didn't try
Comment 1 Dennis Nienhüser 2010-10-06 00:16:52 UTC
The KDE version exports a D-Bus interface at org.kde.marble-$pid, where $pid is the PID of the running Marble application. You can use e.g.

qdbus org.kde.marble-20432 /MarbleWidget centerOn 8.409 48.9965

to center the map on the given coordinate. Opening of gpx files is possible with a similar function, though addPlacemarkFile (kml loading) does not seem to be exported currently.

Exporting of *high resolution* maps is currently not easily doable, although something like [1] is possible as a workaround.

Maybe you can give the current D-Bus interface a try and report here what is still missing.

[1] http://wiki.openstreetmap.org/wiki/KDE_Marble (Making a very high-res image)
Comment 2 Dennis Nienhüser 2010-10-25 21:28:54 UTC
Patch for kml loading is at http://reviewboard.kde.org/r/5691/
Comment 3 Dennis Nienhüser 2010-11-01 12:00:44 UTC
SVN commit 1191880 by nienhueser:

Deprecate (doxygen only because it is a slot) openGpxFile in favor of addGeoDataFile.
Deprecate addPlacemarkFile in favor of addGeoDataFile
Deprecate addPlacemarkData in favor of addGeoDataString
Deprecate removePlacemarkKey in favor of removeGeoData
Make addGeoDataFile, addGeoDataString, removeGeoData slots to be able to call them via DBus.
RB: 5691
BUG: 253305

 M  +1 -1      ControlView.h  
 M  +1 -5      MarbleTest.cpp  
 M  +1 -9      QtMainWindow.cpp  
 M  +1 -1      kdemain.cpp  
 M  +18 -4     lib/MarbleMap.cpp  
 M  +28 -5     lib/MarbleMap.h  
 M  +26 -11    lib/MarbleModel.cpp  
 M  +23 -4     lib/MarbleModel.h  
 M  +20 -5     lib/MarbleWidget.cpp  
 M  +27 -4     lib/MarbleWidget.h  
 M  +1 -8      marble_part.cpp  
 M  +7 -14     plugins/render/fileview/FileViewFloatItem.cpp  
 M  +1 -1      qtmain.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1191880
Comment 4 Dennis Nienhüser 2010-11-01 12:01:34 UTC
Please reopen if you need other command line functionality (please describe which).
Comment 5 Dik Takken 2010-11-01 14:40:39 UTC
Thanks a lot!!