Public library concept

Based on discussion in the this thread, I prepared concept for a new (enhanced) user’s library system - Public Library.

This I mean a library, which is public accesible and is in the a special form. This include a list of the contents, licence term, logo image, version number, etc. (can be defined by template).
This library can be accesible via gihub/gitlab or via url to zip file (as I wrote - in preddefined structure!).

Two types of the URL:

  1. URL to github/gitlab project
  2. URL to zip file anywhere in the internet

First URL can be extended by github features (issues, comments,…)
Second type of URL (zip file) is simple for sharing but without git based features.

This make easy to add a new library of these type.
Community libs can be next step.

Use of Public library
In the LibrePCB library manager can be new Tab (similar as Install library) with name “Public Library”. This Tab will include a new text field for entering a url for new public library.
After enter address, LibrePCB check destination for library present (and structure integrity of course). If yes, saves url into internal list of available public managed libraries. User can anytime can mark the libraries in the this list to install or upgrade.
List of the entered public libs will be saved into workspace configuration and can be exported/imported to/from text file for easiest sharing.

How to determine which libs are in the new version?
From my point of view it is simple: after start LibrePCB, background task check all public library url and compare remote version file with last installed. If difference found, user will be notified by message. Next steps are in the user’s hand, if he wish or not upgrade libs. If yes, upgrade can be done via library manager in same way as LibrePCB libraries with one difference:
before upgrade it, LibrePCB library manager archive actual library into zip file (create backup). User can anytime do downgrade it.

This use of public library can be helpful for beginners and for extend of LibrePCB use.

Yes, I know, it the LibrePCB library manager exist option for download public library from web. But this is only for a zip file without basic version control.
Using of the Public Library for users can be little bit easier, share friendly, and as good start for Community Library system.

Community Library system will be little bit complicated I think.
It’s controlled or enhanced public library concept.
Community admins should check all libraries before sharing, and users can rate, comment each library. And all things as you wrote.
And this will need more human forces.

What do you think dear users? Will be this concept better for sharing libraries and make LibrePCB more useable for beginners and designers?
What do you think @ubruhin ? It’s hard to implement?

Thanks for sharing your ideas @EdizonTN.

To be honest, with this approach I don’t see a big difference to the already existing “Download Library ZIP” feature. If I understand correctly, the main difference would be the possibility to update those libraries automatically.

But it doesn’t help users to find such libraries – they would need to search them in the Internet manually, even without a clear place where to look. So even if there exist some nice libraries, it would be difficult and unlikely for other users to actually find them. I think a system which supports users in both finding and installing is needed to actually be useful.

Thank you @ubruhin for your time.

To be honest, with this approach I don’t see a big difference to the already existing “Download Library ZIP” feature. If I understand correctly, the main difference would be the possibility to update those libraries automatically.

– YES. But second big difference is LIST of used public library and possibility of save/load/import/export these list (migration/synchronization between several workplaces or sharing with colleagues/friends).

But it doesn’t help users to find such libraries – they would need to search them in the Internet manually, even without a clear place where to look. So even if there exist some nice libraries, it would be difficult and unlikely for other users to actually find them. I think a system which supports users in both finding and installing is needed to actually be useful.

– You can imagine as start to community libs. For example, user with share libs can add own public library to this discussion (ex. into new category).
Bonus for designers is possibility to add to list of public shared libaries into Library manager. Once! And message of the upgrade of the some lib is another bonus.

And I have a next dream feature (next step):
If I use a some public libraries and I found a some mistake inside, simple I do a correction in the local copy of this lib and I press magic button “update”, LibrePCB Lib.Manager create an issue/ merge request in the github :slight_smile:
Of course, this valid only if lib has source on the github, not zip file.
But I know, this is not easy to implement.

I agree. The concept from @EdizonTN is good, but it will not age well.
As @ubruhin mentioned already, the key to use user libraries is first to find them and second to keep them up to date. So the first thing should be a clear place where those libraries are stored and where the maintenance is done. Github/Gitlab are good candidates for this, anonymous zip files from random places on the internet are not.

If the user library is kept in an open space this is possible without any additional work on LIbrePCBs side. You want to share a used library with a collegue? He just needs to inlude the user library public link.

If you permit unversioned zip files, there will be a big mess in the future when a certain library is forked quite often. There will be countless versions of the same lib and also many deadlinks as it is common in a dezentralized approach. A good example for this is the Go LIbrary concept, there are a lot of libraries but they are not under a common umbrella like e.g. python. As a consequence lots of Go libraries are unmaintained, out of date or completely dead.
A centralized approach doesn’t have this problem but it requires maintenance work and clear rules how a contribution is done.

So in short I would suggest to first define where those libraries are being kept, who defines what is in and out and how contributions are handled before thinking about library features .
In short define the “community” part of “community library” then add a feature to LIbrePCB that includes it.

1 Like