Arduino Forum

Forum 2005-2010 (read only) => General => Bar Sport => Topic started by: beowulf6 on Nov 22, 2010, 12:14 am

Title: Arduino Library downloader
Post by: beowulf6 on Nov 22, 2010, 12:14 am
Hi everyone.

I don't know if something like this already exists or if this even works for everyone.

I am using the Arduino software and often i just want to know if there is already a library for the thing i want to do,
if there is a new version of a library or just to download and install a library easily.

i made an application in C++ and wxWidgets to do exactly this.
It is using currently using 7zip for extracting the libs after download.

It was my first try in coding with wxWidgets and Gui development in C++ so i hope it is not too bad. ;)
I only tested it on my windows machine and compiled it there, but i tried to only use things that are multiplatform compatible.

I put a quick and small webpage together here:
http://ardulibrary.code-i.de/

The Sourcecode is in my SVN repository accessible with the username "gast":
http://svn.code-i.de/ardulibrary/

a small Screenshot:
(http://ardulibrary.code-i.de/_media/img/ardulibrary.png)

there are not all librarys in the list at the moment but it does not mean i like this more than the other libs.
The list is of course maintained by hand.

a doubleclick on a library sends you to the homepage of that lib.
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 22, 2010, 12:18 am
A good initiative! But, I would like to see this functionality as part of the official IDE. Maybe this will start a butterfly effect that results in just that.

Anyways, feel free to add any of my libraries:P
http://www.arduino.cc/playground/Profiles/AlphaBeta
Title: Re: Arduino Library downloader
Post by: beowulf6 on Nov 22, 2010, 12:44 am
nice. i have added your libs to the xml.
(it is easy if every lib have the same directory structure inside the zip-file)
The only bad is that you do not have a description for every lib.

Of course it would be nice if this feature would be added to the IDE.
Currently missing is a lib-uninstall feature in the application. Will look into this if i have time.
Title: Re: Arduino Library downloader
Post by: RuggedCircuits on Nov 22, 2010, 02:57 am
Nice! Even nicer would be a web-based interface that simply lists all third-party libraries and allows people to contribute, like shieldlist.org.

Just a suggestion!

--
The Rugged Motor Driver (http://ruggedcircuits.com/html/rugged_motor_driver.html): two H-bridges, more power than an L298, fully protected
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 22, 2010, 03:03 am
Well, that is simple. :)


A form for entering in an URL for a zip, and a field for version, and one for a description.

Then process and store in an SQL database.

Might add a 'report bug' (and then the form would need a contact mail) and maybe a vote up/down feature.


I'll be in on it, contact me if you want to set something up.


Downloader stays as it is, but downloads the XML from the site.

Cool idea, but should someone ask the Team if this is an effort best made part of the Arduino project?
Title: Re: Arduino Library downloader
Post by: RuggedCircuits on Nov 22, 2010, 03:06 am
This kind of third-party repository interface has been around for many years and in several different communities. I'm wondering if there's even software already to manage the infrastructure.

For example, for Python:

http://pypi.python.org/pypi

For Perl:

http://www.cpan.org

For TeX:

http://www.ctan.org

In hindsight it's amazing that something like this doesn't already exist for Arduino! I guess you can say the Wiki/Playground is there but it's time for The Next Generation.

--
The Gadget Shield (http://ruggedcircuits.com/html/gadget_shield.html): accelerometer, RGB LED, IR transmit/receive, light sensor, potentiometers, pushbuttons
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 22, 2010, 03:10 am
Completely agree!
We should get a centralized third-party repository up and running soon.

[edit]Might rewrite the client for Java? Easier cross-platform and maintainable for the Arduino developers (as the IDE is java). Sorry to OP is this is the stupidest idea ever presented.[/edit]
Title: Re: Arduino Library downloader
Post by: beowulf6 on Nov 22, 2010, 03:41 am
thanks for your kind responses.

I already thought about a posibility to post librarys.
And i would also host it on my server. I can configure it so it can also mirror it on your server.

the application might be able to load an xml from a repository like that already.

But some things need to be looked at if we do this.

At the moment everyone is compressing his own lib differently with different folder structures and different manual steps to install.

when we make a repository like that. Every library.zip should have the same structure and the structure should be checked by the upload script.

I do not know if i am allowed to host every library or what to do with librarys where the creator does not upload them on theyr own or the author is not longer aviable.

the cmd part in the xml should be removed so no one can post a malicious command in the xml. (for this every lib.zip needs the same structure to make it easier)

Doesnt need every lib checked before publishing in a repository like this?

as you see. I think the hardest part might be to get every lib-structure to be the same.
Most of them look the same but not all.

//Edit: yes. Sorry that this is not java but i can not write in java.
It is already cross platform except the 7zip exe i used.
And i know this part needs a rewrite.
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 22, 2010, 03:51 am
I think we need to model the 'structure' after how the official team does it, and that is to zip the archive which the files resides in. That is, so one extracts within the libraries archive (this way one does not have to create a new folder before extracting).
Reference: http://www.arduino.cc/en/Hacking/LibraryTutorial


I think the community should be the 'check' so that we could have a flag for 'does not work' for instance. And maybe also a vote up/down.

We could add categories to the libraries. Math, Data Structures, Timing, Processing, Hardware Abstraction etc etc etc.
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 22, 2010, 07:12 am
Sooo...

I've purchased a domain/webhotel and started on the UI: http://www.arduinolibraries.net/
Please come with ideas and feedback!

Nothing is carved in stone, and I'm not in favor of any one solution.



I for one think this effort can be of great service for the Arduino community.


I've created a first draft of an Arduino Library Markup Language
Sample XML: http://alexanderbrevig.com/hosting/arduinolibraries.net/ArduinolibML.xml
Sample XSD: http://alexanderbrevig.com/hosting/arduinolibraries.net/ArduinolibML.xsd



Thoughts and feedback VERY much welcome.

@beo6 since you know C++ you'll need just a minimal amount of time to understand Java
These types of applications is what works best on Java, IMHO.
Title: Re: Arduino Library downloader
Post by: Coding Badly on Nov 22, 2010, 07:56 am

I suggest using "tags" instead of "categories".
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 22, 2010, 08:02 am
They're intended to behave like tags, but I've got to add a tags input box to the form for entring new libraries.
True That.
Title: Re: Arduino Library downloader
Post by: beowulf6 on Nov 22, 2010, 01:00 pm
Nice work.

i didn't expected so much response for my application especially from people that have more than 1000 posts.

But isn't there a upload field missing?

Will look to change my application as soon as the XML format is right.

So i will change it that every uploaded zip needs only 1 folder with the libraryname and inside that the library cpp files with examples.

I am no expert in C++ and don't want to learn Java right now.

I for one would ask why the Arduino IDE is Not! in C++.

But this might end in a programming language war.
Everyone should code in the language that he likes most. ;)

@AlphaBeta´s Edit:
I don't really understand what idea you mean that is stupid. :-?
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 22, 2010, 06:56 pm
Quote

But isn't there a upload field missing?

Will look to change my application as soon as the XML format is right.

There's probably several things missing. But, because I would want to keep track of versions, the 'upload a library' (which will actually be 'provide an URL to your zip archive) will be an action that has to do with a library version. So I think it's best to have a separate form for adding a new version of a library.

