[Kstars-devel] SVG finder charts, scripting improvements and automated finder chart generation
Akarsh Simha
akarshsimha at gmail.com
Sun Jan 13 19:22:09 UTC 2013
Hello
Here's what we have that's new in master:
+ Vector graphic stars, leading to full SVG export
Rafal already had implemented SVG image export as part of his GSoC
project. The stars were still being drawn as bitmaps, though. I've
made them vector graphics when exporting images, so SVGs produced by
KStars are now, really scalable when using solid star colours
(except for the Messier object images :D).
+ Improved D-Bus scripting interfaces and new DBus methods
I automated the DBus method exportImage(), which would earlier
invoke a dialog box. Now, it just uses previous settings for adding
a legend, although the legend is disabled by default while exporting
via DBus, and you need to pass a flag to exportImage()
I also added the following methods:
* getDSSURL -- constructs a DSS URL for given object / coordinates
* getSkyMapDimensions() -- returns widthxheight of the SkyMap
* getObjectDataXML() -- returns XML information about a sky object
* setApproxFOV() -- sets approximate FOV of the SkyMap in degrees
* getObservingWishListObjectNames() -- returns new-line separated list of names of objects in the observing wish-list
* getObservingSessionPlanObjectNames() -- same, but for the session list instead
So what does this mean? It means you can script a lot more things than
you could.
My motivation was that while the current "Printing Wizard" is par
excellence, it cannot iterate over the observing list. The Printing
Wizard that Rafal wrote is far more feature-rich and far more
flexible. But until we can actually automate it in a manner where it
can be iterated over the entire observing list without user
intervention, here's a solution through scripting.
I've attached a very ugly BASH script that I put together to generate
finder charts. The results are actually fairly impressive (at least to
me): http://bas.org.in/~akarsh/Finder-Charts.pdf
The generation of these is completely automated. You need to set up
the look and feel you want -- the star density, the FOV symbols etc --
and just add the objects to the session plan. Then run the script.
The script uses qdbus to invoke methods on KStars and iterates on the
session lists, generating completely SVG charts at 3 different zoom
levels, fetching the DSS image from the website, and putting them all
together with some minimal information using LaTeX for each
object. Then, the object's 1-page compiled finder charts are
concatenated using pdftk.
To run the script, you'll need (at least) the following:
kstars (duh)
qdbus (for DBus calls)
wget (for fetching DSS)
xmlstarlet (for parsing XML on the command-line)
inkscape (for SVG -> PDF conversion)
pdflatex (for compiling LaTeX)
additional latex packages -- float, graphicx, caption, subcaption, geometry
pdftk (for combining the PDFs)
ImageMagick's convert (manipulating the DSS image)
Regards
Akarsh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generate-finder-charts.sh
Type: application/x-sh
Size: 4861 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20130113/dacf1aa5/attachment.sh>
More information about the Kstars-devel
mailing list