Author Topic: Text Editor For Pdax With Complex Search?  (Read 4067 times)

kahm

  • Hero Member
  • *****
  • Posts: 657
    • View Profile
Text Editor For Pdax With Complex Search?
« 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.
Fujitsu U8240 "Stormtrooper" -  Zaurus Supplement
Libretto U100 | Sony Librie, Sony Reader
SL-C3100: Sharp 1.11JP (Kanji Dictionary/Translator) - LCD Top swap with C1000.
SL-C3000: pdaXii13 5.4.7, SL-C3000 5.4.9 - microdrive replaced with 8gb Sandisk
SL-C1000: PDAXRom Beta3 | SL-6000L: Sharp 1.12 | SL-5500: Cacko, 64-0 kernel | SL-5000D: OZ-Opie
Linksys WCF12; Sharp CE-AG06, CE-RH2, CE-170TS; iRiver USB OTG Host cable; Socket BT rev.E CF; Hitachi 6gb Microdrive

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
Text Editor For Pdax With Complex Search?
« Reply #1 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
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode

Drake01

  • Full Member
  • ***
  • Posts: 226
    • View Profile
Text Editor For Pdax With Complex Search?
« Reply #2 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.
Device: SL-C3200 running pdaXii13v2 build 5.5.0
Networking: Symbol Spectrum24 WLAN card; Kingston CIO10T CF NIC
Storage: 4GB Transcend 150x SD; 16GB Transcend 133x CF; 4GB Seagate CF HDD; 4GB Patriot SD
HID: Logitech V450 Laser Mouse; generic silicone USB keyboard; 2 generic optical mice; stock plastic stylus
GPS: generic "UT-41" USB GPS Receiver
Case: neoprene case from my old Palm foldable keyboard

cvmiller

  • Full Member
  • ***
  • Posts: 242
    • View Profile
    • http://
Text Editor For Pdax With Complex Search?
« Reply #3 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...
SL-6000
ROM v1.12 (Sharp)
Belkin F8U1500 IR Keyboard
1 GB SD Card by SanDisk (ext2)

kahm

  • Hero Member
  • *****
  • Posts: 657
    • View Profile
Text Editor For Pdax With Complex Search?
« Reply #4 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...
Fujitsu U8240 "Stormtrooper" -  Zaurus Supplement
Libretto U100 | Sony Librie, Sony Reader
SL-C3100: Sharp 1.11JP (Kanji Dictionary/Translator) - LCD Top swap with C1000.
SL-C3000: pdaXii13 5.4.7, SL-C3000 5.4.9 - microdrive replaced with 8gb Sandisk
SL-C1000: PDAXRom Beta3 | SL-6000L: Sharp 1.12 | SL-5500: Cacko, 64-0 kernel | SL-5000D: OZ-Opie
Linksys WCF12; Sharp CE-AG06, CE-RH2, CE-170TS; iRiver USB OTG Host cable; Socket BT rev.E CF; Hitachi 6gb Microdrive