Feel free to have a look at the XML and rewrite it as you would like it to be. The most important features for me is:


Quote

So i will change it that every uploaded zip needs only 1 folder with the libraryname and inside that the library cpp files with examples.

That is brilliant.

Quote
@AlphaBeta´s Edit:
I don't really understand what idea you mean that is stupid. :-?

If you thought I was an ass for suggesting a rewrite, I'd like to apologize. That's all.
Keeping this project a separate endeavor is probably not a problem at all. It is the service which is in focus, and when we get used to being able to easily download libraries, and have an XML and a backing website in place, adding a downloader to the IDE won't be hard at all.
Title: Re: Arduino Library downloader
Post by: retrolefty on Nov 22, 2010, 10:18 pm
Quote
Quote
I for one would ask why the Arduino IDE is Not! in C++.


It's because the Arduino team used an already developed multiplatform/open sourced IDE used in the Processing project. This allowed the Arduino project to come to light much quicker then if they had to create the IDE from scratch. Nothing to do with language wars.  ;)

Lefty
Title: Re: Arduino Library downloader
Post by: madepablo on Nov 22, 2010, 11:24 pm
Great tool!!

I use something similar into a GIS open source program: QGIS. It has a similar tool to download scripts and tools from the official repository, but also from three-part repositories... It also show an advise when new version from a library is available. Other interesting option: it allows you to install libraries and also remove them. Just only some ideas that could be interesting for this library download tool for Arduino IDE.

