Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-30-2009, 12:32 PM   #31
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by Dave Berk View Post
I thought Lua has very limited support for unicode & it was mostly used for games scripting.
Quote:
Originally Posted by Jellby View Post
Given that it's being used in LuaTeX in order to extend TeX to, among other things, properly support unicode, I doubt it has any significant problem with unicode.
It's actually a bit more complicated than that.
Valloric is offline   Reply With Quote
Old 09-30-2009, 02:06 PM   #32
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Exclamation Open Object Rexx

Quote:
Originally Posted by Valloric View Post
Anyone wanting to present their idea of what scripting language should be embedded needs to be able and willing to convince me and others why should that language be chosen over the rest.
Well, I have a go for an underdog then which would never get any clicks then: Rexx.

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
"REN" would be the domain specific command from CMD - the rest is Rexx - including the rest of the REN line.

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
krischik is offline   Reply With Quote
Old 10-02-2009, 07:51 AM   #33
JohnnyD
Connoisseur
JohnnyD doesn't litterJohnnyD doesn't litterJohnnyD doesn't litter
 
Posts: 94
Karma: 221
Join Date: Oct 2006
Location: Drenthe, The Netherlands
Device: Cybook Gen3 (cracked screen)/Bebook/Nokia E60/Nokia 5800
Ha, Rexx... been using that, somewhere in my mainframe and OS/2-days

But, how easy is it to incorporate Rexx into Sigil?
JohnnyD is offline   Reply With Quote
Old 10-03-2009, 03:05 AM   #34
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Quote:
Originally Posted by JohnnyD View Post
Ha, Rexx... been using that, somewhere in my mainframe and OS/2-days

But, how easy is it to incorporate Rexx into Sigil?
I only did the "installation" part for TakeCommand - which still has Rexx support. That was dead easy: just copy the dll into the same directory as TCMD.exe (or a %PATH% directory) - even works for USB-Stick installations.

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
krischik is offline   Reply With Quote
Old 10-03-2009, 08:39 AM   #35
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by krischik View Post
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.
Thanks for the suggestion but I'm sad to say Rexx is not in the running. It's a bit esoteric.
Valloric is offline   Reply With Quote
Old 10-03-2009, 02:36 PM   #36
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Quote:
Originally Posted by Valloric View Post
It's a bit esoteric.
Esoteric? Rexx? You have to define esoteric for me. Because for me Brainfuck is esoteric.

But on the other hand is Rexx is a Draft horse - Rexx is still going strong when all Warmbloods have died of a heard attack.

Martin
krischik is offline   Reply With Quote
Old 10-14-2009, 04:47 PM   #37
opitzs
Avid Reader
opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.
 
opitzs's Avatar
 
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
opitzs is offline   Reply With Quote
Old 10-15-2009, 01:18 AM   #38
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Quote:
Originally Posted by opitzs View Post
when the cries start "I wanted to do X, but I can't, because it is not supported by Y!".
All scripting languages discussed (Lua, Perl, Python, Rexx, Ruby) are Turing complete and can (theoretically) solve any problem solvable in this universe.

Martin
krischik is offline   Reply With Quote
Old 10-15-2009, 07:04 AM   #39
JohnnyD
Connoisseur
JohnnyD doesn't litterJohnnyD doesn't litterJohnnyD doesn't litter
 
Posts: 94
Karma: 221
Join Date: Oct 2006
Location: Drenthe, The Netherlands
Device: Cybook Gen3 (cracked screen)/Bebook/Nokia E60/Nokia 5800
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
JohnnyD is offline   Reply With Quote
Old 10-15-2009, 08:18 AM   #40
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by JohnnyD View Post
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
You may have missed that S&R with regex support is actually being worked on right now and will end up in the next release.

Just FYI, regexes are not really a scripting language.
Valloric is offline   Reply With Quote
Old 10-15-2009, 10:08 AM   #41
GeoffC
Chocolate Grasshopper ...
GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.
 
GeoffC's Avatar
 
Posts: 26,896
Karma: 16968764
Join Date: Mar 2008
Location: Scotland
Device: 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 ?
GeoffC is offline   Reply With Quote
Old 10-15-2009, 10:09 AM   #42
JohnnyD
Connoisseur
JohnnyD doesn't litterJohnnyD doesn't litterJohnnyD doesn't litter
 
Posts: 94
Karma: 221
Join Date: Oct 2006
Location: Drenthe, The Netherlands
Device: Cybook Gen3 (cracked screen)/Bebook/Nokia E60/Nokia 5800
Quote:
Originally Posted by Valloric View Post
You may have missed that S&R with regex support is actually being worked on right now and will end up in the next release.


Quote:
Originally Posted by Valloric View Post
Just FYI, regexes are not really a scripting language.
...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&regex...

However, I'm glad that regexes are allready part of the plan!
JohnnyD is offline   Reply With Quote
Old 10-15-2009, 10:13 AM   #43
JohnnyD
Connoisseur
JohnnyD doesn't litterJohnnyD doesn't litterJohnnyD doesn't litter
 
Posts: 94
Karma: 221
Join Date: Oct 2006
Location: Drenthe, The Netherlands
Device: Cybook Gen3 (cracked screen)/Bebook/Nokia E60/Nokia 5800
Quote:
Originally Posted by GeoffC View Post
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 ?
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...
JohnnyD is offline   Reply With Quote
Old 10-15-2009, 10:14 AM   #44
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by GeoffC View Post
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 ?
Absolutely. The scripting language integration would be accessible for instance through a menu entry in the Tools menu, something like "Run script" which would pop up a small editing window where you could write and run your script.

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.
Valloric is offline   Reply With Quote
Old 10-15-2009, 10:55 AM   #45
GeoffC
Chocolate Grasshopper ...
GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.
 
GeoffC's Avatar
 
Posts: 26,896
Karma: 16968764
Join Date: Mar 2008
Location: Scotland
Device: Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
Thanks ....
GeoffC is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Entourage Edge and the Android Scripting Environment paulckennedy enTourage eDGe 9 07-12-2011 12:32 PM
Scripting with epub-meta averyml Calibre 19 05-28-2009 01:25 AM
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


All times are GMT -4. The time now is 08:53 PM.


MobileRead.com is a privately owned, operated and funded community.