Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python.announce > #1152 > unrolled thread

XML VFS 1.0.1 for Midnight Commander

Started byOleg Broytman <phd@phdru.name>
First post2013-11-25 14:06 +0100
Last post2013-11-25 14:06 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python.announce


Contents

  XML VFS 1.0.1 for Midnight Commander Oleg Broytman <phd@phdru.name> - 2013-11-25 14:06 +0100

#1152 — XML VFS 1.0.1 for Midnight Commander

FromOleg Broytman <phd@phdru.name>
Date2013-11-25 14:06 +0100
SubjectXML VFS 1.0.1 for Midnight Commander
Message-ID<mailman.3221.1385455711.18130.python-announce-list@python.org>
Hello!

I'm pleased to announce an XML Virtual FileSystem for Midnight Commander
version 1.0.1.


WHAT IS IT
   View an XML file in Midnight Commander as a filesystem.


WHAT'S NEW in version 1.0.1 (2013-11-24)
   Fixed a few minor bugs.

WHAT'S NEW in version 1.0.0 (2013-11-23)
   With lxml.etree-based implementation show only child namespaces
   (calculated as combined namespaces minus parent's namespaces).

WHAT'S NEW in version 0.6.0 (2013-11-22)
   Refactored _list() and attrs2text() to be completely generic.

WHAT'S NEW in version 0.5.0 (2013-11-19)
   Added lxml.etree-based implementation.

WHAT'S NEW in version 0.4.0 (2013-11-19)
   Added ElementTree-based implementation.

WHAT'S NEW in version 0.3.0 (2013-11-16)
   Initial release. Implementation based on minidom.


WHERE TO GET
   Home page: http://phdru.name/Software/mc/xml.html
   Download:  http://phdru.name/Software/mc/xml
    git clone http://git.phdru.name/extfs.d.git
     git clone git://git.phdru.name/extfs.d.git

   Installation instructions: http://phdru.name/Software/mc/INSTALL.html


The VFS represents tags as directories; the directories are numbered to
distinguish tags with the same name; numbering also helps to sort tags by their
order in XML instead of sorting them by name. Attributes, text nodes and
comments are represented as text files; attributes are shown in a file named
"attributes", attributes are listed in the file as name=value lines (I
deliberately ignore a small chance of newline characters in values); names and
values are reencoded to the console encoding. Text nodes and comments are
collected in a file named "text", stripped and reencoded. The filesystem is
read-only.

Implementation based on minidom doesn't understand namespaces, it just shows
them among other attributes. ElementTree-based implementation doesn't show
namespaces at all. Implementation based on lxml.etree shows namespaces in a
separate file "namespaces".

It is useful to have a top-down view on an XML structure but it's especially
convenient to extract text values from tags. One can get, for example, a
base64-encoded image - just walk down the VFS to the tag's directory and copy
its text file to a real file.

The VFS was inspired by a FUSE xmlfs: https://github.com/halhen/xmlfs


AUTHOR
   Oleg Broytman <phd@phdru.name>

COPYRIGHT
   Copyright (C) 2013 PhiloSoft Design

LICENSE
   GPL

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            phd@phdru.name
           Programmers don't die, they just GOSUB without RETURN.

[toc] | [standalone]


Back to top | Article view | comp.lang.python.announce


csiph-web