OESF Portables Forum

Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: kahm on January 08, 2007, 03:08:11 pm

Title: Text Editor For Pdax With Complex Search?
Post by: kahm on January 08, 2007, 03:08:11 pm
I've got a whole bunch of text files from around the web, and they have various symptoms of format nastyness. I've decided to spend my bus ride time sorting them out.

A lot of these files are text files with hard returns every ~80 characters. On a desktop I'd use something like Word to search out double returns and replace them with a marker, then replace all the remaining returns with spaces, then replace the markers with double returns.

On my 3100, I can do that with Textmaker. On my 3000, with pdaXii13, I tried to do that with Abiword - but Abiword's search function doesn't support any special or formatting characters whatsoever - It's basically on the same level as Notepad! I'm getting tired of toting 2 Z's everywhere I go, so I'm hoping to find a solution under pdaXrom.

Anyone have any ideas? I'm trying to prep these files so that I can read them on my Librie ebook reader.
Title: Text Editor For Pdax With Complex Search?
Post by: InSearchOf on January 08, 2007, 03:30:18 pm
Well... a from a geek level you can use vi...

:s/*orig*/*replace/


I think that is what it is... google "search replace vi" and you will get good results...

Late
Title: Text Editor For Pdax With Complex Search?
Post by: Drake01 on January 08, 2007, 06:40:11 pm
I thought I saw nedit compiled for PdaXrom.  nedit supports regular expression search and replace.  It's very competent and fast running on a desktop... probably a little slower on a Z, but it should do what you want.
Title: Text Editor For Pdax With Complex Search?
Post by: cvmiller on January 09, 2007, 10:01:01 pm
Quote
I thought I saw nedit compiled for PdaXrom.  nedit supports regular expression search and replace.  It's very competent and fast running on a desktop... probably a little slower on a Z, but it should do what you want.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=150483\"][{POST_SNAPBACK}][/a][/div]

Nedit is pretty slick, I even use it in Xqt (don't have PDAX, sorry). But if you have a bunch of files, you might try sed and a short bash script. Using the sed command with something like
sed  -e 's/\n//g' filename > new_filename

Or you could put that into a bash loop like this:
Code: [Select]
for f in *.txt
{
sed  -e 's/\n//g' $f >  ${f%%.txt}.text
}
That would rip out all the returns in every txt file in the directory, creating a new set of files ending in text. Once you are happy with the conversion, you can delete all the txt files.

Hope this helps,

Craig...
Title: Text Editor For Pdax With Complex Search?
Post by: kahm on January 11, 2007, 02:44:12 am
Heh! Just the sort of answer I should have expected.  I'll probably end up resorting to scripting something, just because Abiword performs so much better than Textmaker does.  I can work around the only other niggles I have with Abiword.

I'll look up nedit though. I'm getting old enough that I'll take the easy way out if I can  That, and my regular expressions were never that good to begin with...