megacz's simple text manipulation scripts, (megaczusa.com)
this archive contains two ARexx scripts: -extractlist-
and -scbsc- that could be very helpful for those who
need to extract *.dclst files for some reason.
please note that these scripts will not allow u to unpack
*.dclst! in order to do so u need to download such list
using DC++ and add interesting u things to the queue[.xml]
and then copy that file and process it with my scripts.
also note that DC++ could be used with WINe under linux(x86)!
"template: <in_file> <out_file> <word/#?[,T]>"
[,T] allows to process non *.xml files.
this script will extract full path from queue.xml file,
example1: 'extractlist queue.xml plain.txt #?' or
example2: 'extractlist queue.xml plain.txt .avi'
-last one will extract only paths that contain .avi
as a result u will get plain text file which is
smaller and more user friendly(easier to read).
with this one, u can cut out words/paths ure not
interested in plus remove dupes and cut out N words
template: <in_file> <out_file> <'char'> <'last'/'first'/num[,to]>
char could be like this '/' or like this 'X2C(2F)'
if u want lower case use inverted commas to enclose.
'last' and 'first' are the words!, 0 as a num will not
touch the strings allowing cutting, if [,to] number
is being passed num become 'from', [dd] removes dupes.
[cut:n[,m]] cuts out string that contains n words,
if n and m r specified it will work in range of n to m.
example: 'scbsc plain.txt plain.clean.txt "" last dd cut:2'
-such setup will strip last entry after the "" from each
line plus remove duplicates plus remove 2 word long strings,
note that 2 word long strings doesnt mean those separated
by spaces, but the 'char' like: "(1st)what now?(2nd)dont know".
check out 'queue.xml.lzx' that i needed to extract,
its huge(8 mib,62268 lines) so extracting may take some time!
this file cotains filelist from some mate that
has mega big collection of rock music and lots
of stoner related stuff and i wanted to have
clean list of 'stoner' bands for further use.
play with the options on smaller files to see what this
thing is capable of.
heres how i used it for "space"(genere):
1. extractlist l0g:Queue.xml RAM:Queue.txt space
2. scbsc RAM:Queue.txt RAM:Queue.txt.pre "" last dd cut:1,2
3. scbsc RAM:Queue.txt.pre RAM:Queue.txt.pre_2 "" 4,30
4. extractlist RAM:Queue.txt.pre_2 RAM:Queue.txt space,t
1. searching for 'space' word in the xml strings that contain download path
2. cutting out last entry after the "", usually files(*.mp3), removing
dupes, coz each entry will be same as previous(directory), after cutting
and snipping off entries that contain 1 to up 2 directories in path
3. cutting prefixes before the desired direcotry name in this case
starting from 4th dir and allowing up to 30 dirs in path
4. removing extra 'space' entries in each string that occured in song
~also note that these scripts arent tested too deep as
i do not need them anymore, but i thought that maybe
someone else could find them useful too, so releasing.