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:
-
Create a folder to hold the releases (e.g.
packs
) andcd
into it -
Assuming the right content for a pack is in the folder
../src
then create a temporary pack folder:cp -TR ../src mypack
-
Now
zip -r mypack-0.1.00.zip mypack
-
You now have the pack zip file, so remove the pack folder
rm -fR mypack
-
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.