Posts Tagged scripting

New Symfony Project Woes

Generating a new Symfony framework project is as simple as a single command. But as with many things it rarely works the way you want out of the box. I’ve documented every step and every command that I end up running on a new project to ensure that it behaves the way it should and I ended up with a 30 point list! I have to initialize the project, modify several files to enable things such as the Doctrine ORM plugin, install several plugins such as the sfDoctrineGuard authentication plugin, SVN version control taking careful steps to avoid placing the cache, logs, and the base model classes under revision, and set up my development environment for the new project.

I need to work on a way to automate as much as I can of the process. The tricky thing is that certain commands need to be executed as root (inlcuding rebooting the web server) and that throws a monkey wrench in the gears of that idea.  Certainly one could create a script and SUID root, but that is going to require extensive care to ensure that the process is handled gracefully if it fails for whatever reason.  It’s a large undertaking to say the least. I guess I have to weigh the time spent each new project vs. coding such a script.

, , , ,

2 Comments

Data Weaving

Today I am working diligently on a new project. I was busily moving textual data from various applications I use in my development and into an excel spreadsheet for quick reference later. From three different files opened in two different (and both very large) applications and Excel 2007 all at the same time. If computers were ever revolt mine’s going to go straight for the jugular.

Then after I finished building the table in Excel I realized I had to create multiple (24 to be exact) template files for all the pages this new project required. I didn’t feel like typing the command out (I used touch on my Linux devel box) so I copied the text I needed for the base of the file name, tacked on the remainder of the file name and removed the carriage returns with a quick recorded macro in UltraEdit 32, and pasted it into my shell window. BAM!

OK for most of you that will probably be complete gibberish. And that’s OK. It just suddenly dawned on me what exactly I was doing to accomplish my goal.  Such a contrived, inefficient but effective way of doing it.  Also as suddenly, the phrase “Data Weaving” popped into mind.

, , , ,

No Comments