Good day for me today :-)
Mac OSX Hints have published two of my Mac hints! Quite pleased with that!
http://www.macosxhints.com/article.php?story=20080427091554310
and
http://www.macosxhints.com/article.php?story=20080427091327509
A collection of thoughts, tips and tricks and other ponderings relating to technology, now oxidized.
Showing posts with label macosx. Show all posts
Showing posts with label macosx. Show all posts
Thursday, May 01, 2008
Wednesday, April 23, 2008
Getting Alex to read you to sleep (Make your own Audiobooks on a Mac)
I have recently undertaken some training in which I have to cover a massive amount of material. Being the natural procrastinator that I am I immediately went on the prowl for better books, better methods and all other sorts of periphery that doesn't actually count as studying.
One of these projects was to convert the text versions of my study guides to audio so that I could listen to the text in the car while I drive (an ideal time to study). The process was actually surprisingly simple.
Here is a procedure to convert PDFs to Audio books.
1) Open the document in Preview.
2) Command + A (Select All), Command + C (Copy).
3) Open a new document in TextEdit.
4) Paste the contents into the new document (Command + V)
5) Convert the document to Text (Format -> Make plain text)
6) Save the file to a .txt document. For this example we use rawfile.txt
At this stage you might want to do some cleanup. I use a little Perl Script listed below. You might want to do some Regular Expression hacking do clean up the document from things like Footers, Headers or Page Numbers.
convert.pl
7) Save convert.pl to the file system. And make it executable:
8) Clean up the text document:
9) Open the file cleanfile.txt in TextEdit (you might have to choose the UTF-8 type)
10) Fire up Automator and create a Custom script with two actions.
Select an appropriate target directory and filename. I highly recommend choosing the voice Alex
11) Make sure your cleanfile.txt document in TextEdit is selected.
12) Go back into Automator and hit Play.
13) Sit back and relax while Leopard converts your text to an Audio file.
From there you can import the audio file into iTunes, convert it to Mp3 if you want and sync it to your iPod to take the book on the road.
Guess I should start studying now...
One of these projects was to convert the text versions of my study guides to audio so that I could listen to the text in the car while I drive (an ideal time to study). The process was actually surprisingly simple.
Here is a procedure to convert PDFs to Audio books.
1) Open the document in Preview.
2) Command + A (Select All), Command + C (Copy).
3) Open a new document in TextEdit.
4) Paste the contents into the new document (Command + V)
5) Convert the document to Text (Format -> Make plain text)
6) Save the file to a .txt document. For this example we use rawfile.txt
At this stage you might want to do some cleanup. I use a little Perl Script listed below. You might want to do some Regular Expression hacking do clean up the document from things like Footers, Headers or Page Numbers.
convert.pl
#!/opt/local/bin/perl
while (<>) {
s/^\d+\/.*$//; #Remove page numbers
s/^\d*.$//;
s/Chapter \d+: [\s\w]+//;
#Remove image and figure references
s/^Figure \d+.*/;
#Remove - continuations from end on lines.
if (s/-.$//) {
chomp;
}
print;
}
7) Save convert.pl to the file system. And make it executable:
$chmod u+x convert.pl
8) Clean up the text document:
$cat rawfile.txt | ./convert.pl > cleanfile.txt
9) Open the file cleanfile.txt in TextEdit (you might have to choose the UTF-8 type)
10) Fire up Automator and create a Custom script with two actions.
- Text -> Get Contents of TextEdit Document
- Music -> Text to AudioFile
Select an appropriate target directory and filename. I highly recommend choosing the voice Alex
11) Make sure your cleanfile.txt document in TextEdit is selected.
12) Go back into Automator and hit Play.
13) Sit back and relax while Leopard converts your text to an Audio file.
From there you can import the audio file into iTunes, convert it to Mp3 if you want and sync it to your iPod to take the book on the road.
Guess I should start studying now...
I'll do some home work while I listen to my fresh Audiobook :-)
Thursday, January 10, 2008
Mac OSS roundup
Thanks for KMF for some of these.
Looking for OSS software for Mac OS X?
Here is a list of very useful Open Source Software/Free Software directories for the Mac. I have used a couple of these with great success. There inevitably is some duplication, so be warned.
Here they are:
Looking for OSS software for Mac OS X?
Here is a list of very useful Open Source Software/Free Software directories for the Mac. I have used a couple of these with great success. There inevitably is some duplication, so be warned.
Here they are:
- Open Source Mac (http://www.opensourcemac.org/)
- FreeSMUG (http://www.freesmug.org/)
- iUseThis (http://osx.iusethis.com/search?q=open+source)
- CocoaDev (http://www.cocoadev.com/index.pl?CocoaOpen)
- AjaxFlakes Top 100 Best (http://www.ajaxflakes.com/open-source/top-100-best-open-source-mac-software)
- The mother ship (http://www.apple.com/opensource/)
- MacPorts (http://www.macports.org/)
- Fink (http://www.finkproject.org/)
Apple Address Book and Microsoft Exchange (LDAP)
I had a short discussion this afternoon with a fellow Mac fanatic (KMF) discussing the problem we both share and that is: Accessing Microsoft Exchange from Mac OS X.
There are three elements that you would mostly be interested in: email, calendar and contacts. This quick howto deals with getting Address Book to work with LDAP (Microsoft Active Directory in our case).
Step 1: Determine the default naming context (base dn) for the search
- Fire up Terminal and issue an ldapsearch to determine the default naming context:
$ldapsearch -h your.exchange.server -x -b '' -s base '(objectclass=*)' 'namingContexts'

- Search for the lines beginning with "namingContexts":
namingContexts: DC=mycompany,DC=com
namingContexts: CN=Configuration,DC=mycompany,DC=com
namingContexts: CN=Schema,CN=Configuration,DC=mycompany,DC=com
The result you are looking for is the "base/root" and that is the shortest one in the case of Exchange (btw - this will work on other LDAP servers too), ie. DC=mycompany,DC=com.
Step 2: Configure Address Book to query the server
- Fire up Address Book and go to the Preferences (Command + ,). Select the LDAP tab.
- Hit the "+" to add a new server.
- In the "Server" field complete the hostname of your Exchange server or Active Directory domain controller in the case of larger companies.
- In the "Search Base" use the information that you retrieved from "ldapsearch" earlier. It will be in the format DC=company,DC=com.
- Choose "Simple" authentication.
- "User Name" should be your normal Windows logon.
- "Password" again, your Windows password.
Step 3: Searching your Global Address list.
- Address Book will automatically query the server whenever you search for a name.

This will also happen whenever you type new addresses into Mail.app when composing emails.
Hope this helps!
There are three elements that you would mostly be interested in: email, calendar and contacts. This quick howto deals with getting Address Book to work with LDAP (Microsoft Active Directory in our case).
Step 1: Determine the default naming context (base dn) for the search
- Fire up Terminal and issue an ldapsearch to determine the default naming context:
$ldapsearch -h your.exchange.server -x -b '' -s base '(objectclass=*)' 'namingContexts'

- Search for the lines beginning with "namingContexts":
namingContexts: DC=mycompany,DC=com
namingContexts: CN=Configuration,DC=mycompany,DC=com
namingContexts: CN=Schema,CN=Configuration,DC=mycompany,DC=com
The result you are looking for is the "base/root" and that is the shortest one in the case of Exchange (btw - this will work on other LDAP servers too), ie. DC=mycompany,DC=com.
Step 2: Configure Address Book to query the server
- Fire up Address Book and go to the Preferences (Command + ,). Select the LDAP tab.
- Hit the "+" to add a new server.
- In the "Server" field complete the hostname of your Exchange server or Active Directory domain controller in the case of larger companies.- In the "Search Base" use the information that you retrieved from "ldapsearch" earlier. It will be in the format DC=company,DC=com.
- Choose "Simple" authentication.
- "User Name" should be your normal Windows logon.
- "Password" again, your Windows password.
Step 3: Searching your Global Address list.
- Address Book will automatically query the server whenever you search for a name.

This will also happen whenever you type new addresses into Mail.app when composing emails.
Hope this helps!
Subscribe to:
Posts (Atom)