viking-gps / viking

Viking is a free/open source program to manage GPS data (inc GPX, FIT, TCX and KML files). You can import and plot tracks, routes and waypoints, show OpenStreetMaps (OSM), Bing Aerial and other maps, generate Mapnik maps, geotag images, make new tracks, routes and waypoints, see real-time GPS position, etc. It is written mostly in C with GTK
http://sourceforge.net/projects/viking/
GNU General Public License v2.0
223 stars 55 forks source link

Update viking.xml.in warning about multiple --map #269

Closed jidanni closed 4 months ago

jidanni commented 4 months ago

Sure hope I edited the right file!! So hard to tell if this is the source or not. If not, then please at the top put "Do not edit!" Thanks.

rnorris commented 4 months ago

Yes you have edited one of the right files! The help.xml.in is used for the text man page. The .xml.in file is auto processed (inserts things like time, date, version) into the .xml for actual use.

However for command line reference and run-time configuration file detail is repeated in both the help.xml.in and then in the index.docbook (and other associated docbook xml files - in this case in particular commandline.xml) for the Help pages as used graphically at run-time.

Unfortunately I have not found a simple way to have a single file used by both systems and so thus far try to remember to update both in sync.

jidanni commented 4 months ago

Actually my workflow was using a nearby sentence in the paragraph I wanted to change I located two files using the GitHub search function.

I was certain that one of the files was an automatic post-processed version of the other file which must have been the source.

It was a total flip of the coin to figure out which was which but I guess I got lucky.

Apparently the only way to get around this issue would be to put some comment that says "If you are reading file A then don't edit this file. But if you are reading file B then go right ahead and edit this file. "

So the same header comment needs to be embedded in all the similar source files that might be around.

But of course the post processed version might even strip out such comments so...

Actually regarding this multiple --map parameter... The best solution of course would be to allow the user to actually add multiple layers if that's what they want.

rnorris commented 4 months ago

"Actually regarding this multiple --map parameter... The best solution of course would be to allow the user to actually add multiple layers if that's what they want."

True, but at the moment the internals support just a singular map id, but should be fairly straight forward to turn into a list of ids. That would be another issue to create.

ATM I have had a play around with making the man page and Help pages use common xml files, so it is possible and not difficult.

I will endeavour to upload this when complete (I've only done the command line parts - there is also the configuration files parts to do) and then include this comment about only one map currently supported by command line definition - as this edit will conflict with the way files are changing/parts moved into new files.

jidanni commented 4 months ago

Actually you're right. Instead of just changing the man page, it'd be best to wait until this feature arrives. So I'll open a different issue.