<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Convert a Text File to RTF, HTML, DOC, and more via Command Line</title>
	<atom:link href="http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/feed/" rel="self" type="application/rss+xml" />
	<link>http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/</link>
	<description>News, tips, software, reviews, and more for Mac OS X, iPhone, iPad</description>
	<lastBuildDate>Thu, 23 May 2013 18:55:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: John</title>
		<link>http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/#comment-438005</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 16 Oct 2012 12:36:15 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=18360#comment-438005</guid>
		<description>Very useful note about using TextEdit to convert text to HTML thank you</description>
		<content:encoded><![CDATA[<p>Very useful note about using TextEdit to convert text to HTML thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Convert Rich Text to Plain Text Quickly in Mac OS X</title>
		<link>http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/#comment-386439</link>
		<dc:creator>Convert Rich Text to Plain Text Quickly in Mac OS X</dc:creator>
		<pubDate>Tue, 08 May 2012 15:45:32 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=18360#comment-386439</guid>
		<description>[...] You can also open an RTF document into TextEdit and perform the conversion directly on the file, saving the resulting file as a TXT document. The same conversions can also be achieved from the temrinal by using the textutil command. [...]</description>
		<content:encoded><![CDATA[<p>[...] You can also open an RTF document into TextEdit and perform the conversion directly on the file, saving the resulting file as a TXT document. The same conversions can also be achieved from the temrinal by using the textutil command. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Linds</title>
		<link>http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/#comment-359706</link>
		<dc:creator>Linds</dc:creator>
		<pubDate>Sun, 18 Mar 2012 03:54:02 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=18360#comment-359706</guid>
		<description>Here’s an Applescript droplet (OSX Lion) to package this up:

(* ConvertFileFormat ©Lindsay Crawford, 2012
Based on William Pearson&#039;s article http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/ and loosely, Apple&#039;s Droplet with Settable Properties.app

INSTRUCTIONS
Run the app to convert one file, or drop a group of files on the app. Converted files with same names but different extensions are left in the original folder.
Unconvertible files are ignored.
*)


property type_list : {&quot;txt&quot;, &quot;rtf&quot;, &quot;rtfd&quot;, &quot;html&quot;, &quot;doc&quot;, &quot;docx&quot;, &quot;odt&quot;, &quot;wordml&quot;, &quot;webarchive&quot;}

on run -- display description and get a file
	try
		open ({choose file})
	end try
end run

-- This droplet processes files dropped onto the applet 
on open these_items
	
	set convertTo to (choose from list type_list with title &quot;Format Conversion&quot; with prompt &quot;Select the format to convert the file(s) to:&quot; default items {&quot;html&quot;} without multiple selections allowed) as text
	
	repeat with i from 1 to the count of these_items
		
		set this_item to item i of these_items
		
		-- Get the info for the item
		tell application &quot;System Events&quot;
			set the item_info to (get the properties of this_item)
			
			set this_name to the name of the item_info
			set this_place to the POSIX path of the container of the item_info
			set ext to name extension of the item_info
			
		end tell
		
		-- now check the file type
		if (ext is in type_list) then
			process_item(this_place, this_name, convertTo)
		end if
		
	end repeat
	
end open

-- this sub-routine processes files 
on process_item(this_place, this_name, convertTo)
	-- this_place is a POSIX path to the folder for this file
	-- this_name is just the file name with extension
	-- convertTo is a text string containing the new file extension
	
	copy &quot;cd &quot; &amp; quoted form of this_place &amp; &quot;;textutil -convert &quot; &amp; convertTo &amp; space &amp; quoted form of this_name to theCommand
	do shell script theCommand
	
end process_item</description>
		<content:encoded><![CDATA[<p>Here’s an Applescript droplet (OSX Lion) to package this up:</p>
<p>(* ConvertFileFormat ©Lindsay Crawford, 2012<br />
Based on William Pearson&#8217;s article <a href="http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/" rel="nofollow">http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/</a> and loosely, Apple&#8217;s Droplet with Settable Properties.app</p>
<p>INSTRUCTIONS<br />
Run the app to convert one file, or drop a group of files on the app. Converted files with same names but different extensions are left in the original folder.<br />
Unconvertible files are ignored.<br />
*)</p>
<p>property type_list : {&#8220;txt&#8221;, &#8220;rtf&#8221;, &#8220;rtfd&#8221;, &#8220;html&#8221;, &#8220;doc&#8221;, &#8220;docx&#8221;, &#8220;odt&#8221;, &#8220;wordml&#8221;, &#8220;webarchive&#8221;}</p>
<p>on run &#8212; display description and get a file<br />
	try<br />
		open ({choose file})<br />
	end try<br />
end run</p>
<p>&#8211; This droplet processes files dropped onto the applet<br />
on open these_items</p>
<p>	set convertTo to (choose from list type_list with title &#8220;Format Conversion&#8221; with prompt &#8220;Select the format to convert the file(s) to:&#8221; default items {&#8220;html&#8221;} without multiple selections allowed) as text</p>
<p>	repeat with i from 1 to the count of these_items</p>
<p>		set this_item to item i of these_items</p>
<p>		&#8211; Get the info for the item<br />
		tell application &#8220;System Events&#8221;<br />
			set the item_info to (get the properties of this_item)</p>
<p>			set this_name to the name of the item_info<br />
			set this_place to the POSIX path of the container of the item_info<br />
			set ext to name extension of the item_info</p>
<p>		end tell</p>
<p>		&#8211; now check the file type<br />
		if (ext is in type_list) then<br />
			process_item(this_place, this_name, convertTo)<br />
		end if</p>
<p>	end repeat</p>
<p>end open</p>
<p>&#8211; this sub-routine processes files<br />
on process_item(this_place, this_name, convertTo)<br />
	&#8211; this_place is a POSIX path to the folder for this file<br />
	&#8211; this_name is just the file name with extension<br />
	&#8211; convertTo is a text string containing the new file extension</p>
<p>	copy &#8220;cd &#8221; &amp; quoted form of this_place &amp; &#8220;;textutil -convert &#8221; &amp; convertTo &amp; space &amp; quoted form of this_name to theCommand<br />
	do shell script theCommand</p>
<p>end process_item</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: D L S</title>
		<link>http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/#comment-210106</link>
		<dc:creator>D L S</dc:creator>
		<pubDate>Sat, 09 Jul 2011 20:26:36 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=18360#comment-210106</guid>
		<description>Loved it..

I am a completely new and first Time Mac User and have been a Windows User for almost 10 years.. Just loved learning all this stuff..

Used to do a lot of such things back when Learnt DOS in Windows</description>
		<content:encoded><![CDATA[<p>Loved it..</p>
<p>I am a completely new and first Time Mac User and have been a Windows User for almost 10 years.. Just loved learning all this stuff..</p>
<p>Used to do a lot of such things back when Learnt DOS in Windows</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Convert Font Family and Text Size of a Document from the Command Line</title>
		<link>http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/#comment-209791</link>
		<dc:creator>Convert Font Family and Text Size of a Document from the Command Line</dc:creator>
		<pubDate>Fri, 08 Jul 2011 18:05:48 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=18360#comment-209791</guid>
		<description>[...] addition to being able to convert TXT files to RTF or other filetypes, you can use textutil to convert the font family and font size of a document from the command [...]</description>
		<content:encoded><![CDATA[<p>[...] addition to being able to convert TXT files to RTF or other filetypes, you can use textutil to convert the font family and font size of a document from the command [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david</title>
		<link>http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/#comment-209780</link>
		<dc:creator>david</dc:creator>
		<pubDate>Fri, 08 Jul 2011 17:13:02 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=18360#comment-209780</guid>
		<description>viceroy - you can do the concatenation by just using cat

being a unix admin I love learning new tricks and can see potential benefits in certain cases by using this thanks!

I think this goes hand and hand with being able to manipulate images and convert to different types try the following to learn more about that.
sips --help</description>
		<content:encoded><![CDATA[<p>viceroy &#8211; you can do the concatenation by just using cat</p>
<p>being a unix admin I love learning new tricks and can see potential benefits in certain cases by using this thanks!</p>
<p>I think this goes hand and hand with being able to manipulate images and convert to different types try the following to learn more about that.<br />
sips &#8211;help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Viceroy</title>
		<link>http://osxdaily.com/2011/07/06/convert-a-text-file-to-rtf-html-doc-and-more-via-command-line/#comment-209118</link>
		<dc:creator>Viceroy</dc:creator>
		<pubDate>Wed, 06 Jul 2011 19:18:14 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=18360#comment-209118</guid>
		<description>I like the concatenation aspect but I don&#039;t think I would use the conversions when I can do it through other text editors.</description>
		<content:encoded><![CDATA[<p>I like the concatenation aspect but I don&#8217;t think I would use the conversions when I can do it through other text editors.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/3 queries in 0.003 seconds using disk: basic
Object Caching 255/256 objects using disk: basic
Content Delivery Network via cdn.osxdaily.com

Served from: osxdaily.com @ 2013-05-23 13:36:41 -->