#extends phd_site #implements respond #attr $Title = "XML Virtual FileSystem for Midnight Commander" #attr $Copyright = 2013 ## #def body_rst XML Virtual FileSystem for Midnight Commander ============================================= .. class:: head Download `XML Virtual FileSystem for Midnight Commander `_. git clone https://git.phdru.name/extfs.d.git git clone git://git.phdru.name/extfs.d.git See the `installation instructions `_. .. class:: head The script requires Midnight Commander 3.1+ (http://www.midnight-commander.org/), Python 2.4+ (http://www.python.org/). .. class:: head WHAT'S NEW Version 1.1.5 (2015-07-08) Set directories/files date/time to the last modification time of the XML file. .. class:: head Version 1.1.4 (2015-03-21) Minor documentation update. .. class:: head Version 1.1.3 (2015-03-14) Fix a minor bug in handling namespaces (lxml). .. class:: head Version 1.1.2 (2015-01-10) Changed link to installation instructions. .. class:: head Version 1.1.1 (2014-07-17) Fix a bug in removing excessive namespaces (lxml). .. class:: head Version 1.1.0 (2013-11-26) Show comment(s) before the root element. .. class:: head Version 1.0.0 (2013-11-23) With lxml.etree-based implementation show only child namespaces (calculated as combined namespaces minus parent's namespaces). .. class:: head 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 and prevents name clash when tag names coincide with the names of special files used by XML VFS. 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. Date/time for all directories/files set to the last modification time of the XML file. 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 .. class:: head Copyright (C) 2013-2015 PhiloSoft Design License: GPL #end def $phd_site.respond(self)