Miska's pages



Content:

If you find any errors or mistakes, please let me know.
Valid HTML 4.0! Valid CSS!

Scripts

You can find here my greater UNIX scripts. I'm not going to present here every oneliner. Actualy there is only one script, but I hope, that there will be more scripts one day.

XMLTree

XMLTree is a script, which traverse through directory tree and create XML file for each directory. One possible way how to use it is to create database of you MP3 CDs. I also use it for that. I've writen also one simple script, which produce XML containing informations from ID3 tag of MP3. If I use both of them together I receive directory structure same as on CD containing all necessary informations. And I can browse them with any XML browser. To find some mp3, I can just use grep ;-) What about syntax? I'll give you an example. This is how I use it to add new CD into my database:

xmltree --root mp3-1.xml --style "../mp3.css" --store ~/mp3/mp3-1/ -e mp3toxml --verbose /mnt/cdrom/

This example asume that script mp3toxml is in path and all mentioned directories exists. If I execute in directory ~/mp3 script again with following parameters:

xmltree --root cd.xml --style "./cd.css" --recoff --verbose ./

I will get file cd.xml in directory ~/mp3. In this file will be list of aviable CDs and I can bookmark it and browse whole my colection ;-)

Options:

--store path Where should be output stored. If not metioned, output will be stored in current directory.
--style path Specifies path to CSS style used to disply XML. If it doesn't begin with "/" every time script goes into subdirectory, it will add "../" at the begining of this path. You can prevent this by using '--nodescent' option.
--nodescent Prevent changing style path. See --style option for more informations.
--root file Sets name of root file.
--e command This command will be executed on every file to get informations about it. Result will be stored in XML tag aditional. You can't use relative paths to specifi this program.
--with-care Prevent removing of entries during the update. Instead of it, it will add tag removed and set it to yes. So you will have some kind of history of your directory structure.
--recoff Prevend script from descending into subdirectories.
--string text Sets default value for tag info. If it is empty, this tag wouldn't be inluded.
--verbose It will be more verbose. Everything is written on stderr.
--help no comment


ProgramInstalationDocumentationSources
XML TreexmltreeThis pageIt's shell script!

Technical informations
HTTP server: Apache
Your IP: 18.217.235.159
Name of your computer:
Banner added by freehosting :-(

Technical informations
HTTP server: Apache
Your IP: 18.217.235.159
Name of your computer:
Banner added by freehosting :-(