Thanks for this tool!
Title: Re: Arduino Library downloader
Post by: beowulf6 on Nov 23, 2010, 01:28 pm
I am really interested if my tool even works for anyone.

I just tested it on a different PC and the application didn't start at all. :-/

Now switching the development tools and will see if it works better.
Nice side effect is a Development environment where i am more comfortable with.
Just solving the last problems.

Of course i am not thinking someone is an ass just for suggesting something. Even a rewrite.

Maybe when i am more comfortable with building GUIs with wxWidget i might be able to make a small C++ IDE for Arduino. :-?

The remove libraries feature is already planned.
Title: Re: Arduino Library downloader
Post by: pwillard on Nov 23, 2010, 06:24 pm
I know the argument for JAVA for the IDE comes with the understanding that it is what is required for cross platform development... but C++ with WxWidgets seems to be well supported on multiple platforms... so... good choice.   :-)

It seems that a WxWidgets solution should be able to work for Linux and Apple in additional to Windows.  Good Luck.
Title: Re: Arduino Library downloader
Post by: beowulf6 on Nov 24, 2010, 10:33 am
so i got my development environment working yesterday.

i compiled it and it also works now on the PC where the application didn't started before.
So i think this is a good sign.

i also got some code running to extract the library zips directly with the zip library. Just need code the folder structure creation from the zip. (currently only in the SVN)

when that code works some library zips might no longer be supported because of different folder structures but i think the advantages outweigh the disadvantages in the long term and it will be easier to compile on different platforms without the need of 7zip.

After that i will look to parse the XML from AlphaBeta. It would be nice if i could get a working example from this XML with at least 1 working testentry.


If someone wants to help in programming this, i can create him a SVN login with write access of course. :)


I hope i do not Spam here or we should talk outside of this forum.
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 24, 2010, 10:38 am
I'm interested in contributing to this, maybe we should set up a group somewhere, so we can talk and decide how to proceed.

I'd like to focus on the web/backend and maybe you should focus on the client?


We could continue our discussion here, so all can contribute with feedback/questions etc etc.




What you think?
Title: Re: Arduino Library downloader
Post by: aliensailor on Nov 24, 2010, 11:26 am
beo6,

I tried using the application on my pc (Windows XP Pro) but it cannot find mingwm10.dll.

I may well be doing something stupid......

Andy
Title: Re: Arduino Library downloader
Post by: Imahilus on Nov 24, 2010, 01:33 pm
I reckon a public upload of libraries, with a mandatory structure check as proposed, would be the easiest for all to work with. I know I won't contribute if it takes effort.. (I mainly specialise libraries for my own needs).
It should be a trivial matter of making two lists, one for 'tried&tested' and one for 'new and/or experimental'.
When a library gets X 'works flawlessly' marks, it gets moved to the 'tried&tested' list. This should make it easier to navigate for both newbies and veterans.

I'd also like to suggest the ability to include a link to another library with an entry. For instance, there is a LCD library. There is a specialised 4bit LCD library (I know this can be done with the current version of the LCD library, but the LCD shield from DFRobot for instance also includes 5 buttons on an analog pin) and then there is the shift register powered LCD display library.
This would make it easy to see which libraries are specialised, derivatives or alternatives of a particular library.
Title: Re: Arduino Library downloader
Post by: beowulf6 on Nov 24, 2010, 02:31 pm
hi,
and thanks for testing it aliensailor.

that is a dll from the compiler. just like the vc++ runtimes i think.

it should only be needed as long as it is compiled as a debug executable.
I now included it into the zip file in the main post so if you re download it, it should work now.

Sorry for that but i am relatively new to this.

we can of course continue to talk here. But i also added you to Google Talk if you don't mind. :)
Title: Re: Arduino Library downloader
Post by: defsdoor on Nov 24, 2010, 05:43 pm
Would it be simpler just to setup/maintain an apt repository ?
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 25, 2010, 01:19 am
I've been working a bit more on the UI and the database/storage.

http://www.arduinolibraries.net/ please give me feedback and ideas.

