08-21-2018, 10:56 AM | #1 |
Addict
Posts: 282
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
single external stylesheet elsewhere on computer using href
I want to make a single stylesheet.css located on the desktop which drives all books in the calibre library which reference that css file. I am having trouble with the syntax in Ubuntu for doing this. I have tried various combinations, including
<link href="file:///~/Desktop/stylesheet.css" rel="stylesheet" type="text/css"/> If I understand the general method for this, the correct such link must be put in every xhtml segment. Best Regards, Pop |
08-21-2018, 12:49 PM | #2 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You cannot use ~ that is a shell specific shortcut. Use the full path.
|
Advert | |
|
08-22-2018, 07:45 AM | #3 |
Addict
Posts: 282
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
Thanks for the information about not being able to use tilda. I am still unable to make it work. I have tried several versions and tried the web for more information. I have several xhtml segments in a book and have removed the reference in one of the xhtml segments to the imbedded stylesheet.css. The single xhtml segment references a stylesheet file on my computer in the Desktop directory, but I cannot get the grammar right:
<link href="/home/pop/Desktop/stylesheet.css" rel="stylesheet" type="text/css"/> <link href="file:/home/pop/Desktop/stylesheet.css" rel="stylesheet" type="text/css"/> <link href="file://home/pop/Desktop/stylesheet.css" rel="stylesheet" type="text/css"/> <link href="file:///home/pop/Desktop/stylesheet.css" rel="stylesheet" type="text/css"/> I am using Ubuntu 18.04 Gnome. Best regards, pop |
08-22-2018, 07:49 AM | #4 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'd be pretty surprised if it worked in general. Most EPUB readers typically block access to files on the local filesystem for security reasons -- I know the calibre viewer/editor do that for files accessed via javascript. I cant recall if it is also the case for files not accessed via javascript, but I would not be surprised if it were so.
If you want to view all your books witha particular stylesheet applied, the way to do it is to add it as a "user stylesheet" in the viewer preferences. |
08-26-2018, 02:10 PM | #5 |
Addict
Posts: 282
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
thanks
Thanks for the help. I tried out adding the stylesheet to the reader and it works very well. Best regards, Pop
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Single board computer as audio player? | semioticwafture | Audiobook Hardware & Software | 3 | 01-15-2017 09:10 AM |
remove all a href.... | cybmole | Editor | 33 | 08-10-2014 10:45 AM |
Touch Nook Glowlight - external stylesheet possible? | pssquirrel | Nook Developer's Corner | 0 | 02-11-2014 01:14 PM |
How to access PE root directory from external computer in USB mode? | mtambo | enTourage eDGe | 4 | 01-04-2012 05:36 PM |
Increase PRS 505 connection to a single computer | psheu | LRF | 4 | 05-06-2009 04:59 AM |