Go Down

Topic: Library generator (Read 2407 times) previous topic - next topic

majenko

Nov 22, 2013, 08:30 pm Last Edit: Nov 22, 2013, 08:33 pm by majenko Reason: 1
Bored with writing the same code time and again when you start a new library?  Me too.

That's why I wrote myself a little Automatic Library Generator: http://www.uecide.org/blanklib.php

Just enter the name for your new library, select a license (if any) and enter your name or organisation (only so it can fill in the license text - I never record anything like that), and press "Generate".  You'll get a Zip file with your new blank library in it, with all the files named right, the license information in it, a template class, all ready to go.  Just fill in the code :)

Jimmy60

Awesome. Works as promised. Thanks.

Graynomad

Quote
Just fill in the code

Can't you do that part as well, I'm also bored with that :)

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com


nicoverduin

Care to share the PHP code? I would like to extend it a little bit :) (like doxygen code etc) :)
Met vriendelijke groet / kindest regards
Nico Verduin
www.verelec.nl

Nice I would love to make my own too.
I am working on stepper motor

majenko

I could do, but it's a little messy ;)

I know... I'll clean it up and github it - that way anyone could contribute.

nicoverduin

Met vriendelijke groet / kindest regards
Nico Verduin
www.verelec.nl

majenko

Ok, it's a bit cleaner.  There's enhancements I'd like to make too, like breaking out the actual template data from the code (it's embedded at the moment - quick'n'dirty ;) ).

https://github.com/majenkotech/ArduinoLibraryGenerator

Feel free to fork, clone, edit, commit, push, and generate pull requests to your heart's content.

majenko

Oh, and I have just split the template data out from the script into template files.  Much more elegant I feel - easier to edit and extend the template.

Jantje

Quote
Java isn't bad in itself, but it has enabled morons to write programs.

So did visual basic and does php.  8)
karma +1 for daring to share this opinion.
Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

majenko


Quote
Java isn't bad in itself, but it has enabled morons to write programs.

So did visual basic and does php.  8)
karma +1 for daring to share this opinion.
Best regards
Jantje

It's not an opinion... : ]:D

PHP is great for quick'n'dirty scripting work, as you can see by my code ;) It's also, like Java, incredibly powerful in the right hands.  I wouldn't choose PHP to write a desktop application, and I wouldn't choose Java to write a web application.  Come to that I wouldn't choose Java to write anything really, but it's often what you're stuck with when you're working with someone else's code...

And let's not even mention Visual Basic...

nicoverduin

Works like a charm. What I want to do is:
- add a bunch of doxygen parms I am working with
- add a couple of SVN parameters
- add the ability to work both under Arduino and Eclipse without source modifcation
- and any other nice to have stuff :)
But that does need some changes in the files and I am not sure the author likes it that way :smiley-mr-green: But of course I am always willing to share. Ia
Met vriendelijke groet / kindest regards
Nico Verduin
www.verelec.nl

Jantje


...
- add the ability to work both under Arduino and Eclipse without source modifcation

What is needed for this?
Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

nicoverduin

Hi Jantje
For Eclipse we include the .h file with the references to setup and loop and any functions we use. Which btw is neat programming as far as I am concerned :)
In the Arduino we can skip all this.
And a couple of my customers just want the sketch and that's it. So now I solve it this way:
Code: [Select]


#ifdef __IN_ECLIPSE__
#include "test.h"
#endif


Then it always works
Met vriendelijke groet / kindest regards
Nico Verduin
www.verelec.nl

Go Up