The thought as far as voting / quality assurance is that one can say 'I like this library' and then if a version of the library does not work, it can be 'voted' as working or failing. This is so that a new version won't be degraded because of older versions. And it would give the developer a feeling of the how the library is liked.

I've also added the notion of categories AS WELL AS tags, and the thought is that one ca browse all libraries that are marked as category C or browse libraries that are tagged T.

I think we should keep the categories well defined, and tags user defined. What categories do we need?
A tag is added by simply writing it into the tags text field (and will be stored lower case, not duplicated because of case variance).


Have anyone looked at the XML ? There might be something I've forgotten there. Now, with the categories and tags I know that's not in there.


So, a question: should libraries be password protected? So that only the author can edit it?
Do we need multiple authors per library? Is it okay to have a 'main author' and later add authors ?
[edit]Updated the XML and the Schema, it has a 'popularity' field for the library, and a score per version. Additionally I added category and tags.[/edit]
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 25, 2010, 02:03 am
I've made some diagrams, please have a look and feedback:

:)
Title: Re: Arduino Library downloader
Post by: beowulf6 on Nov 25, 2010, 06:09 pm
Hi,

looks somewhat complicated. I hope when you are finished i will be able to parse your XML correctly. ;)

I now finished the stuff i really wanted to do in the application.

It does not longer depend on the 7zip executable and is extracting the library on its own. Only supporting Zip at the moment.

with this change there are 3 libraries that might not longer be compatible because of a different folder structure.
I commented them out in the XML.

It is now also possible to remove libraries that you installed before.

http://ardulibrary.code-i.de/_media/dl/ardulibrary0.1.1.zip

for deinstalling the application is analyzing the zip that you downloaded and removes the files according to the structure in the zip file.

I hope this works correctly. so it should not be possible to remove files outside of the scope and without adding the structure to the XML.
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 25, 2010, 10:28 pm
I just thought of somethings:

1] It might be beneficial to denote which versions of Arduino that are tested? Both the IDE and the µCU, and that might even be a pair so:  0015+Pro, 0020+Deicimila, 0021+Uno. ?

2] Should we include a feature to store complete sketches? Say a theremin sketch, or an airsoft dummy timed bomb etc etc. I think it might be cool, but then again, maybe the playground is a better place for this?
[edit]Tested it now, on Windows 7, and download works (although the UI does not update to show that a library is installed until a restart occurs). Remove does not work, it seems like the xml/internal state is updated because after a restart it does not show up as -installed- even though it is in the folder.

I think you probably should browse the provided library and scan for installed libraries. Now it seems like the libraries has to be installed through you app. This, of course opens another can of worms because now, people expect to be told what version it is, so then we need some unified way of denoting the version in the header, so we can scan for it when scanning the folder for installed libraries...[/edit]
Title: Re: Arduino Library downloader
Post by: beowulf6 on Nov 26, 2010, 01:10 am
Hi,

which version is tested might be nice to know. didn't thought about that before.
I think there are some libraries that are not compatible with some version of the Arduino IDE.

example sketches can already be inside the library.zip. so i think this is enough to start with a library.

And thanks for testing the program.
It is saving the version of the installed library in the registry from windows, or once it will get compiled under linux in an ini-file.

You can find the registry keys in:
HKEY_CURRENT_USER\Software\ardulibrary.code-i.de\Ardulibrary\Settings\installedlibs

I don't know what might go wrong for you but you can check this registry key.

Of course i thought about finding already installed libraries, but the subdirectory where the library is inside can be named like everyone want and i don't have an idea how to know what library and what version of it is in this directory.

The delete library button will change right after you installed a library.
But you are right. i already changed the application so it updates the listitem and description directly.
Title: Re: Arduino Library downloader
Post by: beowulf6 on Nov 27, 2010, 02:32 am
I did some small User feedback optimization, so the user sees the process bar when the install or remove process starts and not when it is already finished.
updated the old link for the application.


I also tried to begin with a small IDE with the Scintilla wrapper.
It is not usable at the moment. It is only possible to open a file, edit it and to save it back.
The syntax highlighting needs more work too.

I looked a little bit at the source code from the Arduino IDE and the compile process looks quite complicated.
That will be much work i think.

