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 09-20-2015, 09:50 AM   #1
Echeban
Junior Member
Echeban began at the beginning.
 
Echeban's Avatar
 
Posts: 8
Karma: 10
Join Date: Sep 2015
Location: West Virginia
Device: Kindle
Refresh files in Sigil when html files have changed outside Sigil

How can I refresh files in Sigil when HTML files have changed outside Sigil, without having to delete them and load them back in?
Does a feature to do this exists?
If not, this would be my top#1 priority item for the wish list.
Echeban is offline   Reply With Quote
Old 09-20-2015, 10:10 AM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
What do you mean?

I believe Sigil buffers all the files, they aren't available anywhere for modification.
Even if they were, I am not aware of any other application that checks for other processes modifying its own temp files.


Whyever you want to do this, I strongly suggest you consider refocusing, and creating a plugin to do %whatever% instead.
eschwartz is offline   Reply With Quote
Advert
Old 09-20-2015, 10:44 AM   #3
Echeban
Junior Member
Echeban began at the beginning.
 
Echeban's Avatar
 
Posts: 8
Karma: 10
Join Date: Sep 2015
Location: West Virginia
Device: Kindle
I create my content using LaTeX. I convert that to HTML (plus images) using Plastex. I import the HTML files into Sigil to assemble the eBook (Sigil automatically bring the images in). Any problem that I see with the ePub, I try to solve it in Latex to maintain automation. That requires reloading all the HTML files into Sigil every time I make a change in the content (in LaTeX). So, I have to delete all files and images from Sigil, then load them back in. Tedious. How can I automate this?
Echeban is offline   Reply With Quote
Old 09-20-2015, 11:17 AM   #4
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
If you right-click on a HTML file, you can open it in another editor. If you save it there, it will get reloaded into Sigil.
Toxaris is offline   Reply With Quote
Old 09-20-2015, 11:41 AM   #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,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You can't modify files outside of Sigil and have changes to those external files reflected in Sigil. Sigil maintains its own copies of files once imported. There is no connection between them and the original files anymore. Nor will there ever be.

If you need to modify html files (that are already IN Sigil) with an external editor, then use the Open With feature. If you right click on an (x)html file within Sigil's Book Browser, you can select "Open with", and then choose the executable of the external editor you'd like to use.

But for the automated process you desire, I doubt that will be sufficient. What you are describing sounds like the perfect candidate for an Import plugin.

I'm afraid there's never going to be an integral Sigil feature that synchronizes its internal, epub file structure with a corresponding external file structure. It's just not feasible.
DiapDealer is offline   Reply With Quote
Advert
Old 09-20-2015, 11:49 AM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
If you are currently maintaining your source files in LaTeX, I would think you might want to convert them directly to EPUB without bothering with Sigil. Or simply use Sigil to preview the auto-generated EPUB.

It looks like Plastex already has an EPUB renderer.
You could also use pandoc.


If you want, though, Plastex is written in pure python, so you could turn it into a Sigil plugin and use it to import a LaTeX book into Sigil.

EDIT: Beaten by DiapDealer.

Last edited by eschwartz; 09-20-2015 at 11:51 AM.
eschwartz is offline   Reply With Quote
Old 09-20-2015, 05:37 PM   #7
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,457
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by eschwartz View Post
I am not aware of any other application that checks for other processes modifying its own temp files.
pretty sure Notepad++ does, happens to me quite a lot.

If the original source is changed by another application whilst Notepad++ is 'editing it' then Notepad++ will tell you, it will offer the choice of reloading the updated copy, which will of course overwrite any changes previously made by Notepad++. If you save the Notepad++ 'copy' it will of course overwrite whatever the other application wrote.

That's on Windows, of course.

BR

Last edited by BetterRed; 09-20-2015 at 05:42 PM.
BetterRed is online now   Reply With Quote
Old 09-20-2015, 06:24 PM   #8
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by BetterRed View Post
pretty sure Notepad++ does, happens to me quite a lot.

If the original source is changed by another application whilst Notepad++ is 'editing it' then Notepad++ will tell you, it will offer the choice of reloading the updated copy, which will of course overwrite any changes previously made by Notepad++. If you save the Notepad++ 'copy' it will of course overwrite whatever the other application wrote.

That's on Windows, of course.

BR
Oh, plenty of text editors do that. They're checking the original document, not the temp files created from expanding a zipfile for editing.

You can only compare Notepad++ -- and gedit and gVim and presumably many others, for that matter -- to Sigil in the context of suggesting that Sigil notice when the EPUB itself has been updated.
Personally, I don't feel the need for this feature much.



What the OP is asking is more akin to a way to modify the current Notepad++ buffer, without touching the disk at all.

