Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-21-2021, 11:03 AM   #31
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, myself, don't really see much advantage to opening a single xhtml file for editing in PageEdit (via Book Browser's Open With) vs. opening PageEdit with all resources available and the selected xhtml resource open for editing (via the Launch External xHTML button). But people are free to define their external editors for Book Browser's "Open With" any way they like.

I agree we shouldn't complicate Open With's purpose of monitoring one file at a time.
DiapDealer is offline   Reply With Quote
Old 08-21-2021, 11:09 AM   #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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
I do think we should still check if the current tab is an xhtml file or an opf file and if not return an error like we did back in the Sigil 1.5.1 timeframe with launchWithXEditor.
Agreed. That was my intention. It's not that big of a deal that it will work with any file selected in Book Browser (when PageEdit is defined as the special external xhtml editor), but it still could lead to confusion.
DiapDealer is offline   Reply With Quote
Old 08-21-2021, 12:46 PM   #33
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,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Pushed that fix to master (ie. PageEdit can only be launched when current tab is xhtml or opf tab).

BTW, in Resource.cpp it seems the we note the file system last modified date on that resource file and if it ever changes, we emit a ResourceUpdatedOnDisk signal which ends with a call to LoadFromDisk.

I am not sure if this does exactly the same thing as a FileWatcher does but it might be enough to allow "Open With" on PageEdit's OPF to work for BetterRed without specifically
watching all of the xhtml files.

I am just not sure. I could not find any other mechanism that would allow an xhtml resource to detect its disk version has been modified underneath it (other than the official FileWatcher).
KevinH is offline   Reply With Quote
Old 08-21-2021, 06:42 PM   #34
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,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
should have let you know I only upgraded Sigil and PageEdit from 1.0 to 1.7 on Wednesday 18th inst, so what I described was based on my usage in 1.0.

I can reinstall Sigil/PE 1.0, there was no compelling reason for me to upgrade to 1.7. Given the ongoing question marks about launching Sigil via calibre's Open With I've switched to using the calibre ebook editor for code editing.

I'd prefer to use PageEdit independently of Sigil, like this:

Click image for larger version

Name:	Clipboard01.jpg
Views:	191
Size:	157.7 KB
ID:	188835

BR

Last edited by BetterRed; 08-21-2021 at 07:05 PM.
BetterRed is online now   Reply With Quote
Old 10-11-2021, 01:26 AM   #35
FriedGopher
Member
FriedGopher began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Dec 2013
Device: none
I have a quick related question about the ePub book I'm working on with separate files for each chapter. I'm OK with deleting and importing the files/chapters in Sigil when they change, but I have a single CSS file for all chapters.

If I put a link to that CSS file in all 57 chapters (I can explain why I want to do that if anyone cares), will that cause any problems in Sigil?

Should I delete those links before publishing the book, or are the readers smart enough not to bother reloading the CSS 57 times?
FriedGopher is offline   Reply With Quote
Old 10-11-2021, 03:13 AM   #36
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by FriedGopher View Post
I have a quick related question about the ePub book I'm working on with separate files for each chapter. I'm OK with deleting and importing the files/chapters in Sigil when they change, but I have a single CSS file for all chapters.

If I put a link to that CSS file in all 57 chapters (I can explain why I want to do that if anyone cares), will that cause any problems in Sigil?

Should I delete those links before publishing the book, or are the readers smart enough not to bother reloading the CSS 57 times?
Having link to the main CSS stylesheet and any other CSS stylesheets from every xhtml file they apply to is pretty standard behaviour. How else is the renderer going to know which CSS to apply to the file?

I'm not sure why you would be editing separate files stored outside the epub .zip container. Even if I use a external editor, it is called from within Sigil using the setting under General/Basics/Set your preferred external xhtml editor.
DNSB is offline   Reply With Quote
Old 10-15-2021, 11:43 AM   #37
FriedGopher
Member
FriedGopher began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Dec 2013
Device: none
Quote:
Originally Posted by DNSB View Post
I'm not sure why you would be editing separate files stored outside the epub .zip container. Even if I use a external editor, it is called from within Sigil using the setting under General/Basics/Set your preferred external xhtml editor.
Thanks.

