Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create a simple HTML page from Address Book entries UNIX
This recent hint, and other ideas from its comments, are great ways to convert your Address Book entries into HTML. But if you are like me, your entries are pretty static, i.e. I don't add, remove, or change my list a lot. And when I'm away from home, I usually just need emails and phone numbers. So I wanted one simple page I could FTP to the web space I get from my ISP whenever I want to. So, I wrote this PHP script (I call it mkcontacts) I can run from the command line. It requires the contacts CLI app. Used in conjunction with sitecopy, I have a simple and quick way to create and update a phone/email list.

As usual, copy and paste this code into your favorite text editor, save somewhere in your PATH and then chmod +x filename to make it executable. Remember to install the contacts application first.

It should be self-explanatory, and is mostly commented. There's no -h help; the only parameter I included is -p for previewing the output without writing a file. I'm sure someone could do this in Perl or a shell script, but I like to use PHP when generating HTML. I'm sure it could be adapted for use on a PHP-enabled web server, or as a CGI script. Feel free to do with it as you will. Comments and critiques are welcome.

[robg adds: This worked as expected, and created a nice looking output page (though I tweaked the CSS colors and definitions to match the look of other pages on my family site).]
    •    
  • Currently 2.80 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[8,432 views]  

Create a simple HTML page from Address Book entries | 2 comments | Create New Account
Click here to return to the 'Create a simple HTML page from Address Book entries' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a simple HTML page from Address Book entries
Authored by: earthsaver on Jun 30, '05 10:58:09AM
Or you could just use the free application, AddressWeb.

---
- Ben Rosenthal
Q16 1.25 - Tiger

[ Reply to This | # ]

Create a simple HTML page from Address Book entries
Authored by: jctull on Jul 01, '05 10:27:33AM

I would not want my address, email and phone numbers posted on a public web space. You should discuss securing the address html through some form of user authentication.



[ Reply to This | # ]