![]() ![]() |
Jan 8 2007, 12:08 PM
Post
#1
|
|
|
Group: Members Posts: 657 Joined: 29-September 04 Member No.: 4,809 |
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. |
|
|
|
Jan 8 2007, 12:30 PM
Post
#2
|
|
![]() Group: Admin Posts: 1,208 Joined: 20-January 06 From: York, Pennsylvania Member No.: 8,961 |
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 |
|
|
|
Jan 8 2007, 03:40 PM
Post
#3
|
|
|
Group: Members Posts: 226 Joined: 29-March 06 Member No.: 9,483 |
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.
|
|
|
|
Jan 9 2007, 07:01 PM
Post
#4
|
|
|
Group: Members Posts: 242 Joined: 31-March 04 Member No.: 2,592 |
QUOTE(Drake01 @ Jan 8 2007, 03:40 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. 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 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... |
|
|
|
Jan 10 2007, 11:44 PM
Post
#5
|
|
|
Group: Members Posts: 657 Joined: 29-September 04 Member No.: 4,809 |
Heh! Just the sort of answer I should have expected.
I'll look up nedit though. I'm getting old enough that I'll take the easy way out if I can |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd May 2013 - 04:49 PM |