see a small screenshot here (http://ardulibrary.code-i.de/_media/img/ardulibraryide_test.png)
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 27, 2010, 02:41 am
It still won't delete the library on my computer, but the application thinks it's deleted.

Also, building an IDE for the arduino will be a lot of work, your energy might be better placed in contributing to the current IDE. Ignore me if you're doing this as much for yourself as for us. Writing an IDE is a very good learning experience.


I want to start coding the web back-end soon. Do you have any more ideas for it? Anyone?
Title: Re: Arduino Library downloader
Post by: beowulf6 on Nov 27, 2010, 03:09 am
you might be right.
i tried to work on the IDE because i am still digging into wxWidgets and learning a lot.

I branched the IDE Project so work can continue without interrupting the small Library application whenever i or some other want.

Bad that the removing does not work for you.
It is not really checking if the install or remove process was fully successful.
Some thing i can think of are some File or directory permission problems.

I will write a small debug version that writes a debug.txt so i can have a look at it.
(but first i need some sleep)

don't have any idea.
I think we should just look how it turns out and how the page is accepted by the other developers here. ;)

Do you want to host my application on that webpage once it parses your XML?
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 27, 2010, 03:14 am
Of course I'll host it. Although I am the 'owner' of the website, I will think of it as 'ours'.


I'll start developing the back-end soon then. And we'll do as you say. Stay agile and react to requests and user feedback.


Good night!
03:14AM here, need me some sleep as well.
Title: Re: Arduino Library downloader
Post by: beowulf6 on Nov 28, 2010, 04:22 am
i just updated it so it will show the user if the download, the extraction or remove was successful or not.

It will also create a debug.txt in the application directory with some information that could help to know what happens if something is not working.

It would be nice when you could try the new version and send me the debug.txt when it does not work again.

Thanks.
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Nov 28, 2010, 04:34 am
The new version runs great!  :)

Maybe I should convert the xml for this and encode it as the xml will be
so you can start testing for the new format?

We might double check so I've not forgotten anything.
Title: Re: Arduino Library downloader
Post by: beowulf6 on Nov 28, 2010, 06:51 am
that is odd.

I have changed nothing regarding the functionality to extract or remove the correct files.

The only thing i can think of that have changed is the wxWidgets version with what i compiled the application that is now the newest SVN version 2.9.2.
(and that the file size somehow got double the size but that might only be a compiler configuration)

the new XML format would be nice so we can start to parse the new format.

Just one question. For what are the authors right under the root tag in your XML?
http://alexanderbrevig.com/hosting/arduinolibraries.net/ArduinolibML.xml
They are not connected to a library so i don't know if they are even needed there and the authors for the libs are right there inside the lib tag.

and 1 think i right now are think about is the version.
The version String should be the same for every lib. (like "0.0.1" to "0.1.3")
because at the moment every library developer uses another format there, even chars like "1.0.2c" or just the date.

that way i could just remove the dots(.) and i am able to read is as a value that is higher when the version is newer.
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Dec 07, 2010, 02:39 am
Proposed SQL 'schema':
Code: [Select]
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

-- an author is a person that has written a library
-- mandatory fields: username , password and mail address
DROP TABLE IF EXISTS `al_authors`;
CREATE TABLE IF NOT EXISTS `al_authors` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `name` varchar(64) NOT NULL,
 `password` varchar(32) DEFAULT NULL,
 `mail` varchar(64) DEFAULT NULL,
 PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

-- sample data for authors
INSERT INTO `al_authors` (`id`, `name`, `password`, `mail`) VALUES
(1, 'Alexander Brevig', 'temp', 'alexanderbrevig@gmail.com'),
(2, 'lsascha', 'temp', 'lsascha@gmail.com');



-- a category is classification of a library, we should discuss the complete list
-- mandatory fields: category name
DROP TABLE IF EXISTS `al_categories`;
CREATE TABLE IF NOT EXISTS `al_categories` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `category` varchar(64) DEFAULT NULL,
 PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

-- sample data for categories
INSERT INTO `al_categories` (`id`, `category`) VALUES
(1, 'Hardware Abstraction'),
(3, 'Data Structure'),
(4, 'Math'),
(5, 'Timing & Multitasking');



