I’ll give you a hint. It’s [insert obscenity here] awesome, and this is a review of the Nettuts app “Structurer” (link).
Earlier today, I was setting up my 1,000,000th website, and thought, “HOLY CRAP. This is getting redundant.”.
When you work on as many sites as I do, or even if you just have to copy paste your files all the time, the hour or so it takes to load up all this stuff actually does pile up!
My typical workflow to set up the basics for getting started on a new site…
- Make the web folder
- Make the child folders (css, js, img, etc…)
- Go find the newest version of jquery
- Go copy paste in your ‘go-to’ files (in my case class.db.php, constant.inc.php, index.php, header.php, footer.php)
- Remove/replace content in ALL OF THOSE FILES
- Grab my go-to CSS files (HTML5 base, resets, etc…) and copy those in
Now not to jump to the end or anything, but here’s my workflow after spending 10 minutes setting up structurer to use a custom defined structure…
- Open app
- Select “Custom Site Build (HTML5)”
- Enter ~/Dropbox/webDev/sites/[new site here]
- Click “create”
- Go spend the 50 minutes I would’ve wasted before getting a coffee and relaxing
The video on the nettuts site WAS intriguing, however, without taking notes, I really had no clue where to start (and I am not a guy who takes notes), so I cracked it open and started the hard way (naturally ignoring the PDF provided in the download package).
It turns out to be quite easy!
- Enter the path where you want the new directory to be created (I was able to drag my web dev folder to the “Base path” input rather than typing it out)
- In the structure box, enter a list of files and folders to create
- For files, simply put the desired file name, ie. “index.php”
- For directories, suffix with a forward slash, i.e. “includes/”
- To put files INTO a newly created directory, you can either directly follow the newly created folder (as in “includes/”, next line “/config.inc.php”), or prefix the new file with the directory: “includes/config.inc.php”
Retrieving the contents of remote files and writing them to new files
This is the part that I was most pleased with, as this is the most time consuming part of actually setting up a new website.
This usually entails going to jquery.com, jqueryui.com, github (for a few different repos to make sure I’ve got the most current that’s been pushed), grabbing those files, then moving them to the new web directory.
I know, this all sounds super trivial, and in part- it is! But again, saving a few minutes multiplied by 1,000 means a lot of time and effort saved!
To automatically get the contents of a remote file, or prepopulate a file with anything you’d like, go to the templates menu, and select “Show Content Manager” (or command+m), add a name, shortcut (I got tricked up a bit here when creating new files with remote contents as the prefix to use is a colon: [i.e. “my-local-jquery.js:jquery]).
Select “URL” as the mode, drop it in, and go back to the “Structure” area (shown in the screenshot above).
In the screenshot below, I’m retrieving the most current version of the jquery library from google (http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js), and writing it to a file named “jquery-current.js” in my “js/” directory by typing in:
And in the next one, I’m writing a new file in my includes directory called “constant.inc.php” which contains my basic db connection details, adjustments for local vs. production environmental variables, and includes any other consistently included files via:
As aforementioned, Structurer is not the most super amazing thing ever to exist, but Structurer is a solid timesaver, that can let you make the most of your actual time spent working rather than digging around for all those files you always include anyway!
I personally liked it enough that it’s now in my dock next to textmate and sequel pro.
Don’t expect me to blither on about something being awesome in the future, but just this once! (maybe once more sometime later if something else happens to be simple and awesome).
Get it here: http://net.tutsplus.com/freebies/others/free-mac-utility-app-structurer/ and get on with your day.
To clarify about this article, I am absolutely not a guy who provides reviews, and this review is entirely unsolicited. I have no association with the application author, Nettuts author, or anyone/anything associated with Structurer.
Leave a comment
- MySQL : Query WordPress Database for Invalid Media Filenames
- PHP : Get Actual IP Address with PHP
- PHP : Clean sanitized database contents on output
- htaccess : Force www. prefix in URIs
- PHP : Force File Download with Correct Content Type
- Wordpress : Disable upgrade notification
- htaccess : Codeigniter Access to JS and CSS Files