Prolog to GPT API - Reply 1

Good work. I would suggest you make it a pack, so that it can be easily installed by everyone. You can get more information about packs here: Creating and submitting extension packages for SWI-Prolog. It’s not hard to do, I think you just need to rearrange files into a prolog directory and make a pack.pl file in the root dir.

Thank you for the suggestion.

I have made a pack (which I have tested locally), but I don’t understand how to create a github release with just that pack. When I create a github release, it includes all folders and files in the repository.

Any ideas?

Never mind, I found a way.

There is a convoluted way to creating a branch, deleting all but the pack folder, then creating a release from that branch.

I opted for a simpler way:

  1. Create a folder to hold the releases (e.g. packs) and cd into it

  2. Assuming the right content for a pack is in the folder ../src then create a temporary pack folder: cp -TR ../src mypack

  3. Now zip -r mypack-0.1.00.zip mypack

  4. You now have the pack zip file, so remove the pack folder rm -fR mypack

  5. The URL for the pack on github will be: https://github.com/<User>/<pack>/raw/main/packs/mypack-0.1.00.zip

    This seems to install just fine with pack_install('https://github.com/<User>/<repo>/raw/main/packs/mypack-0.1.00.zip')

Other users can install with pack_install(mypack) after you’ve installed it yourself at least once.

Simplest is probably to simply have a git repo that contains the content of the pack and nothing more.

1 Like