09-30-2009, 12:32 PM | #31 | ||
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Quote:
|
||
09-30-2009, 02:06 PM | #32 | |
Addict
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
|
Open Object Rexx
Quote:
Rexx was designed for Text processing and embedding. And one interesting aspect of Rexx is that it should be teamed up with a domain specific language. In such a team Rexx would do control structures and variables while domain specific language would to the application specific work. With the following example REXX + CMD would rename the files "Foo_1.bat" .. "Foo_10.bat to "Bar_0.cmd .. Bar_9.cmd: Code:
do i=1 to 10 REN "Foo_" || i || ".bat" "Bar_" || i - 1 || ".cmd" end The same with CMD.EXE alone would be quite painful. Rexx has been used before for editor scripting in the EPM (Enhanced Programmers Editor) and LPEX (Live Parsing Extensible Editor) editors (both IBM) and I know from experience that Editor scripting with Rexx is very nice indeed - Scriptability as the main feature for power users (non Power users just used the GUI). I wrote ton's of scripts for all sorts of editing problems with both of them. Rexx has a current ISO standard and several implementations. The most current implementation is Open Object Rexx which is available for the needed three platforms. The object model of OORexx is Smalltalk based - that's duck type for hype-word-junkies - and quite powerful. Martin |
|
Advert | |
|
10-02-2009, 07:51 AM | #33 |
Connoisseur
Posts: 95
Karma: 72819
Join Date: Oct 2006
Location: Drenthe, The Netherlands
Device: Cybook Gen3 (cracked screen)/Bebook/Nokia E60/Nokia 5800/Kobo Aura HD
|
Ha, Rexx... been using that, somewhere in my mainframe and OS/2-days
But, how easy is it to incorporate Rexx into Sigil? |
10-03-2009, 03:05 AM | #34 | |
Addict
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
|
Quote:
Apart from that Rexx - like Lua - is designed for embedding - so I expect it to be easy enough. OORexx is written in C++ BTW. If you decide for it: I maintain the OORexx port for MacPorts as well - so I can make sure things work the way they should work. Martin |
|
10-03-2009, 08:39 AM | #35 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
|
Advert | |
|
10-03-2009, 02:36 PM | #36 |
Addict
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
|
|
10-14-2009, 04:47 PM | #37 |
Avid Reader
Posts: 161
Karma: 36472
Join Date: Sep 2008
Location: Look for rain, hail and snow...
Device: PRS-505, PRS-600, PRS T1, Kobo Glo
|
I would vote for perl
But given the situation i would prefer python. In the end, if you implement anything more specific than this it will be a lot of work later, when the cries start "I wanted to do X, but I can't, because it is not supported by Y!". In time there will be libraries with specific functions, if people really want them. Restriction now will only come back to haunt you. My EUR 0.02 Sven |
10-15-2009, 01:18 AM | #38 |
Addict
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
|
|
10-15-2009, 07:04 AM | #39 |
Connoisseur
Posts: 95
Karma: 72819
Join Date: Oct 2006
Location: Drenthe, The Netherlands
Device: Cybook Gen3 (cracked screen)/Bebook/Nokia E60/Nokia 5800/Kobo Aura HD
|
OK, time for a suggestion everyone will burn down straight away
I needed some kind of text changed in 50+ chapters (it was some navigational code in a bunch of HTML-files which I was converting to an epub-book). So I took a deep breath, googled a bit, read a bit and wrote my first regular expression. Using Search&Replace in jEdit. And it was really easy (I must admit, though, that I have been a software engineer for 15 years). So here is another scripting alternative for Sigil: Global Search&Replace with support for regular expressions! It should be quite easy to implement in Sigil (there are lots of regex libraries with well-defined API's) and I think it will take care of 99% of my scripting needs... Anyone in favor of this option? If you're unsure, check out this tutorial for regular expressions |
10-15-2009, 08:18 AM | #40 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Just FYI, regexes are not really a scripting language. |
|
10-15-2009, 10:08 AM | #41 |
Chocolate Grasshopper ...
Posts: 27,600
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
|
I've only just started using Sigil and find the functionality very user friendly - any further additions to this editor should (surely) maintain this user-friendly mentality rather than just catering for programming experts ?
|
10-15-2009, 10:09 AM | #42 | |
Connoisseur
Posts: 95
Karma: 72819
Join Date: Oct 2006
Location: Drenthe, The Netherlands
Device: Cybook Gen3 (cracked screen)/Bebook/Nokia E60/Nokia 5800/Kobo Aura HD
|
Quote:
...and I didn't say it is a scripting language, but it takes care of my scipting needs... I guess there's a lot of editorial work you can both solve with scripting and with S&R®ex... However, I'm glad that regexes are allready part of the plan! |
|
10-15-2009, 10:13 AM | #43 |
Connoisseur
Posts: 95
Karma: 72819
Join Date: Oct 2006
Location: Drenthe, The Netherlands
Device: Cybook Gen3 (cracked screen)/Bebook/Nokia E60/Nokia 5800/Kobo Aura HD
|
You're right, of course. What I like about an Search&Replace options with regular expressions (regexes) is that you don't have to use the regexes, but if you want to than they are there...
|
10-15-2009, 10:14 AM | #44 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
And the S&R dialog will have a radio box group where the user can select the type of search used: normal and regex. Normal will be the default (but the dialog would remember your settings, of course). Casual users could remain completely oblivious to these features if they wanted to. Sigil has been designed with simplicity, ease of use and user-friendliness in mind, and these will forever be the primary concerns. Last edited by Valloric; 10-15-2009 at 10:17 AM. |
|
10-15-2009, 10:55 AM | #45 |
Chocolate Grasshopper ...
Posts: 27,600
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
|
Thanks ....
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Scripting with epub-meta | averyml | Calibre | 20 | 11-17-2016 10:13 AM |
Entourage Edge and the Android Scripting Environment | paulckennedy | enTourage eDGe | 9 | 07-12-2011 12:32 PM |
iLiad Lua: scripting for Iliad | hansel | iRex Developer's Corner | 3 | 12-14-2008 06:51 PM |
Simple browser scripting for content? | mphuie | Workshop | 2 | 01-29-2008 08:38 PM |
Any NetNewsWire Scripting Pros out there? | adinb | Sony Reader | 0 | 02-25-2007 01:44 AM |