I’m experimenting with an automatic converter of Arduino IDE libraries, so they are usable in XOD. But, naming is a problem.
The Arduino IDE just has a name for a library: “TFT” or “Adafruit NeoPixel”. With the library is a “properties” file that usually has something for the author. Like “Adafruit” or “Alan Grover”.
XOD has 2 levels for libraries, the author, and then the name. Like “bradzilla84/neopixel” or “xod-dev/wd5500”. And, you can only add libraries with yourself as author (or whichever authors you have the login for).
So, what should we do with libraries that are “direct” conversions? The idea of my automatic-conversion is to use the original Arduino IDE Library (again, for example, Adafruit’s NeoPixel library ) and make a very direct conversion to XOD patches (cf. my first proof-of-concept). Then, we’d hope for some XODer to enhance or wrap it to make it more XOD friendly as necessary (or fix parts that don’t quite work).
I’d like to make it obvious that it is the “XOD conversion” of Adafruit’s library. Which would make it easier to find, and make it more obvious what you are getting. The automatic conversion doesn’t add anything, it just exposes it, so It’s not right to say I’m the author.
On the other hand, it is my fault that it is now a XOD library, and not right to imply that Adafruit is the converter of the XOD version of the library. Adafruit doesn’t want surprise question’s on “their XOD library”.
So, where do we put the converted library? Under my name (because I ran the converter), under your name (because you ran the converter), under Adafruit’s name (because it is just their library in XOD form), under some “xod-converted” name?
If it is not under “Adafruit” as the “owner”, then what’s the library name? We get lucky with the Adafruit Neopixel library, because it’s name is officially, “Adafruit NeoPixel”, and gives good credit to Adafruit. But, not everybody named things that way. For example, my TLC59116 library is called, “arduino-TLC59116” (though the properties calls it just “TLC59116)”. So, it would be nice to credit the owner (which is actually “2splat”, or the author, which is me, “Alan Grover”.
Does that all imply that we should name the library whomever-converted-it/$author-$name (using $author from the properties, but the name should be the expected/common name that you see in the Arduino-IDE, which is the directory name). And that can get a bit long.
As briefly mentioned in forum topic 1485, “Prototype Conversion of Arduino Libraries: Summary and Usage”, the automatic conversion should be a service that anyone can use. But then, the “whomever-converted-it” is xod? Or maybe that let’s us set the author to the real author (but then that might not be quite fair to the real author), or to “xod-converted-for-$realauthor”?
Goals for naming:
- It’s obvious that it corresponds to a specific Arduino IDE Library, so people can find it and know what it is.
- It gives credit to the original author.
- It doesn’t unfairly burden the real author with XOD support by implying they did the conversion.
- It makes it clear it is a converted library (and thus possibly low-level, and not necessarily XOD style).
- We anticipate further enhancement using native XOD patches to make a “preferred” library.
The question
-
Right now, someone has to convert the library themselves, and upload it. So, what’s the library name? In a pattern that we can mechanically produce? As examples, this is my TLC5911C library’s properties, and this is Adafruit’s NeoPixel’s library properties.
-
If we could do the really right thing, what should be the author-name, and the library name.
-
And where does the version number go? The Arduino Library’s version number should show. But, the conversion could be done multiple times (bugs in the converter!). So, 2 different versioning numbers.