Which is why I really do think the only way is to use a plugin to change the file(s) inside the application.
eschwartz is offline   Reply With Quote
Old 09-20-2015, 07:53 PM   #9
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,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Correct. It's one thing for a text editor to let you know when something else has modified the file you have open (and offer to reload the changes) , it would be entirely another thing for an editor to notify you that the original file (which you copied all your text from--into the document you currently have open) was modified (and offer to update your completely different document with those changes). Which, in essence, is what the OP is wanting; if I understand them correctly.

He wants Sigil to automatically keep track of all the files that the internal ePub files used to be (before they were imported). When those external files change, he would like Sigil to automatically reflect those changes.
DiapDealer is offline   Reply With Quote
Old 09-20-2015, 08:51 PM   #10
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,457
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Surprising (for me) Discovery : I have a small book open in Sigil and I right click on the index.xhtml file and edit with Notepad++. Then I save the changes in Notepad++. The changes I just made are immediately apparent in Sigil - the text in the code view window changes before my very own eyes

I'm sure this is by design, not the sort of thing that happens inadvertently. I suspect we're probably all saying the same thing from different perspectives. I am not sure it's germane to OPs issue, that's why a made my post OT.

Added : it's also what Toxaris said Sigil did. I guess I'd prefer a warning like Notepad++ has. But, I never edit epub component files outside of sigil while sigil has the epub open. I prefer to unzip the epub, do the editing (most often images) and rezip the epub. For no good reason I have a prejudice against deep process trees

Feel free to delete posts 7-10 - over and out.

BR

Last edited by BetterRed; 09-20-2015 at 09:19 PM.
BetterRed is online now   Reply With Quote
Old 09-20-2015, 09:34 PM   #11
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,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Yes. That is the Open With feature. It works as it is designed to. Allowing people to use their favorite html editor instead of Sigil's to edit their epub's html; or allowing them to edit/resize their epub's images with their favorite image editor. All without having to deal with the overhead of exporting/editing/reimporting (or unzipping/editing/rezipping/reopening).

I'm a little confused as to why you would be surprised that Sigil updates immediately when you click "Save" after making changes in the external editor, though. I would think that after taking the time to make/save changes, one would want/expect to see the changes one made after saving. A warning that saving changes to a file is going to result in changes to a file would seem like overkill to me.

P.S. I'm not going to delete any posts. The Open With feature and external editors and their behavior are at the very least tangentially relevant to what the OP is talking about.

Last edited by DiapDealer; 09-20-2015 at 09:51 PM.
DiapDealer is offline   Reply With Quote
Old 08-19-2021, 12:50 AM   #12
FriedGopher
Member
FriedGopher began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Dec 2013
Device: none
I'm in a similar boat with the OP. I maintain my files in a PhpStorm Project. This allows me to use Git to maintain version control with a remote repository.

If I'm understanding things, Open With would allow me to edit an individual file in PhpStorm, but would not allow me to deal with them *inside* a PhpStorm project. It would also launch PhpStorm each time I wanted to edit a file, which would be quite slow.

Having them in a PhpStorm project allows me to set project-specific coding standards and inspections as well a live templates and many other features not available in the Sigil editor, such as custom autocomplete and instant error checking and correction. PhpStorm can do this only because it's aware of all the other files in the project.

Inside the project, I can also use SCSS for the CSS code and have it auto saved to a .CSS file when saved.

My not-so-brilliant idea was to extract the files from the Sigil ePub with 7zip, work on them in PhpStorm, then either rezip them to .ePub or delete all files in Sigil and re-import them. As you've made clear neither of these is likely to work (for one thing, re-importing them trashes some of the external links in a book).

An "Import and truly replace" files feature would be a Godsend for me, though I can see why it might not be worth your effort.
FriedGopher is offline   Reply With Quote
Old 08-19-2021, 01:34 PM   #13
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,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Checkout the Folder In and Folder Out plugins: https://www.mobileread.com/forums/sh...d.php?t=293649

They were designed for editing files that are kept in CVS repositories. Not sure that Sigil will be able to edit anything with an .scss extension, though.
DiapDealer is offline   Reply With Quote
Old 08-19-2021, 01:47 PM   #14
Binchen
Connoisseur
Binchen began at the beginning.
 
Posts: 57
Karma: 10
Join Date: Jul 2021
Device: Abakus
Quote:
Originally Posted by BetterRed View Post
pretty sure Notepad++ does, happens to me quite a lot.

If the original source is changed by another application whilst Notepad++ is 'editing it' then Notepad++
The difference is that notepad is working on these files. Sigil is importing the files and working on a complete different file - the epub.
Binchen is offline   Reply With Quote
Old 08-19-2021, 01:53 PM   #15
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
Also, Sigil has some python based capabilities to work with git repositories via the dulwich project that it uses to implement its Checkpoint and Restore capabilities. That code base could be used in a plugin without too much trouble.
KevinH is offline   Reply With Quote
Reply

Tags
refresh, reload, update

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:56 AM.


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