From 609164d2f48bc41a5d0dec2a39454f73b054bf57 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 16 Nov 2013 06:44:38 +0400 Subject: [PATCH] In MC 4.7+ the format of the cd command was changed --- torrent | 11 ++++++----- xml | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/torrent b/torrent index b02c90d..514edf3 100755 --- a/torrent +++ b/torrent @@ -10,11 +10,12 @@ For older versions put it in /usr/[local/][lib|share]/mc/extfs and add a line "torrent" to the /usr/[local/][lib|share]/mc/extfs/extfs.ini. Make the script executable. -Run this "cd" command in the Midnight Commander (in the "bindings" file the -command is "%cd"): cd file#torrent, where "file" is the name of your torrent -metafile. The VFS lists all files and directories from the torrent metafile; -all files appear empty, of course, but the sizes are shown. Filenames are -reencoded from the metafile's encoding/codepage to the current locale. +For mc 4.7+ run this "cd" command in the Midnight Commander (in the "bindings" +file the command is "%cd"): cd file/torrent://; In older versions it is +cd file#torrent, where "file" is the name of your torrent metafile. The VFS +lists all files and directories from the torrent metafile; all files appear +empty, of course, but the sizes are shown. Filenames are reencoded from the +metafile's encoding/codepage to the current locale. Along with the files/directories in the torrent metafile the VFS also presents meta information - in the form of files in .META directory. The size and diff --git a/xml b/xml index 1c98c86..618c65b 100755 --- a/xml +++ b/xml @@ -9,17 +9,18 @@ For older versions put it in /usr/[local/][lib|share]/mc/extfs and add a line "xml" to the /usr/[local/][lib|share]/mc/extfs/extfs.ini. Make the script executable. -Run this "cd" command in the Midnight Commander (in the "bindings" file the -command is "%cd"): cd file.xml#xml, where "file.xml" is the name of your xml -file. +For mc 4.7+ run this "cd" command in the Midnight Commander (in the "bindings" +file the command is "%cd"): cd file/xml://; In older versions it is +cd file#xml, where "file" is the name of your XML file. The VFS represents tags as directories; the directories are numbered to distinguish tags with the same name; also numbering 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 there is a newline character in values). The -filesystem is read-only. +deliberately ignore a small chance there is a newline character in values). +Text nodes and comments are collected in a file named "text". The filesystem is +read-only. The VFS was inspired by a FUSE xmlfs: https://github.com/halhen/xmlfs -- 2.39.2