03-02-2009, 08:28 PM | #1 |
Sir Penguin of Edinburgh
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
Do need help editing text files?
As a result of the CIA World Book project I decided to start, I'm going to need to write a bunch of jflex scripts. Would anyone like me to make one?
What is jflex, you might ask? flex stands for fast lexical analyzer. One of the things you can do with it is automate the editing of a text file. In my case I have 2 sets of 251 html files. Each set will need identical editing on all 251 files. Rather than editing each file and performing the same actions 251 times, I will write a jflex script to automate the process. It wouldn't be very much trouble to write an extra script while I'm in the mood. If you'd like one for your project, please let me know. P.S. It would be best of you had at least some experience with the command line, especially if you run Linux or MacOS. P.P.S. I can also write a flex script for C. P.P.P.S If you have only one file, it would take less time for you to edit it manually than for me to write a script. |
03-02-2009, 08:54 PM | #2 |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
It's nice to be able work on all files at once, a sort of 'grep'.
However, my text editior, Textpad 4, allows me to load all 251 .html files at once and search and replace with RegEx across ALL .html files. I can get up to 500-600 loaded at a time and if there are more then can repeat with the remaining .htmls. It even allows macros, so the really repetitive stuff can be recorded and used over and over until done. |
Advert | |
|
03-02-2009, 09:08 PM | #3 |
Sir Penguin of Edinburgh
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
I prefer jflex because I can edit one file to make it pretty, and then replicate that formatting across all files. Plus, if I set up a jflex script today, I can use it next week or next month.
|
04-01-2009, 01:18 PM | #4 |
Sir Penguin of Edinburgh
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
The attached file is a before and after example. It is one of the flag pages from the Fact Book.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What do you use for editing epub files after creation? | JGB | ePub | 8 | 07-21-2009 01:06 AM |
japi - a text editor capable of editing ePub directly | hekkel | ePub | 5 | 02-20-2009 08:46 AM |
eBook Text Editing | Gideon | Workshop | 5 | 01-28-2008 12:26 PM |
Editing RTF Files | DougFNJ | Sony Reader | 3 | 11-29-2007 01:27 PM |
Text tool for formatting Gutenberg text files | bob_ninja | Workshop | 5 | 11-13-2007 12:28 PM |