Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-19-2015, 11:57 AM   #1
Elancrom
Junior Member
Elancrom began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2013
Location: Spain
Device: K4 NT
About the background in ebook-viewer

Hello,
I am using Calibre Portable 2.37, in ebook-viewer -> options -> user stylesheet there is an option for set the background, example:
background-image:url("file:///d:/calibre portable/mybackground.jpg");
The path is absolute and I can't figure how to make it relative, so always having my background image irrespective from path I am running Calibre.

Is it possible to have a relative path for the background image?

Thanks in advance

(sorry for my bad english)
Elancrom is offline   Reply With Quote
Old 11-19-2015, 12:22 PM   #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,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Well, I've never tried this particularly, but the PortableApps.com edition of calibre uses the standard PAF launcher which (among other things) fixes filepaths when the drive letter changes.

Presumably, it will fix this one too, if not then that is a bug in their launcher code and they'll fix it.

As for the "official" calibre portable, it doesn't really mess with the configuration at all (it merely uses the config relocation environment variables, and passes the --with-library switch) so you are probably out of luck with it.
eschwartz is offline   Reply With Quote
Advert
Old 11-19-2015, 04:28 PM   #3
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,005
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Sadly one can't use environment variables in file system uri's because the '%' is used for character encoding (eg space %20)

Maybe one day the IETF will devise a way to overcome that restriction, or MS will allow substitution of the '%envvarname%' convention by say a '$envvarname' convention. Although I'm not holding my breath on either.

You could write some javascript in the CSS. There's some VBA code somewhere that addresses the issue - I have seen it used in Excel macro's. Conversion of VBA to JS is doable.

BR
BetterRed is offline   Reply With Quote
Old 11-19-2015, 04:59 PM   #4
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,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Well, I remember being able to type environment variables into Windows Explorer...
eschwartz is offline   Reply With Quote
Old 11-19-2015, 05:39 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,005
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Yes I use it all the time - in fact my file mangler offers me a list of them in its address bar - but that's native windows which is not IETF RFC 3886 compliant.

Windows is not compliant, because 1808, which 3886 obsoletes, wasn't published until 1995! The %---% convention was in CP/M (Kildall may have copied it from TOPS 10 or RT/11 - or even CMS), from there it went into QDOS which begat MS/PC-DOS in 1981!

And here we are today with... what we've got and not got.

BR

Last edited by BetterRed; 11-19-2015 at 07:05 PM. Reason: spelling
BetterRed is offline   Reply With Quote
Advert
Old 11-19-2015, 06:00 PM   #6
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,756
Karma: 75000002
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
I remember using both TOPS 10 and RT/11
PeterT is offline   Reply With Quote
Old 11-19-2015, 06:10 PM   #7
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,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Wouldn't matter anyway, because URLs are literal AFAIk unless the program in question explicitly parses it and replaces variables.
eschwartz is offline   Reply With Quote
Old 11-20-2015, 08:40 AM   #8
Elancrom
Junior Member
Elancrom began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2013
Location: Spain
Device: K4 NT
It seems I am out of luck
It's not a big deal tough, I think I will try the PortableApps version

Thanks for your help and to Kovid for this great program
Elancrom is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two suggestions: Background color + zoom in images viewer/editor arspr Editor 7 08-05-2014 05:41 PM
Problem with font & background colors on the Ebook Viewer darthktulu Calibre 3 10-28-2013 12:24 AM
Get the file path of the ebook in the frontmost Ebook Viewer window johnsidi Development 1 07-16-2012 11:37 AM
[old-topic]ebook-viewer: Open source, crossplatform viewer for EPUB, LIT, MOBI, etc kovidgoyal Calibre 68 05-30-2011 09:46 PM
# user css for viewer.py/ ebook-viewer/ prs-650 tscamera Calibre 0 01-02-2011 07:28 PM


All times are GMT -4. The time now is 07:19 PM.


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