file splitter utility.

R

Roedy Green

I have posted the free Java source for a file splitting utility.
see http://mindprod.com/products.html#SPLITTER



Splitter Version 1.0

Split large text/html files into smaller files. I find it much
faster and more accurate than cut and paste.

You embed multiple <split tags in the file to be split of the form:

<split charlie.html>
....
stuff that will end up in the charlie.html file.
....
</split>

The text between the <split xxx> and </split> tags is split off
into that named file and the text is removed from the
original file along with the tags.

1. Filenames may be absolute or relative, with no quotes or spaces.

2. Tags may be nested, but they must balance (equal number
of <split xxx> and </split>).

3. Tags are case-insensitive, i.e. may be lower or upper case.

4. Multiple <split xxx> tags may be directed to the same
file, where they will be appended.

5. If the files mentioned in the split tags already exist,
they will be overwritten.

6. Anything not inside <split xxx>.. </split> is retained in the
original file. Everything else is removed.

Java 1.5 application.

Copyright 2005 Canadian Mind Products.
May be used freely for any purpose but military.
All Java source code is included.

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
A

Andrew Thompson

Canadian Mind Products, Roedy Green.

Welcome back! I was just moments ago wonderring at your lack of posts
recently ( sorry.. mostly in relation to ..yet another accusation that
I am a mean and horrid person - noting that you had made vaguely
similar comments in the past. ;)

Your server tells me that document is moved to.. wait.
Did you want that 8 second delay in there as a warning?
...photos of Bush's war crimes

Good to see you're keeping up the good work.
This madness must stop. :-(
 
P

P.Hill

Roedy said:
<split charlie.html>

Just a nit, but you just couldn't go so far
as make it XML compliant?

instead of:
<split charlie.html>

Pure XML would be
<split to="charlie.html">
....
</split>

Then you could experiment with SAX or DOM processing and see
how much easier or harder and faster or slower it would be to
use a standard library.

We could also then control append/replace semantics with
additional attributes...

Just an idea, but here is an example I just typed in
with help from standard tools.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE split>
<split to="charlie.html">
This is a test
</split>

And here is the DTD generated from that:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated from split.xml by XMLBuddy -->
<!ELEMENT split (#PCDATA)>
<!ATTLIST split to NMTOKEN #REQUIRED>

Well it's a start. Someone else can do the XSLT to imitate
Roedy's utility, but that might be going too far. :)

-Paul

p.s. Gald to see you on your feet Roedy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top