![]() |
#1 |
actually it is /var/log
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 341
Karma: 2994236
Join Date: Sep 2012
Location: usually Europa
Device: prs t1
|
Sigil script manager
Introducing DGSM.
Spoiler:
The pictures: About informs you now that DGSM has proudly reached version 0.0.0 ![]() Next you see Script Manager Cockpit. Script menu in menu bar. Context script menu. Last edited by varlog; 07-26-2014 at 07:53 AM. Reason: added DGSM-0.0.3, which is DGSM-0.0.2 rebased on latest KevinH work |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Cool! Can't wait to play.
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
actually it is /var/log
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 341
Karma: 2994236
Join Date: Sep 2012
Location: usually Europa
Device: prs t1
|
![]() Hmm... depending on your conclusions... would you consider making .deb package for others willing but not able? |
![]() |
![]() |
![]() |
#4 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 119
Karma: 64428
Join Date: Aug 2011
Device: none
|
How exciting! It sounds like you are well on the way and have learned a lot already.
This project reminds me of a feature I wish more editors had. My model is the vi editor's shell escape. For those who are unfamiliar with vi, the shell escape will create an anonymous stream of lines that are piped into the program of your choice. The output of your program is automatically piped back in to vi. The program can be anything, even a shell script on its own. The major rule is that all input and output are pipes. A consequence of this is that it is allowable to read a line from the input pipe, process it somehow, and write the edited output to the output pipe. When the input reaches end of file, everything is closed and control returns to vi. This is in contrast to the "open with" feature, where all input is delivered at once to the editor, all changes are made, and all output is written at once back to sigil. I would call this a simplex pipe. Either input all at once or output all at once. The shell escape is a pair of pipes that allow partial reads and partial writes to be interleaved. Much more in line with the Unix stream concept. Were this available to sigil, you could pipe your file to stream-oriented programs such as sed, awk, wc, sort, etc. All non-interactive common utilities, but they each do one thing, and do it well. Just a thought for your consideration. |
![]() |
![]() |
![]() |
#5 | |
actually it is /var/log
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 341
Karma: 2994236
Join Date: Sep 2012
Location: usually Europa
Device: prs t1
|
Quote:
1. Interface attractive for users who want the bloody thing just to work. 2. Internals attractive for people who like to code. which would be my imaginary goal if I had one ![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I haven't had much time to play, but I did want to let you know that I got Sigil patched and built OK from your patch file. DGSM is there and the one script I tried seemed to work. That's about it for now.
![]() |
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Been using this quite a bit lately.
I even made a few changes and got it to compile on Windows. I've chosen to use Sigil v0.7.3 to patch (I'm just not confident in v0.7.4 or the latest git). It "feels" a little precarious on Windows, but it works! I've had a few random crashes, but that could be my fault--with regard to the changes I made to get it to compile. One thing I'd be interested in would be the ability to determine whether or not the script actually changed anything. It'd be nice to be able to skip the whole reloadResource or markBookChanged if the script in question didn't find anything to do. For example; if the smarten punctuation script didn't find anything to smarten, it'd be nice if Sigil didn't change the project to an "unsaved" state. Cool stuff! I do have a 64-bit Linux version available (with Qt5.2.1) if anyone is interested in playing. It should install alongside the standard version of Sigil (although both versions will still share the same config directory). I can make the Windows version available as well--if anyone is feeling adventurous. You're on you're own though if something blows up! ![]() |
![]() |
![]() |
![]() |
#8 | ||
actually it is /var/log
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 341
Karma: 2994236
Join Date: Sep 2012
Location: usually Europa
Device: prs t1
|
![]() Quote:
Quote:
![]() EDIT: it would be relatively easy to implement it as a reaction to signal from script itself - but, as I don't write the scripts myself only sigil-malform existing ones, this solution seems not general enough to me. There is one uninitialized int i in ScriptInterface::removeNotAccountedFor (ScriptInterface.cpp, line 401) is: for(int i;i<htmlFiles.count();++i){ should be!: for(int i=0;i<htmlFiles.count();++i){ in case your compiler hasn't noticed! In the meantime I've noticed some more things which must be absolutely taken care of... Thank you for your input ![]() Last edited by varlog; 04-29-2014 at 05:04 PM. Reason: afterthought |
||
![]() |
![]() |
![]() |
#9 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
The only real changes were to the ScriptManager.h file. The QStringList constants at the top were giving the Windows compiler fits. It sees curly braces and automatically thinks "Aha! A function!" and then immediately barfs because it has no parameters. I just constructed the QStringLists a little differently. I have no idea if those changes will consequently work on Linux. I just kept playing 'til it compiled, and then quit. ![]() I also needed a few tweaks to the main src/Sigil/CMakeLists.txt file to build the installer package because of changes to Qt5. More things have been moved to plugins and new libraries added (and I think Qt5V8 went away). Qt5Positioning needed to be included with the Windows installer for the program to run. I also included the position plugin just to be on the safe side. Quote:
Last edited by DiapDealer; 04-29-2014 at 07:33 PM. |
||
![]() |
![]() |
![]() |
#10 |
actually it is /var/log
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 341
Karma: 2994236
Join Date: Sep 2012
Location: usually Europa
Device: prs t1
|
|
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Gotcha.
Here's the link (google drive) to the Windows installer package. https://drive.google.com/file/d/0B5C...it?usp=sharing |
![]() |
![]() |
![]() |
#12 |
actually it is /var/log
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 341
Karma: 2994236
Join Date: Sep 2012
Location: usually Europa
Device: prs t1
|
This is a fix for some things I wanted to fix:
- compiles and functions similar in Linux and Windows XP32b (yes, I went so far as to set up compiling environment in my 32b long since forgotten XP abomination, perhaps it is enough for all other vista,7,8 sucking ![]() - added icons to menus and scripts (see snapshot, paid for, EUR 17!) just for fun of it! - replaced Mobi2Sigil with Kindle2Sigil based on KindleUnpack_v65: it is a slightly better port as the Mobil2Sigil but still - less dragons doesn't mean no dragons, anybody out there who knows better? I ignore KindleUnpack creators original intent and try to make .epub direct from old mobi7 files: some info/comments on it? - added WhatsMyMobi because it was easy and could help by Kindle2Sigil. DGMS-0.0.1.zip includes full patch to Sigil git and patch to DGSM-0.0.0. could somebody check it on mac, please? |
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
You definitely have your work cut out for you there. The mobi markup in the older, "standard" mobi files is similar to HTML 3.2. Getting it cleaned up and into some semblance of valid XHTML (appropriate for ePub) can be a trying experience.
|
![]() |
![]() |
![]() |
#14 |
actually it is /var/log
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 341
Karma: 2994236
Join Date: Sep 2012
Location: usually Europa
Device: prs t1
|
What I wanted to have was the shortest way from .mobi to .epub in Sigil. For this I malform KindleUnpack output into .epub structure, never minding what input was. Sigil has to have "Clean Source" on by "Open" for Kindle2Sigil to work - shoud've done it programmatically but havn't
![]() Actually I'm not in the business of transforming .mobi to .epub, sometimes I just want to take a look inside. |
![]() |
![]() |
![]() |
#15 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'll be honest; Sigil's "Clean Source" upon opening may very well close the tags on mobi6|7 markup and make it valid xhtml, but it might not look anything like the book did when it was a mobi.
But if you just want to "let 'er fly." Most mobis unpack into everything you need to slap together an ePub (html, opf, ncx). There's some python code in KindelUnpack that should help you zip up all the files in the correct manner--and create the mimetype/container.xml files. Last edited by DiapDealer; 05-13-2014 at 05:21 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ES File Explorer, Astro File Manager or File Manager HD? | DreamWriter | Android Devices | 15 | 04-05-2012 03:00 PM |
Sigil 0.4.1 : unwanted span added by Sigil | Bertrand | Sigil | 0 | 09-02-2011 05:28 AM |
Sigil 0.3.4 / Sigil 0.4.0 RC1 / Cover in Nook Color | Bertrand | Sigil | 13 | 08-06-2011 04:06 AM |
Sigil 0.3.4 / Problème CSS entre Sigil et iPad | Grivels | Software | 10 | 07-03-2011 09:06 AM |