Query regarding publishing a library

Hello everyone,
I have developed a library for processing desktop, prepared docs, as well as examples using processing-library-template now I want to distribute it, though almost everything was clearly mentioned in Readme and wiki I still have few doubts.

  • In processing library template there’s a folder named “distribution” do I have to make a zip of only that folder or whole project. “distribution” folder doesn’t contain few files like core.jar and data folder.
  • How to submit my project, like sharing a link or creating a PR, also where in both the cases.

thank you

2 Likes

can’t answer that,

but i expect something like the other libraries, contributed or external…
example:
GitHub - jagracar/grafica: A simple and configurable plotting library for Processing ,

you link to your github page,
we look under releases
and download the newest matrix_XXL.zip
and unzip it to our sketchbook/libraries/ folder

you stay tuned if we come back here and whine

nothing working here

and we need a long talk till you find out
that i try that on a raspberry pi but you never tested it on that…

so it can grow…


what i wanted to say is, if required i will help you testing it for processing 3.5.3 / JAVA mode /
– win 7 32b
– win 10 64b
– raspberry pi ( 3B+) buster ( 1st and 3rd image)

1 Like

@kll thank you so much, I would really appreciate that this is my library. also please guide me on what to do next, like should i pull request?

Do you want to allow users to install your library through Processing’s Contribution Manager?

Yes… under import library, add Library. if it’s good enough

To be honest that’s not really an issue. If its not useful or not good enough then people will try it and then remove or ignore it.

Lets assume you have a library called MyLib then in the distribution folder there will be another folder MyLib-1 and inside that the download folder. There are two important files MyLib.txt and MyLib.zip which will be required by the Contribution Manager. These files need to be stored on the Internet at a stable location, by that I mean one where the URL doesn’t change. Once you have done that you need to inform Processing by sending a PM to prisonerjohn with the URL and asking him to make them available on the Contribution Manager. TBH it might be several days before you hear back so don’t give up.
When you update your library you simply replace these files with those from the new version and the Contributions Manager does the rest.
Processing does place some naming restrictions, for instance library names can’t start with P, PS, P5 e.g. PMyLib
More information about the doing this can be found on GitHub

4 Likes

Ok… that was the perfect answer I was excepting, the Last question though… do I need to have a domain name and hosting for that or GitHub link works

I don’t know the answer to that one sorry. I have my own domain name and web host so I have never had to try that. The library guidelines page talks about a stable URL but the info there needs updating, it recommends Google Code but that ceased in 2013 LOL.

Perhaps some other library developer else can answer your question.

1 Like

thanks for the sincere help

You can use GitHub releases to create your stable URL and manage your updating. When you are ready to create a release:

  1. edit your .properties file, changing version and prettyVersion, e.g.
    • version=8
    • prettyVersion=v0.8
  2. push your last commit to GitHub
  3. copy your .properties file to a txt file
    – this will be an attachment, not checked in to your repo
    – do NOT include version info in the filename
    • e.g. myLibrary.txt
  4. zip up your library assets,
    – this will be an attachment, not checked in to your repo
    – do NOT include version info in the filename
    • e.g. myLibrary.zip
  5. on your github.com repo page, click Releases > Draft new release
  6. Fill in tag and title, and add attachments.
    • e.g. tag: v0.8
    • e.g. title: v0.8
    • e.g. attach:
      • myLibrary.txt
      • myLibrary.zip
  7. Click Publish Release

Your latest release will automatically have a stable URL “latest” generated by github.

https://github.com/myUser/myRepo/releases/latest

“latest” is not a git tag, it is created by GitHub – do not add a tag “latest” to your repo manually.

The assets can be accessed directly via a download path:

https://github.com/myUser/myRepo/releases/latest/download/myLibrary.txt ← your stable URL
https://github.com/myUser/myRepo/releases/latest/download/myLibrary.zip

Now the myLibrary.txt path is your stable URL – the one you submit to the Processing librarian for inclusion in Contributions Manager. When you create a new release (following steps 1-7 above) the attachments for that new release – v0.9 – will replace the ones at /latest/. Contributions Manager will still be downloading from the same place, but there are new files there. This is why it is very important not to include version information in your attachment file names – don’t name them e.g. myLibrary8.txt, because if you do the path changes.

There are many Processing libraries using this distribution method – here is a recent one:

…and you can find examples by searching sources.conf for github urls:

Let me know if you have any questions.

2 Likes