Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-28-2019, 04:43 PM   #1
dlibke
Junior Member
dlibke began at the beginning.
 
Posts: 8
Karma: 10
Join Date: May 2016
Device: none
Sigil temporary files folder default path

My wife is using Sigil 0.9.13 to edit her ebook. Today saying that her edits from yesterday are not are not there, though, the last modified date on the file in the laptop folder is yesterday (5/26/19) at 4:12 PM, which she says is about when she stopped and saved the file. The file on the NAS backup folder show the previous day (5/26/19 4:52 PM). The two file when opened both end with the same sentence.

When I opened Sigil Preferences->General Settings, the Set Folder where temporary file should be saved had a value. I need to know what that file path is. When I clicked on the browse button, in stead of opening the folder in the text box, the dialog opened the current editor file's folder, which immediately replaced the preference text box content. As a software architect, that behavior was totally unexpected.

Now I need that default value to see if a temporary copy of her edits is there. I do not want to close the Preferences window for fear that the folder will be deleted thus permanently losing the missing edits.
dlibke is offline   Reply With Quote
Old 05-28-2019, 05:26 PM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by dlibke View Post
Now I need that default value to see if a temporary copy of her edits is there.
Sigil uses the system temp folder by default. If you have a Windows machine, you can display the temp folder by pressing Windows+R (Run) and entering %temp%.

Sigil temp folders start with Sigil, e.g. Sigil-GbVnRY. However, they're usually deleted once you close Sigil.

Last edited by Doitsu; 05-28-2019 at 05:30 PM.
Doitsu is offline   Reply With Quote
Advert
Old 05-28-2019, 05:29 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,891
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Using an Active cloud folder with Sigil may not be a great idea (I know it is a terrible idea with Calibre which performs multiple transactions on what appears a simple task)

FWIW the default temp f
Code:
temp_folder_path=C:/Users/<user logon>/AppData/Local/Temp
older
theducks is offline   Reply With Quote
Old 05-28-2019, 05:55 PM   #4
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: 28,352
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by dlibke View Post
When I opened Sigil Preferences->General Settings, the Set Folder where temporary file should be saved had a value. I need to know what that file path is. When I clicked on the browse button, in stead of opening the folder in the text box, the dialog opened the current editor file's folder, which immediately replaced the preference text box content. As a software architect, that behavior was totally unexpected.
As a software architect: patches are welcome.

The 'Browse' button is not intended to be used to "browse" the contents of the current scratch folder. In fact, manual access to Sigil's scratch directory is not recommended at all (hence the non-path default value). The "Browse" button is used to browse for a new location where you want Sigil to create its scratch directories. The "Auto" button puts it back to the Sigil default. The only reason to use the Browse/Auto buttons if there are permission problems with the default location (or you're trying to work around a MacOS issue where epubs left open in Sigil for days can have their temp files harvested by the OS).

In all honesty... there probably shouldn't have been a real file-path in the text box to begin with. The default value is "<SIGIL_DEFAULT_TEMP_HOME>." It should only be changed from that default to address some very specific issues (mentioned above). Manually editing files in Sigil's scratch directory with other software while Sigil has them open is a surefire fire way to mess things up badly (including lost content). That's why we stopped showing the actual path in the text box in the first place. I can't stress enough how those files should be left entirely alone.

Quote:
Originally Posted by dlibke View Post
Now I need that default value to see if a temporary copy of her edits is there. I do not want to close the Preferences window for fear that the folder will be deleted thus permanently losing the missing edits.
Closing the Prefs Window won't delete any temp folders. Closing Sigil is what triggers the scratch folder cleanup routine.

Last edited by DiapDealer; 05-28-2019 at 06:46 PM.
DiapDealer is offline   Reply With Quote
Old 05-28-2019, 07:55 PM   #5
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: 21,612
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
When I first install an application the first thing I do is to explore its Menus and Preferences (Settings, Options, Hamburger button, whatever).

Quote:
Originally Posted by DiapDealer View Post
In all honesty... there probably shouldn't have been a real file-path in the text box to begin with. The default value is "<SIGIL_DEFAULT_TEMP_HOME>." It should only be changed from that default to address some very specific issues (mentioned above).
I assumed the <SIGIL_DEFAULT_TEMP_HOME> was an oblique reference to an Environment Variable. I discovered it wasn't after some experimentation with an environment variable editor; took me a while to fathom it is probably an oblique reference to a #define in the code.

