Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-06-2018, 02:06 PM   #1
Hudaman
Member
Hudaman began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2018
Device: kindle
Relative Paths in Comments

Hi all,
I am using the portable Calibre and adding pictures in the Comments area.
Is there a way to use relative paths?

Thank you
Hudaman is offline   Reply With Quote
Old 03-06-2018, 02:39 PM   #2
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: 22,004
Karma: 22086756
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A
Any valid URI should be permitted.
theducks is offline   Reply With Quote
Advert
Old 03-06-2018, 05:11 PM   #3
Hudaman
Member
Hudaman began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2018
Device: kindle
Thanks
I have been searching and trying different ways I am used to write relative paths and can't get it to work. I am not sure where to start the relative path from.
Is it it where the calibre exe file is?
Right now I click and browse on the wanted picture then adjust the path to relative.
I will search some more.
Thank you
Hudaman is offline   Reply With Quote
Old 03-06-2018, 05:31 PM   #4
BetterRed
null operator
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: 10,804
Karma: 10563066
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Hudaman View Post
Hi all,
I am using the portable Calibre and adding pictures in the Comments area.
Is there a way to use relative paths?

Thank you
if you mean a 'file:\\\blah blah' URI, then I have a vague recollection that they have to be absolute.

FWIW : an alternative might be to put the images in a multi-page TIFF file and store as a format file, then the pictures are where they 'belong' - in the library. I use Irfanview to create and view the TIFFs. If you do this, you will need to apply the following Tweak:

Click image for larger version

Name:	1.png
Views:	90
Size:	76.1 KB
ID:	162678

This works much better for me than putting them in a Comments like column, which is what I did before I switched to using multipage TIFFs.

BR
BetterRed is offline   Reply With Quote
Old 03-06-2018, 06:23 PM   #5
deback
Book E d i t o r
deback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the end
 
Posts: 285
Karma: 31930
Join Date: May 2015
Device: Laptop
(1) A relative file path points to a file relative to the current page.

In this example, the file path points to a file in the images folder located at the root of the current web:

Example:

<img src="/images/picture.jpg" alt="Mountain">


(2) An absolute file path is the full URL to an internet file:

Example:

<img src="https://www.w3schools.com/images/picture.jpg" alt="Mountain">


(3) A file URI takes the form of file://host/path.

Examples:

file://localhost/c:/WINDOWS/clock.avi
file:///c:/WINDOWS/clock.avi
deback is offline   Reply With Quote
Advert
Old 03-06-2018, 09:53 PM   #6
Hudaman
Member
Hudaman began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2018
Device: kindle
Thanks for the answers.
I think I will try the Tiff way.
I have tried setting a path within my window environment called %extras% pointing to the folder with the pics but that did not work either.
Too bad as it is the only thing missing to make Calibre fully portable I think.
Hudaman is offline   Reply With Quote
Old 03-07-2018, 05:23 AM   #7
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: 22,004
Karma: 22086756
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A
Quote:
Originally Posted by Hudaman View Post
Thanks for the answers.
I think I will try the Tiff way.
I have tried setting a path within my window environment called %extras% pointing to the folder with the pics but that did not work either.
Too bad as it is the only thing missing to make Calibre fully portable I think.
Fully Portable???

Environment variables are PER SYSTEM (OK, you could add a SET blahblah to the Calibre portable .bat), but that assumes the pix are really on the portable device, as well)
a 'portable' program, does not assume anything about the system (or locations), other than the OS. Portable Calibre requires that the Library be a Child of the program (batch) so it knows where all its pieces are.
theducks is offline   Reply With Quote
Old 03-07-2018, 11:00 AM   #8
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 2,824
Karma: 7279194
Join Date: Jan 2009
Location: in the middle of nowhere
Device: Paperwhite 3, iPad 9.7, iPad 12.9
Quote:
Originally Posted by theducks View Post
Fully Portable???

Environment variables are PER SYSTEM (OK, you could add a SET blahblah to the Calibre portable .bat), but that assumes the pix are really on the portable device, as well)
a 'portable' program, does not assume anything about the system (or locations), other than the OS. Portable Calibre requires that the Library be a Child of the program (batch) so it knows where all its pieces are.
Well you can always store the "extras" folder inside the Calibre Portable folder as well.
ilovejedd is offline   Reply With Quote
Old 03-07-2018, 05:02 PM   #9
BetterRed
null operator
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: 10,804
Karma: 10563066
Join Date: Mar 2012
Location: Sydney Australia
Device: none
IMO - if relative paths were permitted (and I don't think they are), then the logical place to anchor them would be the library folder in which the database containing the long-text column with the URIs are contained. In which case they'd be portable by definition, because the portable version mandates that library folders are contained within the Calibre Portable installation folder.

I know its not going to change, but a better term than 'Portable' would be 'Self-Contained', not just for calibre; for everything. Portability is not the only reason to want self contained installs, isolation from other installs is another common reason.

BR

Last edited by BetterRed; 03-07-2018 at 05:36 PM.
BetterRed is offline   Reply With Quote
Old 03-07-2018, 07:20 PM   #10
Hudaman
Member
Hudaman began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2018
Device: kindle
I agree, self contained makes more sense then portable.
My Extras folder is inside my Calibre Library folder.
The full path would be D:\Calibre\Calibre Library\~Extras\picturefile.jpg
I tried %extras%\picturefile.jpg
I set %extras% to D:\Calibre\Calibre Library\~Extras in my windows environment.
Is that supposed to work or am I completely out to lunch?
Hudaman is offline   Reply With Quote
Old 03-07-2018, 08:22 PM   #11
BetterRed
null operator
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: 10,804
Karma: 10563066
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Hudaman - did you try making ~Extras a sibling of Calibre Library rather than a child, e.g.



Adding arbitrary folders to a calibre library is best avoided, if you do a Library Check they will be reported as Extra Authors.

I'll give Kovid a nudge, asking him to give us a definitive answer on relative paths.

BR
BetterRed is offline   Reply With Quote
Old 03-08-2018, 12:24 AM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,393
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...8c3c3db2f27e69
kovidgoyal is offline   Reply With Quote
Old 03-08-2018, 02:41 AM   #13
BetterRed
null operator
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: 10,804
Karma: 10563066
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Can't get a better answer than that - thanks Kovid

BR
BetterRed is offline   Reply With Quote
Old 03-08-2018, 04:42 AM   #14
Hudaman
Member
Hudaman began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2018
Device: kindle
Thank you very much kodi,
At the risk of sounding uncult, how do I use that fix? The question should be, what do I do with that code?

Thank you.
Hudaman is offline   Reply With Quote
Old 03-08-2018, 07:25 AM   #15
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,641
Karma: 13662888
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Hudaman View Post
At the risk of sounding uncult, how do I use that fix? The question should be, what do I do with that code?
This code will be part of the next calibre release.
DoctorOhh is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
size relative to textsize AlanHK ePub 22 12-08-2015 06:47 PM
Help with relative logo size abusimbel Conversion 2 12-19-2014 11:01 AM
relative or symbolic paths BetterRed Calibre 6 12-04-2013 07:58 AM
PB622(touch)-relative Berührungsunempfindlichkeit? tropi PocketBook 5 07-19-2012 06:41 AM
epub-library: relative paths josepinto EPUBReader 2 12-03-2009 06:40 AM


All times are GMT -4. The time now is 07:06 AM.


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