02-13-2018, 06:34 PM | #61 |
Sigil Developer
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
|
Thanks for catching that. I never tested with pure svg images. Hmm I will definitely look into fixing it.
|
02-13-2018, 10:52 PM | #62 |
Sigil Developer
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
|
Handling svg images is going to end up being a pain in the butt because python PIL does not handle them. In fact the only python conversion from svg to a png thumbnail require librsvg2, cairo, pycairo, and cairosvg but these are not easily found anyplace other than linux.
Luckily Qt itself can be used to create a svg2png converter commandline program to make the required thumbnail in a crossplatform manner or alternatively I could port the entire gui of Access-Aide from tkinter to pyqt5 just to handle that but I just spent a bunch of time figuring out the tkinter code and really do not want to start from scratch. So this will take a bit more work to handle. |
Advert | |
|
02-14-2018, 01:18 PM | #63 |
Grand Sorcerer
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
@KevinH: While testing ACE and your plugin, I noticed two more issues that your plugin could check for.
1. If ACE detects empty h1..h6 headings, it'll display the following minor warnings:
2. If an epub3 book contains page targets and a pagelist, the metadata section should also contain a dc:source entry with information about the print edition that the page numbers are based on. For more information, see this topic. Ideally, the plugin should add a blank dc:source entry with a placeholder text if the nav doc contains a page list and the metadata section doesn't contain a dc:source entry. |
02-14-2018, 01:31 PM | #64 |
Sigil Developer
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
|
Why blank for either? epubcheck will actually barf on any empty dc: metadata tags. The user should find and fix these themselves.
I do not want to add features that really should be handled by the user instead of Accessibility-Aide. I just want the Accessibility-Aide to handle the automatable steps and I want the output of Access-Aide to always pass epubcheck if the did so before running the Aide. So I probably won't fix either of these as empty h1-h6 tags make no real sense and not using dc:source when you have a pagelist makes no sense. They should be fixed by the user, not worked around to prevent the warning. Last edited by KevinH; 02-14-2018 at 01:33 PM. |
02-17-2018, 03:56 PM | #65 |
Sigil Developer
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
|
A release version of Access-Aide v040 is now available for Sigil. It supports both epub2 and pub3 ebooks.
See Sigil's Plugin Index: https://www.mobileread.com/forums/sh...d.php?t=247431 Or go directly to the download site: https://www.mobileread.com/forums/sh...d.php?t=294900 Feedback and improvement Ideas welcome. Hope this helps! |
Advert | |
|
02-18-2018, 06:22 AM | #66 | ||
Imperfect Perfectionist
Posts: 451
Karma: 672038
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
|
Quote:
I have a small problem with the GUI for setting image alt's, though - it goes over the top of my screen, so that the Okay and Cancel-buttons aren't visible. It seems the standard tkinter screenmath doesn't take any toolbars into account. By some trial-and-error messing around with your code I've made them visible by altering line 44 in accessgui.py: h = localRoot.winfo_screenheight()+(localRoot.winfo_screenheight()/5) Then the bottom of the dialog runs below my screen, but that's not quite so big a problem Quote:
So I guess it should be legal to include it on Mobileread Wiki? - Let me know if you want it. Regards, Kim Last edited by elibrarian; 02-18-2018 at 06:37 AM. Reason: Typo |
||
02-18-2018, 07:07 AM | #67 | |
Grand Sorcerer
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
1. Create an Access-Aide folder in the sigil-ebook/sigil/plugins_prefs folder. 2. Create a text file with the name Access-Aide.json in that folder. 3. Edit Access-Aide.json and add the following entry: Code:
{ "basewidth": 100 } |
|
02-18-2018, 09:48 AM | #68 |
Sigil Developer
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
|
Changing the basewidth should make the height smaller as well since I use that dimension to determine the others.
But either way, I should add code to prevent the height from ever being larger than the full screen height. And ditto for the width just to make sure the window is sane. I will add that for the next release. Updated: I have now hopefully fixed this in master: Code:
def GUIUpdateFromList(title, list, basewidth): localRoot = tkinter.Tk() ls = updateList(localRoot, title, list, basewidth) ls.pack(side="top", fill="both", expand=True) localRoot.withdraw() localRoot.update_idletasks() w = localRoot.winfo_screenwidth() h = localRoot.winfo_screenheight() # make sure our frame actually fits on the users screen framewidth = basewidth*2 frameheight = basewidth*2 if framewidth > w: framewidth = w if frameheight > h: frameheight = h framesize = (framewidth, frameheight) x = w//2 - framesize[0]//2 y = h//2 - framesize[1]//2 localRoot.geometry("%dx%d+%d+%d" % (framesize + (x,y))) localRoot.deiconify() localRoot.mainloop() # exits with quit but don't destroy until after read out results # and cleaned up results = [] for (alabel, afield) in ls.cblist: imgpath = alabel.imgpath # attempt to prevent issues on Windows by explicitly closing # all original image files # alabel.origimg.close() altnew = afield.get(1.0,"end") altnew = altnew.strip() if not ls.cancelled: results.append([imgpath, altnew]) localRoot.destroy() return results https://github.com/kevinhendricks/Access-Aide This fix will appear in the next release. You can also simply download the latest version of accessgui.py from there is you want to update your local copy before the next official release. Last edited by KevinH; 02-18-2018 at 02:19 PM. Reason: added repo info and fix available |
02-18-2018, 06:33 PM | #69 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
|
|
02-19-2018, 03:45 PM | #70 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
elibrarian sent me a copy of the document and I have created a start for Accessible Publishing. It has some extracts from the document and tells how to obtain the original. It also serves as well in integrating a few accessible entries throughout the web site. I decided against attaching the whole document due to maintaining it concerns. better to get it from the source.
Dale |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Science Fiction Doctorow, Cory: Someone Comes to Town, Someone Leaves Town v1.0 2007-11-29 | JSWolf | Kindle Books | 3 | 02-21-2018 10:35 AM |
Free (Kindle) Town Without Law by John Russell Fearn [Vintage Town Siege Western] | ATDrake | Deals and Resources (No Self-Promotion or Affiliate Links) | 3 | 06-30-2017 06:16 PM |
Free (Kindle) The Sheriff of Elk Ridge by Mason Macrae [Town Water Shortage Western] | ATDrake | Deals and Resources (No Self-Promotion or Affiliate Links) | 2 | 05-17-2017 11:07 AM |
Science Fiction Doctorow, Cory: Someone Comes to Town, Someone Leaves Town v2.0 2007-12-19 | JSWolf | IMP Books | 1 | 12-19-2007 09:35 AM |
Science Fiction Doctorow, Cory: Someone Comes to Town, Someone Leaves Town v1.0 2007-11-29 | JSWolf | BBeB/LRF Books | 5 | 11-30-2007 08:38 PM |