Posts for tag: Coda 3

Introducing Text Tools - a simple text manipulating Plugin for Coda on the Mac

Coda Plugin - Text Tools

I recently released my first Plugin for Coda (Un-Encode Entities), now follow on from that I have created another: Text Tools.

The Text Tools Plugin for Coda adds several options for quickly manipulating text in your html / php / javascript etc... files. The options it adds are as follows:

  • Convert to UPPERCASE
  • Convert to lowercase
  • Convert to Caps Case
  • Newline to <br />
  • Add Slashes to Quotes
  • Strip Slashes from Quotes
Text Tools Plugin for Coda

You can download the Text Tools Plugin from my Downloads page. (Requires Coda for Mac OSX).

Un-Encode Entities: a plugin for Coda

Coda Plugin - Un-Encode Entities

I've been using Coda on the Mac since it first came out (2007 I think), and well, I've just discovered how simple it is to create plugins using nothing more complicated than PHP. So here it is: Un-Encode Entities, a Plugin for Coda.

It works like this. Basically if you have something like this:


&lt;blockquote&gt;&lt;p&gt;&#8220;Arte non &egrave; mai finita, &egrave; solo abbandonata&#8221;&lt;/p&gt;&lt;/blockquote&gt;

or this:


&#60;&#98;&#108;&#111;&#99;&#107;&#113;&#117;&#111;&#116;&#101;&#62;&#60;&#112;&#62;&#38;&#35;&#56;&#50;&#50;&#48;&#59;&#65;&#114;&#116;&#101;&#32;&#110;&#111;&#110;&#32;&#232;&#32;&#109;&#97;&#105;&#32;&#102;&#105;&#110;&#105;&#116;&#97;&#44;&#32;&#232;&#32;&#115;&#111;&#108;&#111;&#32;&#97;&#98;&#98;&#97;&#110;&#100;&#111;&#110;&#97;&#116;&#97;&#38;&#35;&#56;&#50;&#50;&#49;&#59;&#60;&#47;&#112;&#62;&#60;&#47;&#98;&#108;&#111;&#99;&#107;&#113;&#117;&#111;&#116;&#101;&#62;

Then the Un-Encode Entities plugin will convert it to this:


<blockquote><p>&#8220;Arte non è mai finita, è solo abbandonata&#8221;</p></blockquote>

You can download it here: Un-Encode Entities for Coda. (Requires Coda for Mac OSX).

How to use Subversion version control with Coda on the Mac

For those of you who don't know, Subversion is a version control system. Basically it enables you to track all changes to a project. It gives added security and control to the integrity of your work enabling you to compare a document with any previously saved version, and revert to, or merge different versions of a document.

Coda for MacIn this tutorial I will show you how to set up Subversion to work with Coda on the Mac. Coda from Panic Inc. is my app of choice when it come comes to web development on the Mac — it may not do everything, but it does a lot and it makes working with Subversion a cinch!

For the purposes of this tutorial I will assume that you develop sites locally, as I do, using MAMP and will be installing Subversion locally to manage your projects as you work on them.

1 First you need to get yourself a copy of Subversion. Go to http://www.open.collab.net/downloads/community/ and download the latest binaries, then install. (the installer will install Subversion to: /opt/subversion/bin/svn ).

terminal.app2 The next thing you need to do is create a repository. The repository is where all of your versioned data will be stored. You can locate it anywhere you like, personally I have mine in my home directory, where I also have the directory that is the root level of my localhost server. To create the repository, you need to access the command line. Open a terminal window and navigate to your chosen location (in my case: cd /Users/duncan/) and then create the repository: svnadmin create SVNrep - this will create a repository in the home folder called SVNrep.

3 OK, now that SVN is installed and you've created a repo, you need to configure it. In the Finder, open the directory 'conf' that resides inside your repo. (in this case /Users/duncan/SVNrep/conf/). Using a text editor, open the files svnserve.conf and passed. In svnserve, you need to uncomment and amend the following lines:


anon-access = none
auth-access = read
password-db = passwd
realm = My Repo

Save and close this file, then add a line to the passwd file to set your username and password, for example:


myusername = mypassword

Then save and close the passwd file.

4 Now to add your project to the repo - again, this will be done using the command line. Again, I'm assuming that you have many sites on the go, and each is sitting in a separate folder on your server - let's say you have one called 'my_great_site'. To add this to the repo type the following:
svn import my_great_site file:///Users/duncan/SVNrep/my_great_site -m "Initial import"
The path will be different for you depending on where you have put your repo and what you have called it.

5 Now you can delete you site as its safely stored in the repo (OK, you don't want to delete it, just move it out of the root level of your server and archive it somewhere).

6 To work on your site, you need to checkout a 'working copy' from your repository (terminal again!). Type the following:
svn checkout file:///Users/duncan/SVNrep/my_great_site Webserver/my_great_site-SVN
As before you may need to adjust the paths depending on A. where you repository is (in this case: /Users/duncan/SVNrep, and where your server root is: /Users/duncan/Webserver/ ). The final -SVN is not necessary, it's just my way of visually marking the project as being under version control.

Coda preferences

7 OK, now the project has been checked out, it's time to update your site settings in Coda. First, open the preferences - Coda > Preferences... and click on the 'Files' tab. Enter /opt/subversion/bin/svn into the 'Subversion Tool Path:' field, then close the preferences.

8 Nearly done, now it's time to update your site settings in Coda. Open the 'Sites' tab and click on the 'i' icon for your site. (pic). If you added -SVN to your checked out copy (or called it something different entirely, you will need to adjust the 'Local URL:' and 'Local Root:' fields). Now scroll down to the bottom, and expand the 'Source Control' section. Check the 'Enabled' checkbox and then enter you username and password that you set up in stage 3. If the Repository URL is not already set, close the sites panel and open it again. If it's still not set you may need to add it manually - in this case it would be: file:///Users/duncan/SVNrep/my_great_site

Coda sites panel

9 That's it - your site is now under source control, check out the 'Managing Files With Source Control' section of the Coda Help files - enjoy!

HOME