I would try an external editor, but I've never gotten that to work. I set the setting, but it has no effect, and I don't see an option anywhere to invoke the external editor.
FriedGopher is offline   Reply With Quote
Old 10-15-2021, 06:37 PM   #38
FriedGopher
Member
FriedGopher began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Dec 2013
Device: none
Quote:
Originally Posted by DNSB View Post
Even if I use a external editor, it is called from within Sigil using the setting
under General/Basics/Set your preferred external xhtml editor.
I created that setting, but it has no effect. If there's a way to launch the external editor, I haven't found it. Maybe I'm missing something.
FriedGopher is offline   Reply With Quote
Old 10-16-2021, 03:31 PM   #39
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
The toolbar button for launching the external editor? It's explained in the user guide. The default keyboard shortcut for it is F2. But keep in mind that it's designed as an external xhtml editor. Use the Open With feature to define/launch external editors for other file types. You can right-click on files in the Book Browser to do that.

All will be watched and Sigil updated whenever the external editor is saved/closed.

The main thing is to stay out of Sigil's temporary working directory. Manually messing with those files while Sigil is running is strenuously discouraged.

Last edited by DiapDealer; 10-16-2021 at 03:38 PM.
DiapDealer is offline   Reply With Quote
Old 10-23-2021, 12:54 PM   #40
FriedGopher
Member
FriedGopher began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Dec 2013
Device: none
Thanks! I had searched the User Guide, but couldn't find that.

That does work, but as I should have guessed, there's no way I could find to make it edit exported files, rather than the data in Sigil.

That means I can't use Git for version control on the individual files and for backing up the revision history to GitHub. It also means there's no easy way to use SCSS, and no way to run the utility programs I've created for modifying the files.

Some CMS systems I've worked with have the option to store files on disk or in their local data storage. I know that feature would be really helpful to me, but I can understand if you don't think enough people would use it to make it worth adding.
FriedGopher is offline   Reply With Quote
Old 10-23-2021, 01:48 PM   #41
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
Have you looked at the FolderIn/FolderOut plugins? Those were designed with CVS in mind. Sigil's own checkpointing feature also creates local git repositories for epubs in the Sigil Preference directory. There's no reason those repos couldn't have github remotes defined so that commits could then be pushed. I can't speak to the SCSS aspect, since that's not valid in epubs, but there's a few ways that Sigil can be used to edit content maintained in CVS.
DiapDealer is offline   Reply With Quote
Old 10-23-2021, 01:50 PM   #42
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,644
Karma: 5433388
Join Date: Nov 2009
Device: many
You can use git. Simply use FolderIn and FolderOut plugins to write/load files to/from the repo. We do this with our User Guides for Sigil and PageEdit.

So the workflow is to use FolderIn to load the epub from a github repo. Make any changes you need in Sigil using its editors or OpenWith and your favourite editors and when ready use FolderOut to write the files to the repo and do you commits if you desire.

In addition, Sigil's Checkpoint feature already creates a github repo to store files in in case reversions are needed. That internal github repo is stored in the Sigil Preferences directory. It can be accessed and manipulated like any git repo. Making a Checkpoint creates a tagged commit to this internal github repo.
KevinH is offline   Reply With Quote
Old 10-23-2021, 02:46 PM   #43
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 could also do something with git subtrees. Have some sort of automated process that generates the css from your SASS and use Sigil to edit the subtree epub source. Just keep in mind that anything done to the css in the epub is not going to be able to be replicated back to your SASS. Editing SASS in Sigil isn't going to be feasible. You're going to need to somehow externally preprocess your scss before using Sigil to preview/edit the epub. As I said: some judicious use of subtrees and some preprocessing scripts could work with Sigil and its CVS options.
DiapDealer is offline   Reply With Quote
Old 10-29-2021, 08:29 PM   #44
FriedGopher
Member
FriedGopher began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Dec 2013
Device: none
Great information. Thanks!
FriedGopher is offline   Reply With Quote
Reply

Tags
refresh, reload, update


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil with audio files smarsten Sigil 16 04-07-2015 10:07 AM
Sigil has trashed more files JimmyG Sigil 37 05-04-2013 05:32 PM
Multiple files, *-tmp.epub, are left in /tmp/Sigil/scratchpad after closing Sigil Ahmad Samir Sigil 8 11-28-2012 04:27 AM
Sigil 024 and regular expressions on "all HTML files" WS64 Sigil 4 08-13-2010 07:33 PM
Sigil and CSS files crutledge Sigil 6 05-20-2010 09:02 AM


All times are GMT -4. The time now is 05:33 AM.


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