How to find the Resource ID (LLS code) given a Logos 4 filename

Rosie Perera
Rosie Perera Member Posts: 26,194 ✭✭✭✭✭
edited November 2024 in English Forum

Several people have asked for a way to find the Resource ID (aka LLS Code) for a given Logos 4 file, because currently you cannot open a book in Logos knowing only its filename (unless that filename happens to be the same as its Resource ID). I don't know of any way to do this in Logos, nor do I think they provide a utility program to determine this or a table of corresponding Resource IDs, filenames, and Titles of books (which would be really helpful, and which we've requested).

In the meantime, I have written a little utility program to do this and have created a wiki page explaining where to download it from and how to use it: http://wiki.logos.com/LLS_Code. (It's linked in from the FAQ page if you forget where it is and ever want to find it again.)

I've debugged it pretty well, but use at your own risk. This is unsupported by Logos. I'll field questions about how to use it if the wiki page isn't sufficient, but I take no responsibility if your computer crashes. It's pretty simple C code though, so I can't imagine it being able to do anything harmful. For those who are curious, I will be happy to show you the C code.

You can email me at (my first name followed by first letter of my last name} at sprynet dot com (no spaces or punctuation in the part before the at sign, and omit the brackets).

Comments

  • Dave Hooton
    Dave Hooton MVP Posts: 36,195

    Thanks, Rosie. I'm sure it will be very useful to many, myself included.

    Dave
    ===

    Windows 11 & Android 13

  • NetworkGeek
    NetworkGeek Member Posts: 3,785 ✭✭✭

    Thanks Rosie!

    One other suggestion - instead of making it a Windows app, why not hook it onto the context menu so we can select one or more filenames, right click, "Get Resource ID", and then a dialog screen pops up with the results, with a button to save to a text file?

    Just a thought [:D]

  • Rosie Perera
    Rosie Perera Member Posts: 26,194 ✭✭✭✭✭

    One other suggestion - instead of making it a Windows app, why not hook it onto the context menu so we can select one or more filenames, right click, "Get Resource ID", and then a dialog screen pops up with the results, with a button to save to a text file?

    Like I said in the wiki page, "don't hold your breath" for any further development of this tool. I haven't done any coding in years, so writing the little C program was a walk down memory lane and was fun for a quickie. But I don't really have time to play around with this anymore, especially since Dave Hooton told me about a utility that already exists (from Logos) which will produce a list of all your resources with their file names, Resource IDs, and titles. See his post here. That gives me hope that we'll have such a utility for Logos 4 sometime soon.

  • Dave Hooton
    Dave Hooton MVP Posts: 36,195

    especially since Dave Hooton told me about a utility that already exists (from Logos) which will produce a list of all your resources with their file names, Resource IDs, and titles.

    It is an L3 utility but not from Logos!

    Dave
    ===

    Windows 11 & Android 13

  • Rosie Perera
    Rosie Perera Member Posts: 26,194 ✭✭✭✭✭


    especially since Dave Hooton told me about a utility that already exists (from Logos) which will produce a list of all your resources with their file names, Resource IDs, and titles.

    It is an L3 utility but not from Logos!


    Oh, I see. Gee, does that mean people are going to be passing around my utility in zip files for the forseeable future. [:$] (Fortunately mine's not so useful that it will end up with a legacy like that -- I hope!)  Do you have any idea who wrote ResourceID?  Maybe they'd be up for writing one for Logos 4... ?  (Was it you, BTW? Did I neglect to give you credit? Sorry!)

  • SteveF
    SteveF Member Posts: 1,866 ✭✭✭
  • Bradley Grainger (Logos)
    Bradley Grainger (Logos) Administrator, Logos Employee Posts: 12,138

    I've added a feature to 4.0b Beta 4 to allow the filename to be entered in the command box to open a resource (should work for almost any resource, but requires the input to be in uppercase).

    FWIW, we changed the *.logos4 format to put the resource ID in an unencrypted portion of the file to allow utilities like this to be more easily created (although we thought the utilities would be created for internal use). Extracting the resource ID from a LBXLLS file in a scripting language is... non-trivial. You can also run "type <filename>.logos4" at a command prompt to see the resource info; this is a trick I learnt from the PNG file format that I should blog one day.

  • Rosie Perera
    Rosie Perera Member Posts: 26,194 ✭✭✭✭✭


    I've added a feature to 4.0b Beta 4 to allow the filename to be entered in the command box to open a resource (should work for almost any resource, but requires the input to be in uppercase).

    Thanks, Bradley. I know some people will be very pleased with that. Perhaps, though, rather than requiring all upper case for the filenames (which don't always appear in all upper case in the file system), a prefix like the LLS: prefix required for opening Resource IDs directly should be used. Something like, oh, say:

    FILE:filename (where FILE must be in all upper case but the filename could be whatever)

  • Bradley Grainger (Logos)
    Bradley Grainger (Logos) Administrator, Logos Employee Posts: 12,138

    Thanks, Bradley. I know some people will be very pleased with that. Perhaps, though, rather than requiring all upper case for the filenames (which don't always appear in all upper case in the file system), a prefix like the LLS: prefix required for opening Resource IDs directly should be used. Something like, oh, say:

    FILE:filename (where FILE must be in all upper case but the filename could be whatever)

    There are probably so few times where a resource abbreviation overlaps with a filename for a different resource ("na27" is one) that I decided to relax the restriction. Beta 4 should allow (almost?) any filename to be entered (in any case) to open the associated resource. (I say "almost" because this feature will use "internal names", which I think always match the filename but perhaps there are a few exceptions, possibly in third-party resources.)

  • Dave Hooton
    Dave Hooton MVP Posts: 36,195

    Do you have any idea who wrote ResourceID?  Maybe they'd be up for writing one for Logos 4... ?  (Was it you, BTW? Did I neglect to give you credit? Sorry!)

    I believe it was Karl Jones http://www.aireville.fsnet.co.uk/xscript/
    and he appears to be active in the Logos 4 Mac forum!

    Dave
    ===

    Windows 11 & Android 13