Hello Paolo, (I've CC-ed the dev list for tracking/archiving purposes).
I have taken the osm-helpers-0.3 archive and made a few changes:
use XDG_CONFIG_HOME directory for the location of the config files
make sure PREFIX/bin is created before copying stuff into it
These patches are attached.
I have also added an osmrules file for Romania, but we haven't yet decided on
some of the specifics,
so it doesn't make sense to make it public yet.
--
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
From 7e98a401a1667d2714c7ce34c563b363f3d73528 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Eddy=20Petri=C8=99or?= <[email protected]> Date: Mon, 15 Dec 2008 05:51:36 +0200 Subject: [PATCH] make sure PREFIX/bin is created before copying stuff into it --- Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index e5b2634..199d810 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,7 @@ install: all install osm-upload-changes.exe $(PREFIX)/lib/osm-helpers install osm-check.exe $(PREFIX)/lib/osm-helpers install osm-history.exe $(PREFIX)/lib/osm-helpers + mkdir -p $(PREFIX)/bin install osm-upload-changes $(PREFIX)/bin install osm-check $(PREFIX)/bin install osm-history $(PREFIX)/bin -- 1.5.6.5
From d6eca7398ed931e9e6aae5b2346df10b42c4c7ed Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Eddy=20Petri=C8=99or?= <[email protected]> Date: Mon, 15 Dec 2008 13:27:58 +0200 Subject: [PATCH] use XDG_CONFIG_HOME directory for the location of the config files See http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html This can be tested that is works with this: using System; using System.IO; class xdg { static public void Main () { string filename = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "foo"); Console.WriteLine ("Filename: {0}", filename); } } --- README | 12 +++++++----- osm-check.cs | 2 +- osm-upload-changes.cs | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README b/README index d779b9d..bbcda0c 100644 --- a/README +++ b/README @@ -26,8 +26,9 @@ in an XML format. This file can be inspected for mistakes and then fed to osm-upload-changes to upload to the OpenStreetMap database server. Other rules will be added in the next releases. -The rules are described in an XML file, loaded from $HOME/.osm-check.rules -by default (use the --rules option to specify a different file). +The rules are described in an XML file, loaded from +$HOME/.config/osm-helpers/osm-check.rules by default (use the --rules +option to specify a different file). Each abbreviation is specified with the following element: <abbr from="abbr." to="Abbreviation" /> @@ -52,9 +53,10 @@ when using some other mass-update scripts). This also means that the uploading process can be somewhat slow (depending mostly on the performance of the OpenStreetMap server). A username and password are required to upload the changes: currently they -are read from the file $HOME/.osm-auth, which contains the username in the -first line and the password in the second or, if that file is not present -they can be entered at the console prompt. +are read from the file $HOME/.config/osm-helpers/osm-auth, which +contains the username in the first line and the password in the second +or, if that file is not present they can be entered at the console +prompt. osm-upload-changes prints a dot for each successful upload, an asterisk for a change skipped because it's no longer valid, a letter if something diff --git a/osm-check.cs b/osm-check.cs index 0dbaa33..abc6e25 100644 --- a/osm-check.cs +++ b/osm-check.cs @@ -28,7 +28,7 @@ class OsmCheck { static void LoadRules (string filename) { if (filename == null) - filename = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), ".osm-check.rules"); + filename = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "osm-helpers/osm-check.rules"); XmlTextReader reader = new XmlTextReader (filename); List<string> abbrs = new List<string> (); List<string> ways = new List<string> (); diff --git a/osm-upload-changes.cs b/osm-upload-changes.cs index bdf5ee1..6d00388 100644 --- a/osm-upload-changes.cs +++ b/osm-upload-changes.cs @@ -83,7 +83,7 @@ Thanks! { try { TextReader reader = new StreamReader ( - Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), ".osm-auth")); + Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), ".config/osm-helpers/osm-auth")); user = reader.ReadLine (); password = reader.ReadLine (); if (user != null && password != null) @@ -98,7 +98,7 @@ Thanks! return; //Console.WriteLine ("{0}: {1} {2}, {3}", user, password, user.Length, password.Length); Environment.Exit (2); - Console.WriteLine ("Add the file ~/.osm-auth with your username and password, one per line."); + Console.WriteLine ("Add the file ~/.config/osm-helpers/osm-auth with your username and password, one per line."); user = password = null; Environment.Exit (2); } -- 1.5.6.5
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