AFAIK: the conventions of using all-caps for both Environment Variable and #define names is an unfortunate coincidence.

Quote:
Originally Posted by DiapDealer View Post
Manually editing files in Sigil's scratch directory with other software while Sigil has them open is a surefire fire way to mess things up badly (including lost content). That's why we stopped showing the actual path in the text box in the first place. I can't stress enough how those files should be left entirely alone.
The Open With <whatever> feature can be used to open the selected file safely in the temporary sub-directory Sigil creates in the designated directory. See post #8 for further details.

Here's me editing one of the xhtml files in an epub using Notepad++ that I initiated via Sigil's Open With feature.

Click image for larger version

Name:	Annotation 2019-05-29 092749.jpg
Views:	364
Size:	43.8 KB
ID:	171686

Quote:
Originally Posted by DiapDealer View Post
... (or you're trying to work around a MacOS issue where epubs left open in Sigil for days can have their temp files harvested by the OS).
Does that explain why it's not an environment variable, i have had Mac users tell me, disdainfully, that Macs don't have environment variables because they (envars) are another 'crappy' Windows 'thing' Ψ³

OT and FWIW: The environment variable SIGIL_PREFS_DIR can be used to relocate the location of Sigil's Preferences directory - even on a MacOS system.

BR

Last edited by BetterRed; 05-29-2019 at 06:39 PM.
BetterRed is offline   Reply With Quote
Advert
Old 05-28-2019, 08:31 PM   #6
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: 28,352
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by BetterRed View Post
I assumed the <SIGIL_DEFAULT_TEMP_HOME> was an oblique reference to an Environment Variable. I discovered it wasn't after some experimentation with an environment variable editor; took me a while to fathom it is probably an oblique reference to a #define in the code.
Nope. It's a placeholder. Nothing more. It's an easy way to tell if the default setting has been changed. It's apropos of nothing.

Quote:
Originally Posted by BetterRed View Post
The Open With <whatever> will open selected file in the Sigil-xxxxx directory Sigil creates in the <SIGIL_DEFAULT_TEMP_HOME> directory.


Here's me editing one of the xhtml files in an epub using Notepad++ that I initiated via Sigil's Open With feature.
And?



Quote:
Originally Posted by BetterRed View Post
Does that explain why it's not an environment variable, i have had Mac users tell me, disdainfully, that Macs don't have environment variables because they (envars) are another 'crappy' Windows 'thing' Ψ³
Anyone who tells you that environment variables are another crappy Windows thing is an idiot.

Quote:
Originally Posted by BetterRed View Post
OT and FWIW: The environment variable SIGIL_PREFS_DIR can be used to relocate the location of Sigil's Preferences directory - even on a MacOS system.

BR
That's because environment variables exist/work in MacOS. Contrary to what anyone has disdainfully told you about them. I can't imagine why any knowledgeable Mac user would tell you Macs "don't have them."

But no. <SIGIL_DEFAULT_TEMP_HOME> is not an environment variable because it's not an environment variable. I don't know how else to explain it. It's an unspecified default value, or it's a file path manually selected by the user.

Last edited by DiapDealer; 05-28-2019 at 08:37 PM.
DiapDealer is offline   Reply With Quote
Old 05-28-2019, 10:18 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: 21,612
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DiapDealer View Post
And?
I thought it worth pointing out that Sigil provides a 'safe' way to:- "Manually edit files in Sigil's scratch directory with other software while Sigil has them open".

BTW: I've also had Mac users tell me the don't need the equivalents of Windows shortcut files because they have symlinks, whilst others have told me Macs don't have symlinks because they're a Windows 'thing'. And they're disposed to continue arguing when I've shown them aliases and symlinks on their own Macbooks. I once had a Linux sysprog/sysadm aficionado tell me that Windows symlinks were just another name for Windows shortcuts

BR
BetterRed is offline   Reply With Quote
Old 05-29-2019, 09:01 AM   #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: 28,352
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by BetterRed View Post
I thought it worth pointing out that Sigil provides a 'safe' way to:- "Manually edit files in Sigil's scratch directory with other software while Sigil has them open".
Yes, it does. Sigil makes sure any outstanding changes in Sigil have been flushed to disk before opening the file in the external editor, and then monitors the externally opened scratch file for changes (QFileSystemWatcher) and makes sure the gui is updated with those changes when they are written. Neither of those things happen when manually opening the scratch directory and launching files in ones own external editor to make changes. Changes made (both externally and internally) could easily be lost when doing it without the assistance of Sigil's "Open With." feature.

Sorry, I thought you were suggesting that using the Open With feature was no different then manually editing files in Sigil's scratch directory with other software while Sigil has them open.
DiapDealer is offline   Reply With Quote
Old 05-29-2019, 09:04 AM   #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: 28,352
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by BetterRed View Post
whilst others have told me Macs don't have symlinks because they're a Windows 'thing'.
Again ... anyone who suggests symlinks are a "Windows thing" is probably not someone you would want to look to for computer insight (Mac or otherwise).
DiapDealer is offline   Reply With Quote
Old 05-29-2019, 10:49 AM   #10
dlibke
Junior Member
dlibke began at the beginning.
 
Posts: 8
Karma: 10
Join Date: May 2016
Device: none
Thank everyone for you responses. I found the location of Sigil's scratch folder, which has different paths on airBook vs iMac. Both /var as the root. I was not looking to edit any files in the folder (know better) but quickly deduced that the folder is created when Sigil opens as the OEBPS/Text files and their content was the same as in the editor., which was the same as in the ePub directory.

What happened according to my wife was that she save the book and watched the status bar to verified the file was saved but did not close Sigil thing that she might do some more writing before going to bed. The next morning not seeing the editor, she opened the ePub file in Sigil only to find her latest added text was not there. I was hoping to find a Sigil backup file that had the missing edits from the previous day so that I could copy the missing text and paste it into the code view.

I did note that although the 5/26 NAS file and the 5/28 airBook file end with the same sentence, the airBook file is larger than the NAS file by a number of kilobytes.

Is there some way/where I can find the missing text? Or does my wife have to reconstruct the missing text?
dlibke is offline   Reply With Quote
Old 05-29-2019, 11:00 AM   #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: 28,352
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by dlibke View Post
I did note that although the 5/26 NAS file and the 5/28 airBook file end with the same sentence, the airBook file is larger than the NAS file by a number of kilobytes.

Is there some way/where I can find the missing text? Or does my wife have to reconstruct the missing text?
An epub is nothing more than a specifically structured zip archive. You could try unzipping the larger one and checking the files in the OEBPS/Text folder to see what's there, and why there's a size discrepancy.

Is she actually using Sigil to write her book? If so, that's not really typical usage (though some choose to do so). Sigil is typically used to build epubs from externally created content and to edit/tweak existing epubs). I don't really recommend it as an authoring tool, myself. But others' mileage will vary.

Last edited by DiapDealer; 05-29-2019 at 11:08 AM.
DiapDealer is offline   Reply With Quote
Old 05-29-2019, 06:22 PM   #12
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: 21,612
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DiapDealer View Post
Again ... anyone who suggests symlinks are a "Windows thing" is probably not someone you would want to look to for computer insight (Mac or otherwise).
Nay, the Mac users in question came to me with their problems, echoing what they'd read, seen, or heard on some Macspurt preacher's blog, youtube channel, etc

BR
BetterRed is offline   Reply With Quote
Old 05-29-2019, 07:12 PM   #13
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: 21,612
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DiapDealer View Post
An epub is nothing more than a specifically structured zip archive. You could try unzipping the larger one and checking the files in the OEBPS/Text folder to see what's there, and why there's a size discrepancy.
@dlibke - FWIW - the calibre ebook editor has an 'epub compare tool' that has saved me from grief a couple of times, the editor can be used independently of calibre's ebook library management application.

@DiapDealer - could a future version of Sigil have something similar - or maybe an Epub Compare plugin would be better. And I edited my post re Open With to include the word 'safely'

BR

Last edited by BetterRed; 05-29-2019 at 07:14 PM.
BetterRed is offline   Reply With Quote
Old 06-06-2019, 04:28 AM   #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: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
(redacted)

Last edited by AlanHK; 06-06-2019 at 04:31 AM.
AlanHK is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FBReader Pro Default temp files folder OldLincoln Android Devices 2 04-24-2016 10:28 AM
temporary files - where are they located? Skeeve Calibre 3 02-14-2015 03:18 AM
Temporary files and Owncloud apastuszak Calibre 3 05-08-2014 06:25 PM
Default Path Calibre Themus Calibre 2 08-12-2010 10:44 PM


All times are GMT -4. The time now is 08:35 PM.


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