This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Are relative, indirect path specifications possible in Telli

Tags: None
(comma "," separated)
hwst
Registered Member
Posts
20
Karma
0
Tellico 3.2.3
Linux Mint 20.1 Cinnamon

Are relative, indirect path specifications possible in Tellico?
Example:
Three users (Klaus, Sven, Janine) want to use a common Tellico database in the cloud (with synchronized local copies). In the database there is a URL field with a link to image files. The image files are also in the cloud. Normally the 3 users also need 3 different links, such as:
/home/klaus/databasefolder/pictures/building/villa.jpg
/home/sven/databasefolder/pictures/building/villa.jpg
/home/janine/databasefolder/pictures/building/villa.jpg

In the end, it doesn't matter whether the link points to a cloud folder or a local folder that is sychronized with it.
Is there a link synthax that is the same for all 3 users?
For example, this format does not work: ~/databasefolder/pictures/building/villa.jpg.
If there is no such or similar format, it means that there must be 3 URL fields in the database and each of the 3 fields is valid only for one user.

Translated with http://www.DeepL.com/Translator (free version)
robbystephenson
KDE Developer
Posts
384
Karma
1
OS
hwst wrote:Are relative, indirect path specifications possible in Tellico?
Example:
Three users (Klaus, Sven, Janine) want to use a common Tellico database in the cloud (with synchronized local copies). In the database there is a URL field with a link to image files. The image files are also in the cloud. Normally the 3 users also need 3 different links, such as:
/home/klaus/databasefolder/pictures/building/villa.jpg
/home/sven/databasefolder/pictures/building/villa.jpg
/home/janine/databasefolder/pictures/building/villa.jpg

In the end, it doesn't matter whether the link points to a cloud folder or a local folder that is sychronized with it.
Is there a link synthax that is the same for all 3 users?

Tellico can use relative links to images, so if all 3 users save the database file with the same relative path to the villa.jpg file, then it should work.

In the Entry Editor, for the image tab, check the relative link option.
hwst
Registered Member
Posts
20
Karma
0
Thank you for answer., but I don't can found a check-box for a relative link option. :-\
robbystephenson
KDE Developer
Posts
384
Karma
1
OS
hwst wrote:Thank you for answer., but I don't can found a check-box for a relative link option. :-\

My apologies, I hadn't looked at that code in a while and I was confusing two different things. Tellico does allow relative links to other files in a Url field. The Image field however, right now, can link to an image (rather than including it in the database) but does expect it to be an absolute path.

I'll add your request to my list of things to look at. https://bugs.kde.org/show_bug.cgi?id=435996 for tracking
hwst
Registered Member
Posts
20
Karma
0
Hello robbystephenson,
thank you for dedicating yourself to the problem.
I would like to refer once again to my initial example. The fact that the link points to an image is only one variant. Instead of an image, it could also be a link to any other file type.
I did not manage to specify a path (URL) to a (common) file that is uniform for all 3 example users, like:
file:///home/different-user/webfolder/folder1/folder2/file.xxx
different-user = [klaus; sven; janine]
My idea is to store a separate link in the database for each of the 3 users and everyone uses only their link (3 links each with a different username). But that is then a lot of redundancy.
robbystephenson
KDE Developer
Posts
384
Karma
1
OS
hwst wrote:I did not manage to specify a path (URL) to a (common) file that is uniform for all 3 example users, like:
file:///home/different-user/webfolder/folder1/folder2/file.xxx
different-user = [klaus; sven; janine]
My idea is to store a separate link in the database for each of the 3 users and everyone uses only their link (3 links each with a different username). But that is then a lot of redundancy.

The relative would apply to any path used in that field. In the FIelds Editor, add a property to the Url field named relative with a value of true
https://docs.kde.org/trunk5/en/tellico/ ... s.html#url
hwst
Registered Member
Posts
20
Karma
0
Thank you for this important tip. I must try this out at my leisure.
hwst
Registered Member
Posts
20
Karma
0
Hello, in principle it seems to work. I couldn't test it in real life because my other users haven't installed Tellico yet.
But there is another effect:
I have entered relative=true in the URL fields.
In a test data set I have recorded 3 different links. These are displayed in view mode. If you reopen the record in the entry editor, the URL fields are empty. If I close the record again, everything remains ok. However, if I save the record, the URL field contents are deleted.
But - when re-entering the record, the file search immediately points to the correct folder, even though there are 3 different folders.
robbystephenson
KDE Developer
Posts
384
Karma
1
OS
hwst wrote:Hello, in principle it seems to work. I couldn't test it in real life because my other users haven't installed Tellico yet.
But there is another effect:
I have entered relative=true in the URL fields.
In a test data set I have recorded 3 different links. These are displayed in view mode. If you reopen the record in the entry editor, the URL fields are empty. If I close the record again, everything remains ok. However, if I save the record, the URL field contents are deleted.

First, make sure to save the .tc file first before entering the path since there's no way for Tellico to know the relative path before the file is saved. Second, yes, seems like there's a bug there, in not using the correct base path in the view. I'll fix that. Tracked here: https://bugs.kde.org/show_bug.cgi?id=436071
hwst
Registered Member
Posts
20
Karma
0
Hi Robby, thanks for pointing out the storage and also thanks for tracking the error.
I always wish for such factual and competent communication in forums.
Many greetings Hans-Walter


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]