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-19-2025, 06:12 PM   #16
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: 862
Karma: 3461504
Join Date: Jan 2017
Location: Poland
Device: Various
Great idea.

Here's a plugin for lazy users who don't want to manually edit env-vars.txt file.

Click image for larger version

Name:	sigil_env.png
Views:	30
Size:	29.9 KB
ID:	217583

Last edited by BeckyEbook; Today at 10:47 AM. Reason: Remove pre-release version.
BeckyEbook is offline   Reply With Quote
Old 08-19-2025, 06:44 PM   #17
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,798
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by BeckyEbook View Post
Great idea.

Here's a plugin for lazy users who don't want to manually edit env-vars.txt file.

Attachment 217583
You seem to be missing a couple:

Click image for larger version

Name:	user-envvars.jpg
Views:	20
Size:	60.3 KB
ID:	217584

SIGIL_USES_DARK_MODE maybe defunct, but SIGIL_PREFS_DIR is definitely active, I occasionally swap in "_AppData/Sigil/Prefs_default".

BR

PS: I assume use of the env-vars.txt file is optional.

Last edited by BetterRed; 08-19-2025 at 06:48 PM.
BetterRed is online now   Reply With Quote
Advert
Old 08-19-2025, 06:58 PM   #18
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,680
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by BetterRed View Post
SIGIL_PREFS_DIR is definitely active, I occasionally swap in "_AppData/Sigil/Prefs_default".
SIGIL_PREFS_DIR is one you won't be able to set with the new env-vars.txt feature. You have to know the prefs dir to find the env-vars.txt file that will set variable to find the prefs dir to find the env-vars.txt file to set the variable to find the.... you get the picture.

Quote:
Originally Posted by BetterRed View Post
PS: I assume use of the env-vars.txt file is optional.
Of course. The file does not exist by default.

Last edited by DiapDealer; 08-19-2025 at 07:37 PM.
DiapDealer is offline   Reply With Quote
Old 08-19-2025, 09:13 PM   #19
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: 46,860
Karma: 169712582
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by BeckyEbook View Post
Great idea.

Here's a plugin for lazy users who don't want to manually edit env-vars.txt file.
Nice!

I'll test it as soon as my compile finishes. I came here to whinge but KevinH ninja'd me.
DNSB is offline   Reply With Quote
Old Yesterday, 09:44 AM   #20
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,680
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'm loving this. So simple, so handy.
DiapDealer is offline   Reply With Quote
Advert
Old Yesterday, 10:46 AM   #21
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: 8,879
Karma: 6120478
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by BeckyEbook View Post
Great idea.

Here's a plugin for lazy users who don't want to manually edit env-vars.txt file.

Attachment 217583
Wow, nicely done! It was even smart enough to keep the custom env var names I was using for testing.

FWIW, I have tried to fix up the sigil-user-guide for future Sigil 2.6.2 release,
with info on the env-vars.txt file.

So if anyone is interested in vetting it and adding to it, please start by grabbing things from our sigil-user-guide repo master.

I tried to add in the force native dialogs env var that was previously missing, remove some duplication and add a second advanced topics chapter on python function replace.

Please take a peek and let me know if any changes are needed.

I hope to officially release it in sync with Sigil 2.6.2.
KevinH is online now   Reply With Quote
Old Yesterday, 04:04 PM   #22
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: 862
Karma: 3461504
Join Date: Jan 2017
Location: Poland
Device: Various
Thank you for your kind words.

SIGIL_PREFS_DIR is not Linux Only, although that is what the sigil-user-guide mentions.

I will add in the plugin a special support for this variable, which will not be read from env-vars.txt file but simply by os.getenv().
BeckyEbook is offline   Reply With Quote
Old Yesterday, 06:20 PM   #23
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: 8,879
Karma: 6120478
Join Date: Nov 2009
Device: many
Okay, I updated the user guide and tried to better describe SIGIL_PREFS_DIR.

Should we rename SKIP_SIGIL_ to SIGIL_SKIP_ or just leave it as is?
KevinH is online now   Reply With Quote
Old Yesterday, 06:41 PM   #24
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: 862
Karma: 3461504
Join Date: Jan 2017
Location: Poland
Device: Various
Alternatively, an intermediate output: rename, but support both versions.
An example precedent is here.

In short: we promote the "SIGIL_*" environment variables in the documentation (and in the plugin), but both variables will work.
BeckyEbook is offline   Reply With Quote
Old Yesterday, 06:47 PM   #25
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,798
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Could BeckyEbook's Env Var Editor be another panel or tab in Preferences - then maybe no need for the env-vars.txt man in the middle ?

Probably need to restart Sigil after using it.

Last edited by BetterRed; Yesterday at 06:52 PM.
BetterRed is online now   Reply With Quote
Old Yesterday, 07:01 PM   #26
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: 8,879
Karma: 6120478
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by BetterRed View Post
Could BeckyEbook's Env Var Editor be another panel or tab in Preferences - then maybe no need for the env-vars.txt man in the middle ?
No, the whole point of environment variables in Sigil are that they are reserved for obscure, dangerous, or little used settings that do not deserve a place in the Sigil Preferences menus. They should not be needed by a typical (non-advanced) user.

Having a plugin gui handle this is perfect for those who want or need a gui in order to edit a text file.
KevinH is online now   Reply With Quote
Old Yesterday, 08:03 PM   #27
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,680
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Are you talking about renaming existing environment variables?
DiapDealer is offline   Reply With Quote
Old Yesterday, 08:19 PM   #28
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: 862
Karma: 3461504
Join Date: Jan 2017
Location: Poland
Device: Various
Yes. One of the variables (SKIP_SIGIL_UPDATE_CHECK) deviates a bit from the others because it doesn't start with "SIGIL_".
BeckyEbook is offline   Reply With Quote
Old Today, 07:19 AM   #29
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,680
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I like the idea of supporting both if an env var is renamed, but it could complicate things a bit. Renaming already-in-use env vars strictly for the sake of SIGIL_* naming consistency is probably not something I'd bother with honestly. But if it doesn't break anything for existing users, knock yourselves out.
DiapDealer is offline   Reply With Quote
Old Today, 09:12 AM   #30
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: 8,879
Karma: 6120478
Join Date: Nov 2009
Device: many
Actually being able to search Sigil source code for "SIGIL_" to get all of the Sigil specific environment variables in one go is a nice thing to be able to do.

It is only a small one line change in main.cpp that will allow both SKIP_SIGIL_UPDATE_CHECK and SIGIL_SKIP_UPDATE_CHECK to work now.

@BeckyEbook, please change your gui to use SIGIL_SKIP_UPDATE_CHECK and I have changed the sigil_user_guide to do the same and we can deprecate SKIP_SIGIL_UPDATE_CHECK and remove it sometime down the road.

I have pushed this minor change to Sigil master and sigil-user-guide master.

Last edited by KevinH; Today at 09:17 AM.
KevinH is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sigil does'nt load txt-files ikkethuis Sigil 1 01-11-2021 01:46 PM
Filename to File Tag and Setting File Dorectory anonymust Library Management 3 11-07-2015 07:42 PM
shebang problem "/usr/bin/env python2" klonuo Development 2 10-21-2011 11:08 AM
How can i convert HTML or txt file to EPUB file ? guguqiaqia ePub 7 05-28-2010 09:15 PM
Problem & fix to Windows dev env setup ShellShock Calibre 6 12-07-2008 10:13 AM


All times are GMT -4. The time now is 09:39 PM.


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