Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 09-28-2018, 08:48 AM   #61
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I remember making a hard-coded compromise font-size to make sure it displayed "reasonably" across all platforms and OS versions. Fonts are a huge PITA in Tkinter--especially when cross-platform variables are thrown into the mix. But I'll see what I can do. At the very least, I should be able to create a user preference that users can tweak in the json preferences file.

I gotta say, though, that even with my tired, old blurry eyes, the font-size in that screenshot wouldn't give me any trouble. As such; I certainly wouldn't want to hard-code a new font-size any larger than that for everyone. So I'll have to ponder how best to tackle giving users a choice in the matter.
DiapDealer is offline   Reply With Quote
Old 09-28-2018, 09:10 AM   #62
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by DiapDealer View Post
I gotta say, though, that even with my tired, old blurry eyes, the font-size in that screenshot wouldn't give me any trouble. As such; I certainly wouldn't want to hard-code a new font-size any larger than that for everyone. So I'll have to ponder how best to tackle giving users a choice in the matter.
My tired, old blurry eyes, started off below average. One of my eyes is long sighted and one short sighted. With age the smallest fonts I can read is getting larger and larger, which is why I bought my first ereader. I was having to use a magnifying glass to read most mass paperbacks. My distance vision is not much better. I have problems recognizing people's faces if they are more than 10metres (33ft prox) away.

If there is no easy way to make the change please forget the issue as I can use a magnifying glass on the screen. I always have one by the PC just in case.

I also carry a small folding magnifying with me when I go out again just in case

Thanks
Thasaidon is offline   Reply With Quote
Advert
Old 09-28-2018, 09:33 AM   #63
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Thasaidon View Post
If there is no easy way to make the change please forget the issue as I can use a magnifying glass on the screen. I always have one by the PC just in case.
I don't think it will be difficult to provide a "down-and-dirty" tweak via the preferences file. It would probably have be a manual edit to begin with. That also probably wouldn't hamper a more robust solution later on. I don't know how soon I can have something available, but I should be able to provide you relief without putting myself out too, too terribly.
DiapDealer is offline   Reply With Quote
Old 09-29-2018, 12:24 AM   #64
odamizu
just an egg
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: 1,586
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
I would love to be able to increase the font size as well. I'm not quite to the point of needing a magnifying glass, but there's a lot of squinting up to my computer monitor going on

as always for all that you do!
odamizu is offline   Reply With Quote
Old 09-29-2018, 01:46 AM   #65
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by DiapDealer View Post
I don't think it will be difficult to provide a "down-and-dirty" tweak via the preferences file. It would probably have be a manual edit to begin with. That also probably wouldn't hamper a more robust solution later on. I don't know how soon I can have something available, but I should be able to provide you relief without putting myself out too, too terribly.
Thank you very much.

Details of a "down-and-dirty" manual tweak of the preferences file, sound good to me.
Thasaidon is offline   Reply With Quote
Advert
Old 09-29-2018, 12:58 PM   #66
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Here's a test version for you guys to try out. Before attempting to tweak the fonts, you may want to try it out as is. I changed the defaults to a sans-serif font and changed the font-size to 10 point (I was using a pixel default before). Regardless, you'll need to install the plugin and run it/close it at least one time before the tweak-able preferences will be created in the preferences json file.

As far as tweaking goes, there's two settings available: "font_family" and "font_size". Both are under the "font_tweaks" section.

@Thasaidon: if you're unfamiliar with manually editing a plugin's preferences file, the easiest way to get to it is to open the "Manage Plugins" dialog and click the "Open Preferences Location" button in the bottom right-hand corner of the dialog box. From there you'll want to open the "plugins_prefs" folder and look for the folder with the plugin's name (in this case "TagMechanic") and open it. In that folder you should find a "TagMechanic.json" file. Open it in a text editor to make the following changes.

Look for the new font_tweaks section. The default (after first run) will be:
Code:
"font_tweaks": {
  "font_family": "Helvetica",
  "font_size": "10"
}
Tkinter guarantees that the following font names will always map to a working font-family:
Helvetica (sans-serif)
Times (serif)
Courier (Monspaced)

So while you're free to experiment with other system font names, I can't guarantee they'll work with Tkinter (or my code).

A positive font size value (yes, I know it's a quoted string in this file ... humor me!) specifies points and a negative value ("-12") specifies pixels.

Make your changes (carefully, so as not to change other settings) and they should take effect when you next run the plugin.

Let me know if it's working for you.

@odamizu: remember that installing this new version of the plugin will mean you'll have to redo your code-tweaks from the previous discussion here: https://www.mobileread.com/forums/sh...8&postcount=54
Attached Files
File Type: zip TagMechanic_v0.4.5.zip (22.3 KB, 363 views)

Last edited by DiapDealer; 09-29-2018 at 02:37 PM.
DiapDealer is offline   Reply With Quote
Old 09-30-2018, 01:01 AM   #67
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
I'm sure it's been asked before, but can we have a file selection in the plugin, default all HTML files? It works in "Punctuation Smarten" and other plugins that let me choose files while the plugin is open so it's possible.

I usually want to do do two or three edits at a time, often a "delete naked spans" for all those I have neutered using S&R and then a transform.

It gets tedious doing a series of edits to tags:
1) select all files
2) open plugin
3) fill in edit details
4) close plugin
5) Select all files...

More then half the time is just opening and closing the plugin.

