- docmd: new version 1.2
- Posted by Thomas Lauer on July 4th, 2008
Changes
-------
This new version 1.2 of docmd includes the following changes:
1. domcd now supports not only patterns and regular expressions as the
source for file or directory names to process. This version can also
read a list of such names from one or more @LIST files. Among other
things, this allows docmd to be used in command-line pipes, such that it
reads and processes the standard output of another program (or indeed of
another invocation of itself).
2. docmd can be extended with plugin extensions (this is still a rather
experimental feature, so it may change or even disappear in future
versions).
Extensions are small (or not so small) code snippets written in Idle
which docmd includes on the fly (see the -ext= switch). With this
powerful facility docmd can be extended to deal with almost any file
searching problem. As this is a fairly advanced feature, documentation
is (and, to protect the innocent, will continue to be) thin on the
ground. However, included in the distribution is an example plugin
extension, complete with some (hopefully helpful) comments on how it all
works.
Direct download link: http://thomaslauer.com/download/docmd12.zip
(The zip file contains full source code, the compiled binaries and HTML
documentation.)
What is docmd?
--------------
This is a tool I've written some time ago for internal use. I have now
polished it somewhat and put up some preliminary documentation and a zip
file with the executable as well as the source code.
Basically, what docmd does is to traverse a whole drive or a directory
tree and print or perform a command on every file and/or directory
that's found. Patterns supported by docmd are either of the usual
wildcard variety or based on the full set of Perl regular expressions.
Beyond these patterns entries can be selected according to their size,
date and time stamps and much more. In fact, the selection criteria and
the commands generated can be pretty complex, as docmd understands a
sort of simple expression language for both.
Have a look: http://thomaslauer.com/comp/docmd
Please post bugs and comments either here or via the links given in the
readme included with the zip.
--
cheers thomasl
mail: thomas.lauer@virgin.net
web : http://thomaslauer.com/start
- Posted by dewey edwards on July 4th, 2008
On Fri, 04 Jul 2008 10:54:44 +0100, Thomas Lauer wrote:
<snip>
Liked the old. I'm sure I'll like the new and improve more!
Thank you.
- Posted by hummingbird on July 4th, 2008
On Fri, 04 Jul 2008 10:54:44 +0100 'Thomas Lauer'
wrote this on alt.comp.freeware:
Thomas, the sample id3.ext file is not actually included in the
zipfile I downloaded above.
--
"All truth passes through three stages.
First, it is ridiculed, second it is violently opposed,
and third, it is accepted as self-evident"
(Arthur Schopenhauer)
- Posted by Thomas Lauer on July 4th, 2008
hummingbird <hummingbird@127.0.0.1> wrote:
Corrected, just download the zip once more. And THX for the hint.
--
cheers thomasl
web: http://thomaslauer.com/start
- Posted by hummingbird on July 4th, 2008
On Fri, 04 Jul 2008 16:16:36 +0100 'Thomas Lauer'
wrote this on alt.comp.freeware:
Yes it's there now thanks Thomas.
I'm going to take some pleasure in trying out this kool new
feature over the next few days and will report back :-)
--
"All truth passes through three stages.
First, it is ridiculed, second it is violently opposed,
and third, it is accepted as self-evident"
(Arthur Schopenhauer)
- Posted by hummingbird on July 5th, 2008
On Fri, 04 Jul 2008 16:46:39 +0100 'hummingbird'
wrote this on alt.comp.freeware:
Well Thomas, I've tried a range of commandline syntax and none
will produce the output I aimed for. In each case the playlist.m3u
is created but is empty.
Here's the simple syntax which I believe should work according
to the documentation:
Of course I'd also really like ID3.ext to support ID3Genre==
--
"All truth passes through three stages.
First, it is ridiculed, second it is violently opposed,
and third, it is accepted as self-evident"
(Arthur Schopenhauer)
- Posted by hummingbird on July 5th, 2008
On Sat, 05 Jul 2008 14:12:18 +0100 'hummingbird'
wrote this on alt.comp.freeware:
I've also tried the above with "-mode=f" (without " "), but still
no luck.
--
"All truth passes through three stages.
First, it is ridiculed, second it is violently opposed,
and third, it is accepted as self-evident"
(Arthur Schopenhauer)
- Posted by Thomas Lauer on July 5th, 2008
hummingbird <hummingbird@127.0.0.1> wrote:
1. Where's your pattern? Without a pattern (say '*.mp3') docmd won't do
anything but spit out 'error: pattern is missing'.
2. If you enclose a switch argument in double quotes, you have to
enclose *the whole switch* in double quotes (check the examples in the
documentation):
(Technically, double quotes are not necessarily illegal characters
*inside an argument*, so if you do it your way the argument is
interpreted to contain the double quotes literally: a fine case of
garbage in, garbage out. I'll include a hint in the documentation;-).)
3. If it still doesn't work, perhaps your ID3 tags are Unicode-encoded
or in another way unreadable by the ID3 extension. As stated in the
distribution, the id3 extension is just an EXAMPLE of how to write
plugin extensions; it's not (and will not be this side of 2012) a full
ID3 implementation.
As I wrote before, there are simply too many formats and variants to
support. That's exactly why I introduced the -ext= switch.
--
cheers thomasl
web: http://thomaslauer.com/start
- Posted by hummingbird on July 5th, 2008
On Sat, 05 Jul 2008 14:20:36 +0100 'hummingbird'
wrote this on alt.comp.freeware:
Hell's teeth! ... I've got it working!
1. I didn't realise I needed to add *.mp3 on the commandline.
When I added it, it worked just fine.
2. I also edited the ID3.ext and added Genre to the Tag options
so it now looks like this (below) and that works fine too.
Thomas, can you confirm what I've done below is correct please:
(> char added below to help prevent wrap)
<edited section of id3.ext>
</new section of id3.ext>
--
"All truth passes through three stages.
First, it is ridiculed, second it is violently opposed,
and third, it is accepted as self-evident"
(Arthur Schopenhauer)
- Posted by hummingbird on July 5th, 2008
On Sat, 05 Jul 2008 16:38:17 +0100 'Thomas Lauer'
wrote this on alt.comp.freeware:
Hi Thomas, plse see my later post in which I discovered the error.
--
"All truth passes through three stages.
First, it is ridiculed, second it is violently opposed,
and third, it is accepted as self-evident"
(Arthur Schopenhauer)
- Posted by Thomas Lauer on July 6th, 2008
hummingbird <hummingbird@127.0.0.1> wrote:
If all else fails, RTFM.
Also remember point 2 from my previous posting if you construct command
lines which seemingly don't work. Such problems are almost always down
to "clerical" errors.
<snipped loads of stuff>
Looks good.
--
cheers thomasl
web: http://thomaslauer.com/start
- Posted by hummingbird on July 6th, 2008
On Sun, 06 Jul 2008 14:52:05 +0100 'Thomas Lauer'
wrote this on alt.comp.freeware:
RTFM? Do you have a manual? ;-)
Indeed. I discovered that the case is crucial when selecting
ID3genre. It has to agree exactly with the ID3Tag in MP3
or there's a nil return.
Thanks for this new feature Thomas. I really appreciate it.
I can see the program in general is very powerful..
--
"All truth passes through three stages.
First, it is ridiculed, second it is violently opposed,
and third, it is accepted as self-evident"
(Arthur Schopenhauer)
- Posted by Thomas Lauer on July 7th, 2008
hummingbird <hummingbird@127.0.0.1> wrote:
It's true, people who can read are at a huge advantage. Keep on tryin'
--
cheers thomasl
web: http://thomaslauer.com/start
- Posted by hummingbird on July 7th, 2008
On Mon, 07 Jul 2008 09:48:50 +0100 'Thomas Lauer'
wrote this on alt.comp.freeware:
I'm tempted to report a small typo in the "manual", but concerned
this it might make you all woooooooozy ;-)
--
"All truth passes through three stages.
First, it is ridiculed, second it is violently opposed,
and third, it is accepted as self-evident"
(Arthur Schopenhauer)