<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Teguh Eko Budiarto &#187; css</title>
	<atom:link href="http://teguheko.echodess.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://teguheko.echodess.com</link>
	<description>Web Programming and Sharing Experience</description>
	<lastBuildDate>Tue, 23 Aug 2011 03:58:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>SVN::Notify::HTML::ColorDiff Inline CSS</title>
		<link>http://teguheko.echodess.com/2009/11/svn-notify-html-colordiff-inline-cs/</link>
		<comments>http://teguheko.echodess.com/2009/11/svn-notify-html-colordiff-inline-cs/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 07:47:03 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://teguheko.echodess.com/?p=92</guid>
		<description><![CDATA[We are using SVN to save our works and hooking a post-commit script which one of the function is to send e-mail regarding the changes that had just made. We are using the wonderful SVN::Notify, a perl application to do the job. It already have the functionality to produce a beautifully diff colored HTML email [...]]]></description>
			<content:encoded><![CDATA[<p>We are using SVN to save our works and hooking a post-commit script which one of the function is to send e-mail regarding the changes that had just made. We are using the wonderful <a href="http://search.cpan.org/dist/SVN-Notify/">SVN::Notify</a>, a <a href="http://www.perl.org/">perl</a> application to do the job. It already have the functionality to produce a beautifully diff colored HTML email using the SVN::Notify::HTML::ColorDiff module as the handler.</p>
<p>However, since we are using web based Google Apps Gmail interface as our email client, the HTML was not rendered nicely because the CSS is not applied inside the interface. We need to change the CSS to the inline style. And then I found a patch done <a href="http://www.jaim.at/2008/09/06/jack-moffitt-power-up-your-commit-e-mails/">here</a>. Because it is a direct hack, I want it to be more generic that the user can choose the inline style or not, then I modified a little bit more. I added optional parameter &#8211;css-inline to generate CSS style directly inline with the HTML tags. I had submitted the changes to the original author hoping he will include this option in the next revision. Just in case, I also put it here.</p>
<p>Snippets to add the additional parameter:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000066;">package</span> SVN<span style="color: #339933;">::</span><span style="color: #006600;">Notify</span><span style="color: #339933;">::</span><span style="color: #006600;">HTML</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># $Id: HTML.pm 4617 2009-03-19 17:04:53Z david $</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> HTML<span style="color: #339933;">::</span><span style="color: #006600;">Entities</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> SVN<span style="color: #339933;">::</span><span style="color: #006600;">Notify</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$SVN</span><span style="color: #339933;">::</span><span style="color: #006600;">Notify</span><span style="color: #339933;">::</span><span style="color: #006600;">HTML</span><span style="color: #339933;">::</span><span style="color: #006600;">VERSION</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'2.79'</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">@SVN</span><span style="color: #339933;">::</span><span style="color: #006600;">Notify</span><span style="color: #339933;">::</span><span style="color: #006600;">HTML</span><span style="color: #339933;">::</span><span style="color: #006600;">ISA</span> <span style="color: #339933;">=</span> <span style="color: #000066;">qw</span><span style="color: #009900;">&#40;</span>SVN<span style="color: #339933;">::</span><span style="color: #006600;">Notify</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
__PACKAGE__<span style="color: #339933;">-&gt;</span><span style="color: #006600;">register_attributes</span><span style="color: #009900;">&#40;</span>
    linkize   <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'linkize'</span><span style="color: #339933;">,</span>
    css_url   <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'css-url=s'</span><span style="color: #339933;">,</span>
    wrap_log  <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'wrap-log'</span><span style="color: #339933;">,</span>
    css_inline <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'css-inline'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>You may download the full source below:</p>
<ul>
<li><a href="http://sites.google.com/site/teguheko/home/files-place-holder/HTML.pm?attredirects=0&amp;d=1">HTML.pm</a></li>
<li><a href="http://sites.google.com/site/teguheko/home/files-place-holder/ColorDiff.pm?attredirects=0&amp;d=1">ColorDiff.pm</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2009/11/svn-notify-html-colordiff-inline-cs/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

