Re: [Flightgear-devel] XMLgrep

2012-05-24 Thread Erik Hofman
On Wed, 2012-05-23 at 16:53 +0200, James Turner wrote:
 
 
 
 On 23 May 2012, at 13:09, Erik Hofman e...@ehofman.com wrote:
 
  
  Hi, 
  
  Year ago I added xmlgrep to the utils directory of flightgear and I have
  been developing it since. But I think it is time to remove it from the
  flightgear package and reference it tot the new location instead
  (http://www.adalin.com)
  
  Does anyone have any objections for me removing the current outdated
  version from git and just add a README with an URL?
 
 Sounds a good idea to me. 

Done.

Erik


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] XMLgrep

2012-05-23 Thread Erik Hofman

Hi, 

Year ago I added xmlgrep to the utils directory of flightgear and I have
been developing it since. But I think it is time to remove it from the
flightgear package and reference it tot the new location instead
(http://www.adalin.com)

Does anyone have any objections for me removing the current outdated
version from git and just add a README with an URL?

Erik


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] XMLgrep

2012-05-23 Thread James Turner




On 23 May 2012, at 13:09, Erik Hofman e...@ehofman.com wrote:

 
 Hi, 
 
 Year ago I added xmlgrep to the utils directory of flightgear and I have
 been developing it since. But I think it is time to remove it from the
 flightgear package and reference it tot the new location instead
 (http://www.adalin.com)
 
 Does anyone have any objections for me removing the current outdated
 version from git and just add a README with an URL?

Sounds a good idea to me. 

James


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] xmlgrep (and something else :-)

2008-08-17 Thread Melchior FRANZ
And by the way: this has already pointed to a bug:


* Melchior FRANZ -- Saturday 16 August 2008:
   $ lsprop|grep --color /systems/refuel/type
[...]
   $FG_ROOT/Aircraft/Lightning/lightning-set.xml:276: /systems/refuel/type = 
 probe
   $FG_ROOT/Aircraft/A-6E/A-6E-set.xml:151: /sim/systems/refuel/type = probe
 ^\___shouldn't be in /sim/  :-)


 Use --help/-h for a few options. More options to come ...

Yeah. There's now a --format/-f option, which you can use to
change the output format. Default is and was %f:%n: %p = \%v\.
Fields are:

%f  file path
%l  line number
%c  column number
%p  property path
%t  property type
%v  value

Example:   $ lsprop --format=%p %v

m.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] xmlgrep (and something else :-)

2008-08-16 Thread Melchior FRANZ
As you may have noticed, Erik has recently overhauled (or rather
rewritten) xmlgrep. That's a fast utility for finding properties
in an XML file. It works with any XML file, not just our internal
PropertyList flavor.

In many cases a simple recursive grep isn't good enough. If you
do a simple search for name, because you want view names
listed, then you get this:

  $ grep 'name' $FG_ROOT/preferences.xml
  name type=stringHelvetica.txf/name
  nameCockpit View/name
  [...]

The first one doesn't look like a view name at all. More like
a font name? You could let grep display a few lines before and
after the match so that you get some context. But that's a bit
messy and painful to use as input for further commands. xmlgrep
allows to adddress XML elements with their full path, e.g.

  /PropertyList/sim/view/name



So far the altruistic part. Actually, I just wanted to introduce
another, similar tool. ;-)  It doesn't want to compete with xmlgrep
and was never meant to. It's really a byproduct of something else
for which I needed it. It works only for PropertyLists and is
slower than xmlgrep. It doesn't search for any particular pattern,
but just lists them, so you will need to pipe the output into
e.g. grep:   http://members.aon.at/mfranz/lsprop  [4.8 kB]

lsprop lists all properties in the files given on the command line,
or, if none were specified, then of $FG_ROOT/preferences.xml and
$FG_ROOT/Aircraft/*/*-set.xml. It follows all includes and treats
the omit-node flag correctly (I hope :-).

Example:

  $ lsprop|grep --color /systems/refuel/type
  $FG_ROOT/Aircraft/ufo/ufo-set.xml:522: /systems/refuel/type = boom
  $FG_ROOT/Aircraft/ufo/ufo-set.xml:523: /systems/refuel/type[1] = probe
  $FG_ROOT/Aircraft/f16/f16-set.xml:158: /systems/refuel/type = boom
  $FG_ROOT/Aircraft/KC135/KC135-set.xml:169: /systems/refuel/type = boom
  $FG_ROOT/Aircraft/a4/a4f-set.xml:183: /systems/refuel/type = probe
  $FG_ROOT/Aircraft/A-10/A-10-set.xml:1034: /systems/refuel/type = boom
  $FG_ROOT/Aircraft/f-14b/f-14b-set.xml:549: /systems/refuel/type = probe
  $FG_ROOT/Aircraft/Lightning/lightning-set.xml:276: /systems/refuel/type = 
probe
  $FG_ROOT/Aircraft/A-6E/A-6E-set.xml:151: /sim/systems/refuel/type = probe

Use --help/-h for a few options. More options to come ...

m.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel