The Profiler Builder module may be of interest to users of the Profiler module, so it would be nice if a link to the module could be added to the Profiler project page to spread the word.
Original issue summary
I was about to build a profiler install profile when I realized there was a lot of lines to copy and paste / type. I'm building a distribution sitting around 90 modules (and generally am lazy) so I wrote this little module to attempt to help build the .info file faster.
What this does: Activate the module then go to admin/settings/profiler_builder
It will generate 3 text fields:
The first one is a list of all modules installed, grouped by their package as listed in their .info files. This helps kick start the process of converting an existing site into an install profile.
The second one grabs all variables and writes them out in a profiler manner. This is a ton of variables for most but it's at least a comprehensive list that can be easier to hack apart instead of build / copy by hand.
The third text field is the same .info information for profiler but in drush format. I don't use drush so I really don't know the format all that well but it was a first stab.
None of these are intended to be the end all perfect file but they at least can help when building profiler profiles (I hope)!
I've also attached a screenshot along with the code in case anyone wanted to glance quickly as to what this does. This is 6.x though it's like 2 queries so shouldn't be hard to port.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | profiler_builder.zip | 2.71 KB | btopro |
| 2011-09-18_2224.png | 112.4 KB | btopro | |
| profiler_builder.zip | 2.66 KB | btopro |
Comments
Comment #1
btopro commentedupdated code to allow for deeper array structures and removed features dependency
Comment #2
markwk commentedNice working little module. I'm not sure this quite fits inside of profiler, since profiler is a library for the actual installation. Might be better posting as a full project or at least a sandbox and just provide a link on profiler home page to this.
I teach Drupal to Chinese students and this would be a nice little tool for showing them how to create simple and easy installation profiles.
Thanks btopro for your "laziness" ;)
Comment #3
gmclelland commentedThanks @btopro, great module - huge time saver along with the profiler module. +1 for a separate module
Comment #4
bisonbleu commentedKudo @btopro for this little gem!
I've just spent 3 days crafting a 90+ module installation profile - and debugging it! Typos are deadly. And so are modules that don't respect conventions (e.g. Google Analytics where project name = "google_analytics" but module name = "googleanalytics".
The variables field is particularly useful for customization.
Great work!
Comment #5
btopro commentedYeah it's definitely not perfect but I'd love to improve upon it and release it to it's own project page if it doesn't fit here as part of the main package (understandable). It seems to have problems with endlines in the variables (like email messages). If anyone knows of a blacklist of variables that shouldn't be added (like drupal private key) that'd be really useful in extending this module. I'll have to add some functionality to it in the next few weeks but could use a kick-started in some areas if someone wants to take a stab.
Comment #6
bisonbleu commentedProfiler Builder ran fine locally. But when I installed it on a remote server I got the following errors.
Couls it be related to French accents in the .info text field? Here is a sample.
variables[captcha_description_fr] = Cette question permet de s'assurer que vous êtes un utilisateur humain et non un logiciel automatisé de pollupostage.Comment #7
markwk commented@btopro: why don't you throw it into a sandbox or github for now? I glanced at strongarm and didn't notice that it was doing anything about any variables in particular.
Comment #8
btopro commentedI'm thinking the accents might be an issue, or the ' character. Haven't seen if it handles quotation marks nicely at all.
@markwk: not sure what you mean about strongarm, it'll have it's own place soon, working through decoupling a lot of modules for release this week.
Comment #9
markwk commented@btopro: strongarm handles variables for features so the premise was that it might be checking whether certain variables should be avoided....
Comment #10
btopro commentedOh i gotcha, I think this is upstream from that unless strongarm has a blacklist
Comment #11
btopro commentedSplit off as a new project -- http://drupal.org/project/profiler_builder
Comment #12
bisonbleu commentedCool! :-)
Comment #13
gmclelland commentedVery nice
Comment #14
q0rban commentedGreat stuff! I've wanted to do this from the inception of Profiler, but just haven't had the time. The ultimate goal for this project is to integrate Drush Make, Profiler, and Update API into one seamless solution for managing Drupal sites. I just haven't had time to realize that vision. Thanks for taking the initiative here! I see some ways to improve some of this code, but overall it gets the job done. Kudos!
I agree, this should not get packaged with this library, unless it is a drush command or some other non-module solution. I think it will make things too confusing. Thanks again!
Comment #15
btopro commentedI figured as much, it seemed like the next logical step :). Code definitely has room for improvement which I'll probably provide as I get closer to a release of my platform using this project to generate the file and save me tons of time. Great work on this library, this really should be part of Drupal core and the way that distributions are created in the first place. I think it would safe so much time and argument about "how much stuff" Drupal ships with. 3 or 4 great "use case" type of install profiles could be generated to give people an idea of what's possible out of the box with this API.
Comment #16
markwk commentedPorted to D7 with patch http://drupal.org/node/1307512 or download directly from github: https://github.com/markwk/profiler_builder7
Comment #17
btopro commentedmark can you mirror this post in the issue queue for http://drupal.org/project/profiler_builder
Comment #18
markwk commentedAlready did...
Comment #19
gmclelland commented@q0rban - How about adding a link to http://drupal.org/project/profiler_builder from the profiler module page. Might help get some more visibility/testing.
Comment #20
btopro commented+1 code isn't on d.o, at this moment but it will be in the near future and I don't want to be the only maintainer on it if anyone else wants to pick it up and clean it up some more.
Comment #21
btopro commentedJust to wrap up this thread. D6 and D7 versions of the profiler builder module are now on drupal.org
Comment #22
decipheredAnd yet you forgot to actually wrap up this thread :-)
Comment #23
markwk commented@Deciphered: http://drupal.org/node/1283448#comment-5116786
Comment #24
decipheredUpdating issue name so that some action may possible be taken.
Comment #24.0
decipheredUpdated issue summary.
Comment #24.1
decipheredUpdated issue summary.
Comment #25
btopro commented+1 I think this makes profiler files much easier to build faster or at least get a good starting point... and I'm completely not saying that because I started the project or anything...
...
Comment #26
q0rban commentedGood idea... Added!
Comment #27.0
(not verified) commentedUpdated issue summary.