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 02-15-2018, 05:04 PM   #1
n9qqk
Junior Member
n9qqk began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2018
Device: Nook Simple Touch; Kindle Fire
Prettify HTML questions

Hi all.
After updating my Sigil from 0.7.? to 0.9.8, I noticed that my HTML wasn't being standardized any more. I finally did see that I could manually do it via:

TOOLS ==>
Reformat HTML ==>
Mend and Prettify all HTML files.

I searched the forum and found a post where the author said that he understood why it's no longer automatically done, but didn't elaborate the reason. So, 2 questions:

1) What was the reason for making it not automatic?
2) Could there be added, or is there already, a preference setting to make it automatic? I didn't see one.

Thanks
n9qqk is offline   Reply With Quote
Old 02-15-2018, 05:30 PM   #2
KevinH
Sigil Developer
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: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Not everyone wants to pretify code in the same way and many authors want to make the fewest changes to their xhtml as possible.

You can control mending on open and close but prettifying is something that not everyone wants and is certainly not somethingthat would need to be done repeatedly. So we make a tool to make prettify easier to do when the user wants or needs it.
KevinH is offline   Reply With Quote
Advert
Old 02-15-2018, 05:41 PM   #3
n9qqk
Junior Member
n9qqk began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2018
Device: Nook Simple Touch; Kindle Fire
Thanks for the prompt reply, KevinH.

Your points are noted and I agree.

So although I can do the three mouse-clicks when I want to Standardize the HTML,
I would like a preference (initially set to off) to prettify HTML automatically on OPEN and/or SAVE.

Thanks again.
n9qqk is offline   Reply With Quote
Old 02-15-2018, 05:46 PM   #4
KevinH
Sigil Developer
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: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Sorry, but this is not something we will be changing.
KevinH is offline   Reply With Quote
Old 02-15-2018, 06:26 PM   #5
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,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
If it's the three mouse-clicks that are tripping you up, go into your Preferences and assign a keyboard shortcut to Mend and Prettify All HTML Files.
DiapDealer is offline   Reply With Quote
Advert
Old 02-15-2018, 11:55 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,459
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Previous post made me think -- be nice to have a plugin that displayed a drop down list list of actions that have a shortcut, and carry out the selected action when it's clicked or enter key is pressed - Quick Actions.

With the passage of time I find it harder to remember shortcuts I've assigned. I'd also spot shortcuts I never use intentionally, but sometimes trip up on; such as Ctrl+Q when I'm after Ctrl+A

BR
BetterRed is offline   Reply With Quote
Old 02-16-2018, 03:28 PM   #7
Maui
Connoisseur
Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.
 
Maui's Avatar
 
Posts: 57
Karma: 600000
Join Date: Jan 2018
Device: Galaxy Tab S2
I assume this is not possible. As far as i understood, the plugin system creates files which you can recall from the plugin, and on success are imported in sigil again, but during the runtime of the plugin you do not have "access" to sigil nor you can call any function of sigil.
Maui is offline   Reply With Quote
Old 02-16-2018, 04:17 PM   #8
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,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Plugins would have no knowledge of Sigil's defined keyboard shortcuts.
DiapDealer is offline   Reply With Quote
Old 02-16-2018, 05:01 PM   #9
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,459
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Maui, DiapDealer: I suspected that might be so. Thanks for considering

BR
BetterRed is offline   Reply With Quote
Old 02-17-2018, 11:32 AM   #10
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Quote:
Originally Posted by DiapDealer View Post
If it's the three mouse-clicks that are tripping you up, go into your Preferences and assign a keyboard shortcut to Mend and Prettify All HTML Files.
That's what I did -- Alt+P now Prettifies for me. I use it a lot, because I find it so much easier to scan (run my eye across) Code View when it is neatly laid out. It can get quite scattered otherwise.
Notjohn is offline   Reply With Quote
Old 02-17-2018, 11:35 AM   #11
KevinH
Sigil Developer
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: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
I can understand that if you import html that is horribly formatted all the time. But once you run it nothing in Codeview can mess it up unless you type or paste in a bunch of junk.

So why do you need to use prettify more than once or twice.

Quote:
Originally Posted by Notjohn View Post
That's what I did -- Alt+P now Prettifies for me. I use it a lot, because I find it so much easier to scan (run my eye across) Code View when it is neatly laid out. It can get quite scattered otherwise.
KevinH is offline   Reply With Quote
Old 02-17-2018, 03:14 PM   #12
Maui
Connoisseur
Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.
 
Maui's Avatar
 
Posts: 57
Karma: 600000
Join Date: Jan 2018
Device: Galaxy Tab S2
Quote:
Originally Posted by KevinH View Post
So why do you need to use prettify more than once or twice.
My saved searches aren't really designed to be generic but are working on the outcome of a prettify very well. So i'm doing a prettify often after some of my saved searches to a ground base and get an optical feedback due to a correct/incorrect indentation.

I'm too lazy to modify my saved searches to be more generic.

In addition my clips don't know at which level of <p>/<div> they will end up so i'm calling the prettify option very often.
Maui is offline   Reply With Quote
Old 02-18-2018, 07:39 AM   #13
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Quote:
Originally Posted by KevinH View Post
I can understand that if you import html that is horribly formatted all the time. But once you run it nothing in Codeview can mess it up unless you type or paste in a bunch of junk.

So why do you need to use prettify more than once or twice.
I do a lot of rewriting in Code View. There's one book I take with me to Aspen every December. I ski from nine to noon or one, then update the book in the afternoons. I suppose that long ago I should have updated the original word processor version, but I didn't; I found it easier to work directly in Sigil, and now it's not worthwhile going back to the Word doc.

And sometimes I'll open up WordStar to quick draft a paragraph or two, and paste that in, code-free. (I have clips to add the code.) So it can look pretty ragged on the screen, and I don't like ragged stuff. Prettify does a great job of prettifying, tee hee. By this time I have what amounts to a tic, going Flight Crew / Prettify / Save every ten or fifteen minutes, plus Save a Copy every hour. And all the time, Florencia is chattering in Argie Spanish to her buddies on the phone....
Notjohn is offline   Reply With Quote
Old 03-06-2018, 12:47 PM   #14
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: 667
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by KevinH View Post
So why do you need to use prettify more than once or twice.
Often I do S&R that includes more than one line of code. As the search strings include the whitespace between code, it's simplest to prettify so that the linebreaks and spaces are standard (yeah, I could regex the whitespace, but doing it this way mean I can just copy the lines as-is).

Other edits may un-pretty the code, so I need to redo it before any such search.
AlanHK is offline   Reply With Quote
Reply

Tags
prettify html preference

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Prettify Cover m1d1 Plugins 63 03-19-2024 08:40 AM
HTML to MOBI Conversion General Questions yaelkmiller Conversion 2 12-24-2012 02:27 PM
PDF to HTML page break questions michaelbr PDF 3 01-27-2011 08:49 PM
Calibre Recipe HTML content differs from raw html of index.html. krunk Calibre 4 09-20-2010 09:48 PM
Some HTML Mobipocket desktop/Cybook questions AlexBell Kindle Formats 2 08-26-2008 11:07 PM


All times are GMT -4. The time now is 08:14 AM.


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