[tw5] Re: External links on usb

2021-10-20 Thread Charlie Veniot
Do be careful how you setup your canonical uri.  Try to use "relative 
paths" to your external files, and avoid "absolute paths."

(https://www.w3schools.com/html/html_filepaths.asp)

If you setup absolute paths, they might work well with, say, your Linux 
laptop, but not work at all on your Windows desktop (i.e. work fine on one 
device, but not work at all on other ones.)

So relative to the location of the TiddlyWiki file on your USB drive,

   - you might have an image that is up one directory:  ..\this_image.jpg
   - or in a subdirectory next to your tiddlywiki:  
   .\this_subdirectory\this_image.jpg
   - etc.

Mind you, I'm going based on general knowledge/experience, nothing specific 
to TiddlyWiki on a USB drive with external files on the same USB drive, and 
connecting that USB drive to any number of wildly different devices.

On Tuesday, October 19, 2021 at 2:10:22 PM UTC-3 maruadv...@gmail.com wrote:

> Is there a way to have external links that are in a sense 'portable'? 
>
> I want to store the TW file and the external reference material on a usb 
> drive for access.
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/bb701adf-5f49-4f89-8519-040d7e4580e6n%40googlegroups.com.


[tw5] Re: External links on usb

2021-10-19 Thread strikke...@gmail.com
Some years ago, I did as Charlie, explains. I am using several different 
laptops, they all run the same version of Linux Mint. Each of the laptops 
has 3 usb portsand find my tiddlywiki usb - and the images and more, 
using the usb label.  finding it at /media/user/label

On Tuesday, October 19, 2021 at 9:04:37 PM UTC+2 cj.v...@gmail.com wrote:

> Something I've never tried, and just tried for fun.
>
> I set my _canonical_uri for an image tiddler with a relative path, 
> relative to the location of the TiddlyWiki file.
>
> So wherever my TiddlyWiki file is, the _canonical_uri  
> = ./CjVeniot/PatrioticMe.jpg seems to work A-1 for that jpeg file.
>
> Same thing for a PDF file I just tested (tiddler's "Type" = 
> applicaton/pdf).
>
>
>
>
> On Tuesday, October 19, 2021 at 2:10:22 PM UTC-3 maruadv...@gmail.com 
> wrote:
>
>> Is there a way to have external links that are in a sense 'portable'? 
>>
>> I want to store the TW file and the external reference material on a usb 
>> drive for access.
>>
>> Thanks.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c68f706b-ee32-4bc8-9cb1-c7995bbfd31an%40googlegroups.com.


[tw5] Re: External links on usb

2021-10-19 Thread 'Mark S.' via TiddlyWiki
There are different ways to handle this. If we're talking images, for 
instance, the path to your USB might be different on different machines. So 
being able to change the path in just one place is handy. And being able 
specify different types of image sources is also handy. For instance, you 
might have some sources that are on a remote url, some on a usb, and some 
on CDROM.

Here's one possible macro 

\define img(devtype basename)
<$vars devpath={{{[prefix[ImagePath]suffix[-$devtype$]limit[1]get[text]]}}}>
<$image source={{{[addsuffix<__basename__>]}}} />

\end

Then if you have your configuration tiddlers in the format ImagePath- 
where the text has a path like (example ImagePath-files):

./files/

Then you can invoke your image like this

<>

Or, back to your usb, you might have a config tiddler ImagePath-usb with 
text D:\mydirectory\myimages\ and invoke like

<>

Then when on a different machine, you can change the contents of 
ImagePath-usb to Z:\mydirectory\myimages\ .

I have an idea for using image tiddlers (e.g. with _canonical_uri) . The 
advantage of image tiddlers is that if you change the name of a tiddler, 
you can use relink to change tiddler transclusion automatically. But that's 
all for now.


On Tuesday, October 19, 2021 at 10:10:22 AM UTC-7 maruadv...@gmail.com 
wrote:

> Is there a way to have external links that are in a sense 'portable'? 
>
> I want to store the TW file and the external reference material on a usb 
> drive for access.
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3261f820-b140-4bf6-a91c-d42fc6119a40n%40googlegroups.com.


[tw5] Re: External links on usb

2021-10-19 Thread Charlie Veniot
Something I've never tried, and just tried for fun.

I set my _canonical_uri for an image tiddler with a relative path, relative 
to the location of the TiddlyWiki file.

So wherever my TiddlyWiki file is, the _canonical_uri  
= ./CjVeniot/PatrioticMe.jpg seems to work A-1 for that jpeg file.

Same thing for a PDF file I just tested (tiddler's "Type" = applicaton/pdf).




On Tuesday, October 19, 2021 at 2:10:22 PM UTC-3 maruadv...@gmail.com wrote:

> Is there a way to have external links that are in a sense 'portable'? 
>
> I want to store the TW file and the external reference material on a usb 
> drive for access.
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b28b706f-e3f7-4172-ac03-9c93dc73d0bcn%40googlegroups.com.