Elgg Plugin Structure Generator v1.1

Release Notes

This plugin will generate the elgg plugin structure based on a few input command arguments. I did this quickly when I was on a business trip across the country because I was getting tired of having to create things I didn't need. 

Everything can be accessed by typing in:

python generate_elgg_plugin.py --help 

Some examples are:
python generate_elgg_plugin.py --root-dir='C:\Apache\htdocs\elgg\mod\plugin_name'

This will generate a:

start.php
manifest.xml

it will also populate all the manifest.xml and start.php fields to match Elgg's formatting structure for Elgg's version control.

Update (1.1):

To update a manifest to a newer version

./generate_elgg_plugin.py --root-dir='plugin-directory' --update-version --version=1.1

Auto generation of the elgg_version attribute, this is populated by parsing the version.php file in the root elgg directory (can be overridden by commandline)

By default, you will be required to pass in arguments to the script to generate your folders, so this means an example command is:

python generate_elgg_plugin.py --root-dir='C:\Apache\htdocs\elgg\mod\plugin_name' views languages actions images

This will generate all the directories. Type in views/default to generate a views/default folder too.

TODO:

Allow for an auto-update of the version using a command-line option (e.g. --update-version=1.1) [implemented.]
Create plugin folder [implemented.]
Create custom folders [implemented.]

  • Nice!
    That was one of my first ideas too, after having seen the builder scripts in various frameworks and specifically on Symfony Project, this is indeed a nice idea.

    I would hate to branch out of the current code, is this available in publicly accesed repository such as SourceForge which we can further develop on it?

  • Hi Liri.

    Sure, I can check this into Github if you want. Would this be something that you would like to play around with? I'll do it tonight.

    I'm obviously looking for various improvements, so any suggestions would be very welcome. I made some minor modifications last night, so I will put it on github when I get a chance.

    Check back later for the source!

    -Mahmoud

  • mabdelkader

     

    I am very new to this stuff could you by chance put out a tutorial or cheat sheet for this. I am trying to learn all I can and find little in the way of any tutorials.

    Thank you

    Jim

  • This sounds pretty cool but I have never made my own plugin i have only made changes to other plugins.

  • @Stonetrol2, I'll write up a quick tutorial when I get a chance soon on how to use this plugin to create future plugins.

    @twitface, you can still use this plug-in to update the version in the manifest file

    @edesignerz.net, it should remove some of the tedious work that people have to do just to create a plugin by letting you focus more on how to get things running:) thanks for using it!

  • Thank you

    mabdelkader that would be great.

  • I think I will integrate into Elgg as a plugin to generate new plugins from PHP by invoking this python script through a system call with the values input through some forms from the plugin's settings.

Stats

  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 1272
  • Recommendations: 0

Other Projects

View mahmoudimus's plugins