New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library Manager (Arduino / MSP430) #6

Closed
ivankravets opened this Issue Jul 30, 2014 · 10 comments

Comments

Projects
None yet
3 participants
@ivankravets
Member

ivankravets commented Jul 30, 2014

We have excellent package managers like: pip, homebrew, bower, npm... I think it is time to create a libraries manager for different platforms (+ embedded). Each library should have library.json file, where will be necessary information like:

  • name
  • description
  • keywords
  • author
  • dependencies
  • downloadUrl
  • include - glob-style - which files should be installed
  • exclude - glob-style - which files should be excluded(ignored)
  • and etc.

UPDATED: library.json specification

We have many excellent Arduino and MSP430 libraries on GtHub. It would be excellent to search and manage them with CLI:

$ platformio lib search %QUERY_HERE%
$ platformio lib install %LIBRARY_NAME%
$ platformio lib update
$ platformio lib uninstall
$ platformio lib list  # Show a list from installed libraries
$ platformio lib register %GITHUB_REPO_URL% # for developer of library

Then you can include installed libraries in your ".h/c/cpp" files. PlatformIO will parse them and build in auto-mode.

For example:

$ platformio lib search "arduino ir"
# answer ...
# Arduino-IRremote - Infrared remote library for Arduino: send and receive infrared signals with multiple protocols
$ platformio lib install Arduino-IRremote

Now, PlatformIO will install Arduino-IRremote library to special location. Then we can use it in our sketch ("my_ir.cpp"):

#include <IRremote.h>
#include <IRremoteInt.h> 

void setup () { /* */ }
void loop () { /* */ }

Any propositions/ides are welcome!

@ivankravets ivankravets added this to the 1.0.0 milestone Jul 30, 2014

@ivankravets ivankravets changed the title from Implement libraries manager to Platform based Libraries Manager (Arduino, MSP430 and etc.) Jul 30, 2014

@ivankravets ivankravets changed the title from Platform based Libraries Manager (Arduino, MSP430 and etc.) to Platform based Libraries Manager (Arduino, MSP430) Jul 30, 2014

@ivankravets ivankravets changed the title from Platform based Libraries Manager (Arduino, MSP430) to Platform based Libraries Manager (Arduino, MSP430, ...) Jul 30, 2014

@Bouni

This comment has been minimized.

Bouni commented Jul 30, 2014

That's an excellent idea! How do you plan to host the information about all the libs?

@ivankravets

This comment has been minimized.

Member

ivankravets commented Jul 30, 2014

@Bouni All libraries will be hosted on GitHub. The one thing that developer should add is library.json file and register library via

$ platformio libs register %GITHUB_REPO_URL%

Then PlatformIO will use this library to propose for search/install operations.

@Bouni

This comment has been minimized.

Bouni commented Jul 30, 2014

So you perform a search on Github for projects that provide a library.json file, or do you provide a list of all projects that has such a file?
I just think about the time factor for such a large search!?

@ivankravets

This comment has been minimized.

Member

ivankravets commented Jul 30, 2014

@Bouni It is another topic how PlatformIO should operate with registered libraries. I propose to create separated service (preferably Twisted Async App) that will serve each necessary information via REST API. User's PlatformIO CLI tool will communicate with this REST API for search/info operations. Also this service will collect all interesting information from libraries repo like:

  • Stars number
  • Existing releases (will be used to install specific version of lib)
  • Downloads number

Stars + Downloads will be used for RANK-ing search result.

Finally, there isn't a problem to create awesome WEB2.0 page which will allow to search/list/order libraries via browser.

@Bouni

This comment has been minimized.

Bouni commented Jul 30, 2014

That sounds absolutely great to me :-)
Hope you will get a lot of users for your project and also a lot of participating lib creators!

@g7uvw

This comment has been minimized.

g7uvw commented Jul 31, 2014

It's a good idea - one annoying thing with a lot of the Energia libs is that they only seem to live in forum postings. A more central repository of libs would be great.

@ivankravets

This comment has been minimized.

Member

ivankravets commented Jul 31, 2014

@g7uvw Yep... I see one solution - to create separated account named "platformio-libs"(piolibs or piolibs-mirror) and here all people from the world will share interesting libraries (which don't live on GitHub at this time). Because I need real GitHub repository for each library. Only in this way I can monitor library changes, examples and etc.

See example of VIM-Scripts. They are hosted inside one account.

@ivankravets

This comment has been minimized.

Member

ivankravets commented Sep 4, 2014

Guys @Bouni @g7uvw @hpsaturn, @elyulka,

I've just finished the work on external Library API + $ platformio lib.

Installation

You can install it (or update) from development branch via:

$ pip install https://github.com/ivankravets/platformio/archive/develop.zip

Documentation

Library Manager Documentation

Library Configuration File

I decided to not wait until lib's developers will add library.json file to their libs. I created separated repository with library config mirror.

Which libraries are suitable for PlatformIO?
Please read http://docs.platformio.ikravets.com/en/latest/librarymanager/create.html

Binary Search

See http://docs.platformio.ikravets.com/en/latest/userguide/lib/cmd_search.html

Testing

I want to ask you to help me with testing and adding new library configs to https://github.com/ivankravets/platformio-libmirror/tree/master/configs. Tell me please which are your favourite libraries.

And... If it will work good I will start to work on the special WEB site with nice GUI :)

Thanks a lot!

@Bouni

This comment has been minimized.

Bouni commented Sep 5, 2014

I will test the new feature as soon as i have some free time :-)

@ivankravets ivankravets changed the title from Platform based Libraries Manager (Arduino, MSP430, ...) to Platform based Library Manager (Arduino, MSP430, ...) Sep 6, 2014

@ivankravets ivankravets changed the title from Platform based Library Manager (Arduino, MSP430, ...) to Library Manager (Arduino, MSP430, ...) Sep 6, 2014

@ivankravets ivankravets changed the title from Library Manager (Arduino, MSP430, ...) to Library Manager Sep 6, 2014

@ivankravets ivankravets changed the title from Library Manager to Library Manager (Arduino / MSP430) Sep 6, 2014

@ivankravets

This comment has been minimized.

Member

ivankravets commented Sep 13, 2014

Guys @Bouni @g7uvw @hpsaturn, @elyulka, @lesilva00, @skraelings, @translucide

Great news! PlatformIO has own WebSite http://platformio.ikravets.com

So, you can list an embedded libraries via nice Web-GUI.

Please help with testing and filling of the libraryconfigs https://github.com/ivankravets/platformio-libmirror/tree/master/configs

Which are your favourite libraries that aren't presented in PlatformIO Library list now?

@ivankravets ivankravets modified the milestone: 1.0.0 Feb 11, 2015

ivankravets added a commit that referenced this issue Oct 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment