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 03-23-2017, 04:39 PM   #31
notimp
Groupie
notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.
 
Posts: 194
Karma: 886941
Join Date: Jul 2010
Device: K2i
Quote:
Originally Posted by KevinH View Post
You can always compile and include your own tidy html5 library inside your plugin (one plugin author already does this) or you can use Sigil's internal gumbo library. Sigil's gumbo parser is a fork of Google's Gumbo parser that autocorrects using the exact same rules as browsers. Sigil gumbo library is available through the plugin api as well.

FWIW, You also might be better off parsing the file in gumbo first and then doing replacements of the text parts so that you do not break the xhtml syntax by funny search and replaces.

I think there is a simple example of using Sigil's gumbo in the testme plugin that is documented in the latest Plugin framework Developers guide.
Thank you for the clarification - I believe I also caught the switch to gumbo in changelogs several months ago but never saw it do its magic while lets say switching from source view to wysiwyg f.e. (or at least not in the way I needed it - it's been a while since I tested the new parser version) but if its a library I can call - it might work.

I'll also look into plugins other people have written already, as suggested.

I'm afraid the main enemy here is complexity. I'm confident I could hack together a little find/replace regex plugin in python - but calling other modules requires more "learning curve" first...

In any case - I'm doing some pretty freaky replacements (like search for this, followed by whatever, followed by that tag 1 or 3 times, which can also include that other tag 0 or 1 times...) so I'm relying on actually working on the html source and not just "visible text". (Because it turns out - that OCR software outputs have "predictable formating" you can actually take advantage of, if you wan't to modify text thats structured in a certain way - but ignore text that isn't - and the actual formating followed by formating (or not ) isn't something you can do on a text level.

The thing is, that it turns out, that you can pretty much automate ePub production from Finereader>Sigil or Finereader>Atlantis>Sigil (Atlantis = one of the best wordprocessing>epub converters out there) based on "predictable error profiles" that can be automated away by looking for sentence (missing end sign) structure and formating structure at the same time.

Short way of saying - I created a better method to create ePubs from Finereader results than is "available" on the international scene (shared/created it with a german "scenes" (dont ask ) board) in 2012 - that broke once tidy was removed. At which point it was more convenient to just tell everyone to keep using the older versions of Sigil, than to try to get the functionality back myself. The availability of a GUI frontend library for plugins now peaked my interest again.

I'll look into it (this isn't a promise of delivery - for people recognizing my nickname.. ).

Last edited by notimp; 03-23-2017 at 05:41 PM.
notimp is offline   Reply With Quote
Advert
Old 03-23-2017, 04:51 PM   #32
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 16,207
Karma: 83865638
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by notimp View Post
THe availability of a GUI frontend library for plugins now peaked my interest again.
For the record: a gui frontend for Sigil plugins has always been available. External Python interpreters have always been able to use any GUI frontend that happens to be installed on a system, and Tkinter has been included since the first version of Sigil that came with a bundled Python implementation was released. Sigil v0.9.8 has simply added support for PyQt5 as well.
DiapDealer is online now   Reply With Quote
Old 03-23-2017, 04:52 PM   #33
notimp
Groupie
notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.
 
Posts: 194
Karma: 886941
Join Date: Jul 2010
Device: K2i
Again, thanks for the clarification.
notimp is offline   Reply With Quote
Old 03-23-2017, 04:58 PM   #34
odamizu
maniac
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 612
Karma: 1636110
Join Date: Mar 2015
Device: Kindle Oasis & Voyage, iOS
Quote:
Originally Posted by KevinH View Post
Just so you know, Apple really messed up on this ...
Quote:
Originally Posted by KevinH View Post
It gets worse ... This truly sucks.
YIKES!!! YIKES!!! YIKES!!! Sorry I opened this can of worms. 0.9.7 is working fine for me. Thank you for all your time and effort.
odamizu is offline   Reply With Quote
Old 03-23-2017, 05:19 PM   #35
blackest
Connoisseur
blackest began at the beginning.
 
Posts: 50
Karma: 10
Join Date: Sep 2014
Device: sony prs 2
Quote:
Originally Posted by odamizu View Post
YIKES!!! YIKES!!! YIKES!!! Sorry I opened this can of worms. 0.9.7 is working fine for me. Thank you for all your time and effort.
Well thank you as that is my problem too on yosemite. I will see if i can build it. Did it before for Lion but that was a long time ago
Actually still have that dev environment on an old macbook probably. this might be harder than i thought. Certainly longer the qt compile part has been running 10 hours now and is around 80% complete...

Last edited by blackest; 03-24-2017 at 05:50 AM.
blackest is offline   Reply With Quote
Advert
Old 03-24-2017, 11:43 AM   #36
blackest
Connoisseur
blackest began at the beginning.
 
Posts: 50
Karma: 10
Join Date: Sep 2014
Device: sony prs 2
It broke

I managed to get a fair way through the build but cmake failed

CMake Warning at src/CMakeLists.txt:65 (find_package):
Found package configuration file:

/Users/me/Qt56/lib/cmake/Qt5/Qt5Config.cmake

but it set Qt5_FOUND to FALSE so package "Qt5" is considered to be NOT
FOUND. Reason given by package:

Failed to find Qt5 component "WebKit" config file at
"/Users/me/Qt56/lib/cmake/Qt5WebKit/Qt5WebKitConfig.cmake"

Failed to find Qt5 component "WebKitWidgets" config file at
"/Users/me/Qt56/lib/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake"

Failed to find Qt5 component "LinguistTools" config file at
"/Users/me/Qt56/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake"

Any suggestions how to fix this please?
blackest is offline   Reply With Quote
Old 03-24-2017, 11:52 AM   #37
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 16,207
Karma: 83865638
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You either have to build a newer version of Qt5 yourself with QtWebKit added back in (Qt5.6 no longer includes it), or you have to use something like Qt5.5.1 (which still has QtWebkit as part of the binary downloads). The detailed instructions to build all of the pieces that Sigil requires can be found in the docs folder. There's several Mac specific documents in there.

As far as Linguist tools being missing from your system Qt5, I can only imagine it's a separate download of some kind (like it is for Linux). Those tools are needed to compile the language dictionaries.

EDIT: this may be moot as I think KevinH just uploaded a new version of 0.9.8 (the usual place) that should work on older versions of OSX.

Last edited by DiapDealer; 03-24-2017 at 11:57 AM.
DiapDealer is online now   Reply With Quote
Old 03-24-2017, 11:59 AM   #38
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,452
Karma: 769772
Join Date: Nov 2009
Device: many
All Mac Users:

I just uploaded a new build that I was able to test under OSX 10.11 and 10.12 that should hopefully work under 10.10 and 10.9 as well. This all assumes that Qt5's "configure" is much better written that Python's configuration tests on Mac OSX when a MACOSX_DEPLOYMENT_TARGET setting is used.

Please give it a try and let me know of any issues or successes. It is available now in our github releases.

I have my fingers crossed.
KevinH is offline   Reply With Quote
Old 03-24-2017, 01:30 PM   #39
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,452
Karma: 769772
Join Date: Nov 2009
Device: many
For the record ...

I filed a bug with Apple's developer site ...

The following testcase shows that the newly added function in sys/random.h is not in any way detectable as only being available on 10.12.

When compiled with XCode 8 on OSX 10.12

clang -mmacosx-version-min=10.9 -Werror=partial-availability -o testcase testcase.c

will compile and run on 10.12 but will fail with missing symbols on all earlier releases.

testcase.c
Code:
#include <sys/types.h>
#include <stdio.h>
#include <sys/random.h>

int main(int argc, char **argv)
{
  unsigned x;
  if (getentropy(&x, sizeof(x)) < 0)
    perror("getentropy");
  else
    printf("%u\n", x);
  return 0;
}
If getentropy in sys/random.h was properly protected by an availability macro such as testcase2.c

testcase2.c
Code:
#include <sys/types.h>
#include <stdio.h>
#include <AvailabilityMacros.h>

extern int getentropy(void* buffer, size_t size) AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER;

int main(int argc, char **argv)
{
  unsigned x;
  if (getentropy(&x, sizeof(x)) < 0)
    perror("getentropy");
  else
    printf("%u\n", x);
  return 0;
}
The above compile would properly detect that getentropy did not exists in earlier version of OSX.

Code:
kbhend$ clang -mmacosx-version-min=10.9 -Werror=partial-availability -o testcase2 testcase2.c
testcase2.c:14:7: error: 'getentropy' is partial: introduced in macOS 10.12 [-Werror,-Wpartial-availability]
  if (getentropy(&x, sizeof(x)) < 0)
      ^
testcase2.c:9:12: note: 'getentropy' has been explicitly marked partial here
extern int getentropy(void* buffer, size_t size) AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER;
           ^
testcase2.c:14:7: note: explicitly redeclare 'getentropy' to silence this warning
  if (getentropy(&x, sizeof(x)) < 0)
      ^
1 error generated.

If Apple can fix bugs like this, then we can fix Python's configure.ac/configure to more properly handle this case and not just to claim that it exists just because it is run on OSX 10.12.

Please note that we can NOT use the linker flags -Wl,-no_weak_imports to detect this case at link time as Python properly handles and uses weak symbols with #pragma weak properly used with statvfs, fstatvfs, lchown, and inet_aton so using weak symbols is needed.

Just wanted all of this out there in case in a few months I forget all of this.
KevinH is offline   Reply With Quote
Old 03-24-2017, 03:40 PM   #40
blackest
Connoisseur
blackest began at the beginning.
 
Posts: 50
Karma: 10
Join Date: Sep 2014
Device: sony prs 2
Quote:
Originally Posted by KevinH View Post
All Mac Users:

I just uploaded a new build that I was able to test under OSX 10.11 and 10.12 that should hopefully work under 10.10 and 10.9 as well. This all assumes that Qt5's "configure" is much better written that Python's configuration tests on Mac OSX when a MACOSX_DEPLOYMENT_TARGET setting is used.

Please give it a try and let me know of any issues or successes. It is available now in our github releases.

I have my fingers crossed.
You can uncross your fingers for Yosemite at least its working fine.
blackest is offline   Reply With Quote
Old 03-24-2017, 04:27 PM   #41
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,452
Karma: 769772
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by blackest View Post
You can uncross your fingers for Yosemite at least its working fine.
Wonderful news!

Thanks.
KevinH is offline   Reply With Quote
Old 03-24-2017, 05:59 PM   #42
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 16,207
Karma: 83865638
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Yay! Way to go, Kevin!
DiapDealer is online now   Reply With Quote
Old 03-24-2017, 08:03 PM   #43
odamizu
maniac
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 612
Karma: 1636110
Join Date: Mar 2015
Device: Kindle Oasis & Voyage, iOS
Quote:
Originally Posted by KevinH View Post
All Mac Users: I just uploaded a new build that I was able to test under OSX 10.11 and 10.12 that should hopefully work under 10.10 and 10.9 as well ...
Please give it a try and let me know of any issues or successes.
On behalf of myself and my 10.11.6 Mac:
odamizu is offline   Reply With Quote
Old 03-28-2017, 12:02 PM   #44
alban lusitanae
Junior Member
alban lusitanae began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2017
Device: General Smartphone and Tablet
Hi to all

I was searching for the latest version 0.9.8 Portable version (I travel a lot, it's really needed) and I had a 0.9.7 link so I thought there would be a 0.9.8 Port but I can't find it. Is such a version going to happen and be placed on GitHub?

Best regards
alban lusitanae is offline   Reply With Quote
Old 03-28-2017, 12:35 PM   #45
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 16,207
Karma: 83865638
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by alban lusitanae View Post
Hi to all

I was searching for the latest version 0.9.8 Portable version (I travel a lot, it's really needed) and I had a 0.9.7 link so I thought there would be a 0.9.8 Port but I can't find it. Is such a version going to happen and be placed on GitHub?

Best regards
We have no connection to those who package portable versions of Sigil. You'll probably need to ask in the PortableApps forums.
DiapDealer is online now   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
Sigil-0.9.4 Released KevinH Sigil 40 03-26-2016 10:15 AM
Sigil-0.9.2 Released KevinH Sigil 14 01-11-2016 03:11 AM
Sigil-0.9.1 Released KevinH Sigil 36 12-04-2015 03:00 PM
Sigil-0.8.900 released for testing - Wait for Sigil-0.8.901 KevinH Sigil 106 10-04-2015 10:41 AM
Sigil 0.8.2 Released user_none Sigil 12 12-22-2014 06:02 PM


All times are GMT -4. The time now is 05:28 PM.


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