Even worse when I start the plugin and then realise I haven't selected the files and nothing happens; have to exit and redo everything.
AlanHK is offline   Reply With Quote
Old 09-30-2018, 06:49 AM   #68
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'm not cluttering an already busy UI with another file selection dialog when a perfectly good interface to select files to be modified already exists in Sigil. The file selection duplication you mention in "Punctuation Smarten" exists because that plugin was written before Sigil's plugin framework was given the ability to know which files were selected in the Book Browser. Had I created that plugin after that ability was added, its file selection method would work exactly like this plugin's does.

I'm afraid it's also a hard no on having the plugin default to assuming all html files are to be affected. That would defeat the ability to select a subset of files entirely.

When stressing over how much time is lost having to close and relaunch the plugin, try to factor in how much time you would be losing if you had to make all of the desired changes without the assistance of the plugin. I think you'll find you're still way ahead on time saved.

Every plugin I create going forward will work in this manner (RE file selection).
DiapDealer is offline   Reply With Quote
Old 09-30-2018, 07:24 AM   #69
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by DiapDealer View Post
Here's a test version for you guys to try out. Before attempting to tweak the fonts, you may want to try it out as is. I changed the defaults to a sans-serif font and changed the font-size to 10 point (I was using a pixel default before). Regardless, you'll need to install the plugin and run it/close it at least one time before the tweak-able preferences will be created in the preferences json file.
Hi Diapdealer

That suits my needs exactly.

The magnifying glass will get less use and I have a new shiny blue spanner Icon on my Icon toolbar.

Your instructions were most helpful. I have taken a copy of them so I can find them easily in the future if I need them.

I was a coder and systems analyst for over 20 years but due to choices made by management I always ended up in having to code in some form of basic. And unfortunately(?) I have always had so many interests I never got round to learning other programming languages. Plus I never had the need.

Thanks again
Thasaidon is offline   Reply With Quote
Old 09-30-2018, 08:22 AM   #70
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You're very welcome.

The plugin preferences will survive plugins being uninstalled and newer versions being installed. So unless you specifically delete the plugin's preference file, you shouldn't need to worry about redoing the tweak. If you install Sigil on a new machine (or under a different user account), the instructions will come in handy, though. I'll also document the tweaks on the first post of this thread whenever I "officially" update to this new version.

Thanks for reporting back.
DiapDealer is offline   Reply With Quote
Old 09-30-2018, 09:31 AM   #71
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
Quote:
Originally Posted by DiapDealer View Post
Every plugin I create going forward will work in this manner (RE file selection).
OK. This is good idea, but IMHO better solution is:
* if are (x)html files selected -- use bk.selected_iter()
* if not (for example selected is folder "Text") -- use bk.text_iter() (all files)

Because TagMechanic is a great plugin - the ability to run it for all files, but without the need to select them significantly speeds up the work.

Look at the attachment.
Attached Files
File Type: zip TagMechanic_v0.4.5.1.zip (28.6 KB, 378 views)
BeckyEbook is offline   Reply With Quote
Old 09-30-2018, 10:30 AM   #72
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by BeckyEbook View Post
OK. This is good idea, but IMHO better solution is:
* if are (x)html files selected -- use bk.selected_iter()
* if not (for example selected is folder "Text") -- use bk.text_iter() (all files)

Because TagMechanic is a great plugin - the ability to run it for all files, but without the need to select them significantly speeds up the work.
Sorry. I don't see the problem. Nor do I see your proposal as a "better" solution. The better solution is to commit how the plugin actually works (instead of how you wished it worked) to memory and move on. There's no way I'm going to assume that someone who forgot to select ANY xhtml files would want ALL xhtml files to be processed by default. That makes zero sense to me.

Quote:
Originally Posted by BeckyEbook View Post
Look at the attachment.
No. The problem is not me not understanding how to code what you're asking for. The problem is me not thinking what you're asking for is good idea.
DiapDealer is offline   Reply With Quote
Old 09-30-2018, 10:58 AM   #73
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
That's why I wrote "IMHO".

Some plugins written by Doitsu work in this way:
* AddIDs
* LanguageTool
* Proselint
* RegexTester
* TTS

By Francesco Martini:
* fileNamesAsTitles (and others)

I like this way and use it every day, also in private plugins.

Last edited by BeckyEbook; 09-30-2018 at 11:05 AM. Reason: Added plugin
BeckyEbook is offline   Reply With Quote
Old 09-30-2018, 11:25 AM   #74
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Your ability to make private plugins suggests that you'll have no problem altering mine to support your particular needs. Your mistake is in assuming that your particular needs for my plugin make the most sense for everybody.

My plugin works the way I want it to. I'll entertain improvement suggestions, and incorporate them when they make sense to me. But I've made my decision on this particular front, so there's really no sense in continuing to offer rationales for the change. The plugin works on the xhtml files selected in Sigil's Book Browser. Period. That info is #1 in the instructions for using the plugin. It's bold and it's underlined.

I appreciate that people find my plugin very useful, and I welcome suggestions for improvements. But this particular question has been asked and anwered. My mind is made up. So I'd appreciate it if we could drop it and move on.
DiapDealer is offline   Reply With Quote
Old 09-30-2018, 02:49 PM   #75
odamizu
just an egg
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: 1,586
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
Quote:
Originally Posted by DiapDealer View Post
Here's a test version for you guys to try out ... two settings available: "font_family" and "font_size". Both are under the "font_tweaks" section.


This is perfect!

My faulty, aging eyes
odamizu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 27 01-16-2023 01:25 AM
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 492 10-25-2022 08:13 AM
Plugin not customizable: Plugin: HTML Output does not need customization flyingfoxlee Conversion 2 02-24-2012 02:24 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM
New Plugin Type Idea: Library Plugin cgranade Plugins 3 09-15-2010 12:11 PM


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


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