-- a library is a collection of library versions for a specific purpose
-- mandatory fields: category_id, library name, library general description
DROP TABLE IF EXISTS `al_libraries`;
CREATE TABLE IF NOT EXISTS `al_libraries` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `category_id` int(11) NOT NULL,
 `name` varchar(64) DEFAULT NULL,
 `description` text,
 `popularity` int(11) DEFAULT NULL,
 PRIMARY KEY (`id`),
 KEY `category_id` (`category_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

-- sample data for libraries
INSERT INTO `al_libraries` (`id`, `category_id`, `name`, `description`, `popularity`) VALUES
(1, 1, 'Button', 'Button is created to help readability of code. It abstracts away the pinMode, and digitalRead calls for the user.\r\nIt supports pullup and pulldown configurations.', NULL);


-- libraries and authors are linked together in this table
-- mandatory fields: library_id, author_id
DROP TABLE IF EXISTS `al_libraryauthors`;
CREATE TABLE IF NOT EXISTS `al_libraryauthors` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `library_id` int(11) NOT NULL,
 `author_id` int(11) NOT NULL,
 PRIMARY KEY (`id`),
 KEY `library_id` (`library_id`),
 KEY `author_id` (`author_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

-- sample data for library authors
INSERT INTO `al_libraryauthors` (`id`, `library_id`, `author_id`) VALUES
(1, 1, 1); -- button > alexander


-- tags are content and context describers and can be specified by simple text in the backend
-- mandatory fields: tag text
DROP TABLE IF EXISTS `al_tags`;
CREATE TABLE IF NOT EXISTS `al_tags` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `tag` varchar(32) DEFAULT NULL,
 PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

-- sample data for tags
INSERT INTO `al_tags` (`id`, `tag`) VALUES
(1, 'button'),
(2, 'switch'),
(3, 'state'),
(4, 'press');



-- libraries and tags are linked together by this table
-- mandatory fields: library_id, tag_id
DROP TABLE IF EXISTS `al_librarytags`;
CREATE TABLE IF NOT EXISTS `al_librarytags` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `library_id` int(11) NOT NULL,
 `tag_id` int(11) NOT NULL,
 PRIMARY KEY (`id`),
 KEY `library_id` (`library_id`),
 KEY `tag_id` (`tag_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

-- sample data for library tags
INSERT INTO `al_librarytags` (`id`, `library_id`, `tag_id`) VALUES
(1, 1, 1), -- button > button
(2, 1, 2), -- button > switch
(3, 1, 3), -- button > state
(4, 1, 4); -- button > press



-- libraries and versions of that library are linked toghether by this table
-- mandatory fields: library_id, major minor micro verion (1.4.3), url (optional description for changelogs etc)
DROP TABLE IF EXISTS `al_libraryversions`;
CREATE TABLE IF NOT EXISTS `al_libraryversions` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `library_id` int(11) NOT NULL,
 `v_major` int(11) NOT NULL,
 `v_minor` int(11) NOT NULL,
 `v_micro` int(11) NOT NULL,
 `url` varchar(64) NOT NULL,
 `description` text,
 `score` int(11) DEFAULT NULL,
 PRIMARY KEY (`id`),
 KEY `library_id` (`library_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

-- sample data for a library version
INSERT INTO `al_libraryversions` (`id`, `library_id`, `v_major`, `v_minor`, `v_micro`, `url`, `description`, `score`) VALUES
(1, 1, 1, 6, 0, 'http://www.arduino.cc/playground/uploads/Code/Button.zip', 'Added uniquePress():bool\r\nAdded stateChanged():bool\r\nAdded wasPressed():bool\r\nConstructor that only requires a buttonPin. Presumes PULLDOWN', NULL);


I've not implemented anything regarding the 'tested on Arduino IDE 0021 with the UNO' feature. Is this necessary?
Title: Re: Arduino Library downloader
Post by: AlphaBeta on Dec 08, 2010, 01:28 am
http://www.arduinolibraries.net/

Add Library is now implemented. For now the user is set to Alpha Tester and everything that is created now will be deleted.
Test it if you want!

The next iteration, I will implement an add author feature (the author that is logged in at the time of creation is the default author, this is set to Alpha Tester now but will require a login at a later point).
Title: Re: Arduino Library downloader
Post by: beowulf6 on Dec 08, 2010, 10:25 am
hi. looks nice already.
Just one thing.
Please don't write the E-Mail addresses down in plain text everywhere.

Just don't want do get Spam from Spambots. ;)

When you finished writing the XML from the page just tell me the URL and i will insert it into the application.

Most important stuff is already working in the application with the test XML from you.
After that we can build in the search into the application.