![]() |
#1 |
Member
![]() 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 |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Any valid URI should be permitted.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() 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 |
![]() |
![]() |
![]() |
#4 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
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: 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 |
|
![]() |
![]() |
![]() |
#5 |
Book E d i t o r
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 432
Karma: 288184
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 |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() 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. |
![]() |
![]() |
![]() |
#7 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#8 | |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
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. |
![]() |
![]() |
![]() |
#10 |
Member
![]() 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? |
![]() |
![]() |
![]() |
#11 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
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 |
![]() |
![]() |
![]() |
#12 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#13 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Can't get a better answer than that - thanks Kovid
BR |
![]() |
![]() |
![]() |
#14 |
Member
![]() 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. |
![]() |
![]() |
![]() |
#15 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |