<?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>Elvis Stansvik</title>
	<atom:link href="http://estan.dose.se/feed" rel="self" type="application/rss+xml" />
	<link>http://estan.dose.se</link>
	<description>Random stuff on my mind, or reports from my trips</description>
	<lastBuildDate>Fri, 11 Nov 2011 19:36:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Opinions on Lenovo X220?</title>
		<link>http://estan.dose.se/2011/11/opinions-on-lenovo-x220</link>
		<comments>http://estan.dose.se/2011/11/opinions-on-lenovo-x220#comments</comments>
		<pubDate>Fri, 11 Nov 2011 19:36:13 +0000</pubDate>
		<dc:creator>estan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[lenovo]]></category>
		<category><![CDATA[planetkde]]></category>
		<category><![CDATA[x220]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=270</guid>
		<description><![CDATA[(Sorry in advance for this possible misuse of the planet, but I feel this might be geeky enough). My old Fujitsu-Siemens Amilo Si1520 laptop, which has served me well all in all, has started to fall apart on me hardware-wise. &#8230; <a href="http://estan.dose.se/2011/11/opinions-on-lenovo-x220">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>(Sorry in advance for this possible misuse of the planet, but I feel this might be geeky enough).</p>
<p>My old Fujitsu-Siemens Amilo Si1520 laptop, which has served me well all in all, has started to fall apart on me hardware-wise. Since I recently got hold of a bit of extra cash, I&#8217;m looking for a replacement. I&#8217;m considering the Lenovo X220. It&#8217;s basically the same form factor as my current one, which is nice since it&#8217;s what I&#8217;m looking for. And it seems it has gotten some good reviews. I&#8217;ve never owned a Thinkpad, or an IBM/Lenovo machine for that matter.</p>
<p>Anyone have an X220 who can give me the inside scoop on what annoys you most about the machine? I see in the spec sheet that it&#8217;s certfied for Redhat/Novell/Ubuntu, but has anyone had any problems getting things to work?</p>
<p>If I get this model, I&#8217;d probably be getting the Core i7 one, but without an SSD since I already have a 180 GB SSD to put in it.</p>
<p>Thanks for any answers/recommendations!</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2011/11/opinions-on-lenovo-x220/feed</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Brief GSoC Update &#8212; Interactive Table Resizing and Cell Selections</title>
		<link>http://estan.dose.se/2011/08/brief-gsoc-update-interactive-table-resizing-and-cell-selections</link>
		<comments>http://estan.dose.se/2011/08/brief-gsoc-update-interactive-table-resizing-and-cell-selections#comments</comments>
		<pubDate>Fri, 05 Aug 2011 15:49:37 +0000</pubDate>
		<dc:creator>estan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[planetkde]]></category>
		<category><![CDATA[scribus]]></category>
		<category><![CDATA[tables]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=254</guid>
		<description><![CDATA[Hi everybody, In the coming days, I&#8217;ll try to write a longer post with more technical details about my recent work on the project. Until then, here&#8217;s a short screencast showing some of the new features; interactive table resizing and &#8230; <a href="http://estan.dose.se/2011/08/brief-gsoc-update-interactive-table-resizing-and-cell-selections">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi everybody,</p>
<p>In the coming days, I&#8217;ll try to write a longer post with more technical details about my recent work on the project. Until then, here&#8217;s a short screencast showing some of the new features; interactive table resizing and cell selections. This time it includes me speaking a bit (!). And the format is now WebM/VP8 instead of Ogg/Theora. White areas in the capture got some weird tinting, but that&#8217;s a screencasting problem and not my code :)</p>
	<video id="wp_mep_1"   width="512" height="384"  controls="controls" preload="true"  >
		
		
		<source src="http://www.strongspace.com/estan/public/gsoc2011/resizing_and_selections.webm" type="video/webm" />
		
		
		
		
		<object width="512" height="384" type="application/x-shockwave-flash" data="http://estan.dose.se/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://estan.dose.se/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=" />			
		</object>		
	</video>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_1').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		
	});
});
</script>

<p><a href="http://www.strongspace.com/estan/public/gsoc2011/resizing_and_selections.webm">Download Video (~12 MB WebM)</a></p>
<p>Bye &#8217;til next time!</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2011/08/brief-gsoc-update-interactive-table-resizing-and-cell-selections/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Simple Backups with rsnapshot &#8212; 3 Step Guide</title>
		<link>http://estan.dose.se/2011/07/simple-backups-with-rsnapshot-3-step-guide</link>
		<comments>http://estan.dose.se/2011/07/simple-backups-with-rsnapshot-3-step-guide#comments</comments>
		<pubDate>Mon, 18 Jul 2011 11:22:13 +0000</pubDate>
		<dc:creator>estan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[planetkde]]></category>
		<category><![CDATA[rsnapshot]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=229</guid>
		<description><![CDATA[Introduction Since I recently set up a simple backup scheme for my laptop, workstation and server that I&#8217;m quite happy with, I thought I should share. The thing about backups is that everyone talks about how one should have them, &#8230; <a href="http://estan.dose.se/2011/07/simple-backups-with-rsnapshot-3-step-guide">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>Since I recently set up a simple backup scheme for my laptop, workstation and server that I&#8217;m quite happy with, I thought I should share. The thing about backups is that everyone talks about how one should have them, but who really has an adequate backup scheme?</p>
<p>My laptop and workstation runs Arch Linux. The server is an old FreeBSD 7.0 install. I know the FreeBSD version is ancient, but the installed ports are kept up to date, and the machine has been running fine for years. It hosts this blog, along with the blogs and websites of some friends, a DNS server and a private SILC server me and some friends use for chatting.</p>
<p>So in short, here&#8217;s what I did for backups on the server. For the laptop and workstation, the instructions are pretty much identical, except you can leave out the parts about MySQL backups.</p>
<h2>Step 1 &mdash; Install <code>rsnapshot</code></h2>
<p><code>portinstall rsnapshot</code> (<code>pacman -S rsnapshot</code> on Arch)</p>
<h2>Step 2 &mdash; Configure <code>rsnapshot</code></h2>
<p>I use the following configuration to tell <code>rsnapshot</code> to keep seven days of daily backups along with one montly backup in <code>/usr/.rsnapshot</code>.</p>
<pre>
config_version  1.2
snapshot_root   /usr/.snapshots/
cmd_rm          /bin/rm
cmd_rsync       /usr/local/bin/rsync
cmd_logger      /usr/bin/logger

cmd_postexec    /usr/local/bin/backup-strongspace.sh

interval        daily   7
interval        monthly 1

verbose         2
loglevel        3
logfile /var/log/rsnapshot
lockfile        /var/run/rsnapshot.pid

rsync_long_args --delete --numeric-ids --relative --delete-excluded --filter="dir-merge,n- .backup-exclude"
link_dest       1

backup  /usr/home/              localhost/
backup  /etc/           localhost/
backup  /var/named/     localhost/
backup  /var/www/       localhost/
backup  /usr/local/etc/ localhost/
backup_script   /usr/local/bin/backup-mysql.sh  localhost/mysql/
</pre>
<p>The <code>interval</code> directives tell <code>rsnapshot</code> how many backups to keep. E.g. with the above configuration, if I execute <code>rsnapshot daily</code> ten times, the last seven of the backups will be kept. <code>rsnapshot</code> uses hard linking to save space, so the disk usage won&#8217;t be horrible.</p>
<p>By using the <code>cmd_postexec</code> directive, I give the path to a script to execute after each backup run. In my <code>backup-strongspace.sh</code> script I have:</p>
<pre>
#!/bin/sh

/usr/local/bin/rsync -az --delete --delete-excluded /usr/.snapshots/daily.0 estan@estan.strongspace.com:/strongspace/estan/dose
</pre>
<p>This will sync the latest backup to my Strongspace account (40 GB Starter account, $4.99/month).</p>
<p>The <code>--filter="dir-merge,n- .backup-exclude"</code> is obscure <code>rsync</code> syntax and means that I can put stuff to be excluded from backup in directory specific <code>.backup-exclude</code> files.</p>
<p>Next comes the <code>backup</code> directives, these simply specify the directories that should be backed up.</p>
<p>Using the <code>backup-script</code> directive, I specify the path to script to be run in an empty temporary directory before that directory is backed up. The <code>backup-mysql.sh</code> script I&#8217;ve specified contains the following:</p>
<pre>
#!/bin/sh

/usr/local/bin/mysqldump -u root -pmypassword --all-databases | gzip > all-databases.sql.gz
</pre>
<p>This will simply make a gzipped dump of all MySQL databases on the machine, which will then be backed up by <code>rsnapshot</code>.</p>
<p>An important <em>note for Linux users</em> is that you probably want to specify <code>cmd_cp /bin/cp</code>, as <code>rsnapshot</code> can take advantage of some features of GNU cp.</p>
<h2>Step 3 &mdash; Configure <code>cron</code> job</h2>
<p>I created two scripts that are run from cron as part of FreeBSD&#8217;s regular periodic maintenance scripts:</p>
<p><code>/etc/periodic/daily/001.backup</code>:</p>
<pre>
#!/bin/sh

/usr/local/bin/rsnapshot daily > /tmp/rsnapshot.out 2>&#038;1 || cat /tmp/rsnapshot.out | mail -s "daily backups failed on `hostname`" my@email.com
</pre>
<p>and</p>
<p><code>/etc/periodic/montly/001.backup:</code></p>
<pre>
#!/bin/sh

/usr/local/bin/rsnapshot monthly > /tmp/rsnapshot.out 2>&#038;1 || cat /tmp/rsnapshot.out | mail -s "monthly backups failed on `hostname`" my@email.com
</pre>
<p>This means I&#8217;ll get an e-mail if the backups fail for some reason, and can then inspect the <code>rsnapshot</code> log in <code>/var/log/rsnapshot</code>. On the FreeBSD server I already had an e-mail server configured, but on my laptop and workstation I set up <a href="https://wiki.archlinux.org/index.php/Msmtp">msmtp</a> instead, which is a simple SMTP mailer, and the configuration of the cron jobs is a bit different from FreeBSD.</p>
<h2>Result</h2>
<p>If I ever mess something up, I&#8217;ll have backups from the past seven days to restore from, or from the last monthly backup. And if the HDD crashes, I&#8217;ll always have a copy of the latest stuff on my Strongspace account. I&#8217;m very happy and it feels good to finally have backups.</p>
<p>Feel free to share your own backup strategy in the comments.</p>
<p>Cheers,<br />
Elvis</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2011/07/simple-backups-with-rsnapshot-3-step-guide/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A Story with a Happy Ending</title>
		<link>http://estan.dose.se/2011/07/a-story-with-a-happy-ending</link>
		<comments>http://estan.dose.se/2011/07/a-story-with-a-happy-ending#comments</comments>
		<pubDate>Fri, 08 Jul 2011 13:18:44 +0000</pubDate>
		<dc:creator>estan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[planetkde]]></category>
		<category><![CDATA[scribus]]></category>
		<category><![CDATA[tables]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=204</guid>
		<description><![CDATA[Hi again, Just a quick follow-up post to give a happy end to my previous woes. Without further ado, I give you Scribus rendering all 43 cases of border joins mentioned in the previous post (I had forgot two of &#8230; <a href="http://estan.dose.se/2011/07/a-story-with-a-happy-ending">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi again,</p>
<p>Just a quick follow-up post to give a happy end to my <a href="http://estan.dose.se/2011/07/bordering-on-the-insane-a-story-of-a-near-collapse">previous woes</a>. Without further ado, I give you Scribus rendering all 43 cases of border joins mentioned in the previous post (I had forgot two of them before):</p>
<p><a href="http://estan.dose.se/wp-content/uploads/2011/07/43_cases.png"><img src="http://estan.dose.se/wp-content/uploads/2011/07/43_cases-331x300.png" alt="The 43 Cases of Border Joins in Scribus" title="The 43 Cases of Border Joins in Scribus" width="331" height="300" class="aligncenter size-medium wp-image-217" /></a></p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2011/07/a-story-with-a-happy-ending/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Bordering on the Insane &#8212; A Story of a Near Collapse</title>
		<link>http://estan.dose.se/2011/07/bordering-on-the-insane-a-story-of-a-near-collapse</link>
		<comments>http://estan.dose.se/2011/07/bordering-on-the-insane-a-story-of-a-near-collapse#comments</comments>
		<pubDate>Tue, 05 Jul 2011 13:58:04 +0000</pubDate>
		<dc:creator>estan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[planetkde]]></category>
		<category><![CDATA[scribus]]></category>
		<category><![CDATA[tables]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=193</guid>
		<description><![CDATA[You&#8217;ll have to excuse the witty title, but I&#8217;ve been working on table borders. Specifically collapsed multi-line borders, properly joined at intersections. It is hard work I tell you. No, really, it&#8217;s downright ridiculous. Some Background Since a table cell &#8230; <a href="http://estan.dose.se/2011/07/bordering-on-the-insane-a-story-of-a-near-collapse">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ll have to excuse the witty title, but I&#8217;ve been working on table borders. Specifically collapsed multi-line borders, properly joined at intersections. It is hard work I tell you. No, really, it&#8217;s downright ridiculous.</p>
<h2>Some Background</h2>
<p>Since a table cell may span multiple rows or columns, along each side of the cell, it may share its border on that side with N neighboring cells, or with the table border. Along each such shared border segment, the neighboring border along that segment must be identified and collapsed with the cell border according to certain rules. The most commonly used rules are those specified in the CSS collapsing border model, sometimes with slight modifications. This is also what I&#8217;m aiming for in my implementation.</p>
<p>Lines in Scribus can traditionally be represented by an arbitrary number of lines, each with its own color, width and style, drawn on top of each other, thin over thick. Like this:</p>
<div id="attachment_194" class="wp-caption aligncenter" style="width: 496px"><img src="http://estan.dose.se/wp-content/uploads/2011/07/scribus_multi_line.png" alt="A multi-line in Scribus" title="A multi-line in Scribus" width="486" height="118" class="size-full wp-image-194" /><p class="wp-caption-text">A multi-line in Scribus</p></div>
<p>In trying to keep in style, I&#8217;d of course like to support these types of lines in my implementation of table borders. This is also supported by competing products such as InDesign.</p>
<p>Borders from different cells, or from the table itself, meeting at an intersection in the table should optionally be joined. Joining is the process of adjusting the start and end points of the border, as well as adjusting the start and end points of the individual lines constituting the border, in order to make a &#8220;best effort&#8221; join with any other borders meeting at the intersection.</p>
<p>This is where the fun begins. I&#8217;ve identified at least these 41 possible cases of joins:</p>
<div id="attachment_195" class="wp-caption aligncenter" style="width: 510px"><a href="http://estan.dose.se/wp-content/uploads/2011/07/table_border_join_cases.png"><img src="http://estan.dose.se/wp-content/uploads/2011/07/table_border_join_cases.png" alt="Table Border Join Cases" title="Table Border Join Cases" width="500" height="3127" class="size-full wp-image-195" /></a><p class="wp-caption-text">Table Border Join Cases</p></div>
<h2>The Past ~Two Weeks</h2>
<p>In the past two weeks most of my work has been trying to find a joining/painting algorithm that correctly identifies all the cases above and performs the necessary adjustments.</p>
<p>To paint an entire table, the painting algorithm must iterate over all cell edges in the table, and for each edge, iterate over all shared border segments. For each segment, the segment is collapsed with the correct neighboring border. Next, each of the, possibly six, other border segments meeting the segment at its start and end point must also be identified. This means identifying all the cells surrounding the segment and collapsing the appropriate shared border segments between them.</p>
<p>Let&#8217;s take a simple case as an example. In the example below we want to paint the top border of the green-tinted cell, which spans two columns. The thin red dotted line represents the underlying table grid.</p>
<div id="attachment_196" class="wp-caption aligncenter" style="width: 510px"><img src="http://estan.dose.se/wp-content/uploads/2011/07/painting_a_top_border.png" alt="Painting a Top Border" title="Painting a Top Border" width="500" height="652" class="size-full wp-image-196" /><p class="wp-caption-text">Painting a Top Border</p></div>
<p>In the first iteration above, in addition to collapsing the shared border segment between the cell itself and  the cell above it, the five border segments coming in to meet it at the two intersections must be identified and collapsed correctly. After that, adjustments for joining can be made to the segment start and end, before the segment is finally painted.</p>
<p>Similarly, in the second iteration, there are four additional collapses that needs to be done before joining adjustments and finally painting can be done.</p>
<p>Needless to say, it&#8217;s been quite a chore trying to get this to work. Especially the joining algorithm has been a tough nut to crack. I&#8217;ve used up numerous sketch pads trying to figure it out. When working on something like this, pen and paper is invaluable. But, although there are some cases it can&#8217;t quite handle in a pleasing way, I think I finally have an approach that will work. I&#8217;ve intentionally made the code for collapsing and joining strictly separated from the rest of the code, to ease unit testing.</p>
<p>To not get too complicated the algorithm I&#8217;ve settled on imposes a strict painting order &#8212; horizontal borders must be painted on top of vertical ones. This means two iteration across the table. Iteration is quite fast though, and besides, I&#8217;d rather spend my time optimizing cell accesses on the table than convoluting the joining algorithm with added complexity.</p>
<p>So without further ado, here&#8217;s a screenshot of some collapsed joined and non-joined borders on a table in Scribus:</p>
<div id="attachment_198" class="wp-caption aligncenter" style="width: 310px"><a href="http://estan.dose.se/wp-content/uploads/2011/07/scribus_table_joins.png"><img src="http://estan.dose.se/wp-content/uploads/2011/07/scribus_table_joins-300x205.png" alt="Joined Borders in Scribus" title="Joined Borders in Scribus" width="300" height="205" class="size-medium wp-image-198" /></a><p class="wp-caption-text">Joined Borders in Scribus</p></div>
<p>Although there are some bugs in there, I have other fish to fry at the moment, so I&#8217;m going to leave painting for a while. And if there&#8217;s anyone out there who, after looking at that picture with the 41 join cases I&#8217;ve identified, get a brilliant idea for an algorithm that covers them all with a minimal amount of code, then contact me! Please!</p>
<p>That&#8217;s all for now. Bye &#8217;til next time!</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2011/07/bordering-on-the-insane-a-story-of-a-near-collapse/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Scribus Tables GSoC &#8212; First Steps</title>
		<link>http://estan.dose.se/2011/06/scribus-tables-gsoc-first-steps</link>
		<comments>http://estan.dose.se/2011/06/scribus-tables-gsoc-first-steps#comments</comments>
		<pubDate>Tue, 07 Jun 2011 10:07:24 +0000</pubDate>
		<dc:creator>estan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[planetkde]]></category>
		<category><![CDATA[scribus]]></category>
		<category><![CDATA[tables]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=180</guid>
		<description><![CDATA[Hi all, This is the first in a series of blog posts detailing my work with bringing proper support for tables to Scribus as part of Summer of Code 2011. I&#8217;ll try to keep the posts in roughly the same &#8230; <a href="http://estan.dose.se/2011/06/scribus-tables-gsoc-first-steps">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi all,<br />
This is the first in a series of blog posts detailing my work with bringing proper support for tables to Scribus as part of Summer of Code 2011. I&#8217;ll try to keep the posts in roughly the same format as the reports I&#8217;m sending off to my mentor Craig each week. This will make it easier for me to reuse some of the material, saving hacking time :) Each post will be divided into the following sections:</p>
<ul>
<li><b>Work Report</b>, a report on what I&#8217;ve been up to since my last report.</li>
<li><b>Project Status</b>, how I&#8217;m standing with regard to the schedule in my <a href="http://wiki.scribus.net/canvas/GSoC_2011_Tables_Proposal">project proposal</a>.</li>
<li><b>Upcoming Work</b>, a rough outline of my next steps.</li>
</ul>
<p>As this is the very first blog post about my project, I&#8217;ll start with a little introduction with general information about my project.</p>
<h2>Introduction</h2>
<p>Tables provide a compact way of representing tabular information in a page layout, and is a common design element in books, magazines and advertisements. Scribus currently has a shortcut for creating an automatically grouped table-like array of text frames. These are not proper tables. To stay competitive, Scribus needs better support for tables. Support that enables the user to create and edit tables as distinct items with their own set of properties as commonly found in other table implementations. This is the rationale for my Summer of Code project, in which I&#8217;ll add a new table page item to Scribus.</p>
<div id="attachment_182" class="wp-caption aligncenter" style="width: 279px"><a href="http://estan.dose.se/wp-content/uploads/2011/06/scribus_tables_first_glimpse.png"><img src="http://estan.dose.se/wp-content/uploads/2011/06/scribus_tables_first_glimpse-269x300.png" alt="First glimpse of new tables" title="First glimpse of new tables" width="269" height="300" class="size-medium wp-image-182" /></a><p class="wp-caption-text">First glimpse of new tables</p></div>
<p>The user should be able to perform common table operations such as inserting rows and columns, merging and splitting cells, formatting borders and backgrounds as well as editing the text of the table. The table will represent the text of the cells using standard Scribus text frames.</p>
<p>More information can be found in my <a href="http://wiki.scribus.net/canvas/GSoC_2011_Tables_Proposal">project proposal</a>.</p>
<p>So without further ado, here follows my first report.</p>
<h2>Work Report</h2>
<ul>
<li><b>Bootstrapping</b>: Drafted an initial <a href="http://wiki.scribus.net/canvas/GSoC_2011_Tables_Design">design document</a> including some mockups on the Scribus wiki and <a href="http://lists.scribus.net/pipermail/scribus-dev/2011-May/000917.html">discussed</a> the ideas in detail on the scribus-dev mailing list. Also set up a development environment (using Qt Creator this time even though I&#8217;m a die-hard Vim junkie).</li>
<li><b>Added</b> a skeleton of a <b>table style</b>. This was way back in April, just to see what work is involved in creating a new type of style. The style is the most basic one imaginable. At the moment I think it has a single property for background color. Instances of the new table style can be managed in the Style Manager. It doesn&#8217;t do style inheritance yet, though that should be relatively easy to fix.</li>
<li><b>Added</b> class <code>PageItem_Table</code>, a new page item for tables. The class represents a grid of table cells by keeping a few lists with row / column geometries.</li>
<li><b>Added</b> ability to insert a new <code>PageItem_Table</code> from <b>toolbar</b> or <b>Insert</b> menu followed by mouse dragging. Just like the current &#8220;tables&#8221;.</li>
<li><b>Added API</b> to <code>PageItem_Table</code> for the basic table operations
<ul>
<li>insert and remove rows and columns,</li>
<li>resize rows and column.</li>
</ul>
</li>
<li><b>Added</b> support for <b>merging cells</b> to <code>PageItem_Table</code> as well as an accompanying helper class <code>CellArea</code> used when keeping track of areas of merged cells. The <code>CellArea</code> class also comes with what I think is the very first unit tests in Scribus. The tests are in <code>tests/</code> and can be runned using <code>make test</code>.</li>
<li><b>Added</b> some rudimentary <b>painting</b> to <code>PageItem_Table</code>, just to be able to see the cells. Still a long way to go for proper table / cell painting, which is kind of non-trivial.</li>
<li>As <b>scriptability</b> allows me to experiment with tables before any UI is done, I&#8217;ve added the following new scripting methods. These have been added to the old scripter, but should be easy enough to port to ScripterNG later on.
<ul>
<li><code>createTable(x, y, width, height, numRows, numColumns, ["name"])</code></li>
<li><code>getTableRows(["name"])</code></li>
<li><code>getTableColumns(["name"])</code></li>
<li><code>insertTableRows(index, numRows, ["name"])</code></li>
<li><code>removeTableRows(index, numRows, ["name"])</code></li>
<li><code>getTableRowHeight(row, ["name"])</code></li>
<li><code>setTableRowHeight(row, height, ["name"])</code></li>
<li><code>insertTableColumns(index, numColumns, ["name"])</code></li>
<li><code>removeTableColumns(index, numColumns, ["name"])</code></li>
<li><code>getTableColumnWidth(column, ["name"])</code></li>
<li><code>setTableColumnWidth(column, width, ["name"])</code></li>
<li><code>mergeTableCells(row, column, numRows, numColumns, ["name"])</code></li>
</ul>
</li>
</ul>
<h2>Project Status</h2>
<p>The goal in the schedule for this first week was simply <em>Data structures for tables</em>. Intentionally a quite moderate goal, as I didn&#8217;t know how long it would take to get up to speed. So unsurprisingly, I think I&#8217;m a little ahead of schedule. Worth noting though is that the tables are currently only skeletal in their nature; they hold no content and are simply a grid of empty cells. This is all according to plan though, and integration with text frames is scheduled for later.</p>
<h2>Upcoming Work</h2>
<p>The goals for next week according to the schedule is</p>
<ul>
<li>Basic table layout with fixed column widths and mock content in cells.</li>
<li>Insertion/removal of rows/columns.</li>
<li>Basic drawing of table.</li>
</ul>
<p>but as at least some of this has already been done, I think I&#8217;ll start looking at other things as well. Right now I&#8217;m looking at proper table / cell border painting, as well as fixing a couple of bugs in the code I have so far.</p>
<p>I have an installation of Adobe InDesign CS5.5 running in VirtualBox and I&#8217;ve been looking at what border model they&#8217;re using and how they&#8217;re doing border conflict resolution. It seems to be a variant of the CSS2 collapsing border model, which is probably what I&#8217;ll try to go for initially in Scribus as well.</p>
<p>That&#8217;s all for now folks! I&#8217;ll conclude with a little screencast showing me playing around with a table using the new scripting methods. I highly recommend you download the <a href="http://blip.tv/file/get/Estan-FirstGlimpseOfNewTables863.ogv">source OGV</a> instead of watching it here, as the quality turned out quite bad in the blip.tv conversion.</p>
<div style="text-align: center;">
<embed src="http://blip.tv/play/AYLAtUMA" type="application/x-shockwave-flash" width="320" height="270" wmode="transparent" allowscriptaccess="always" allowfullscreen="true" ></embed></div>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2011/06/scribus-tables-gsoc-first-steps/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://blip.tv/file/get/Estan-FirstGlimpseOfNewTables863.ogv" length="16205501" type="video/ogg" />
		</item>
		<item>
		<title>So it seems my&#8230;</title>
		<link>http://estan.dose.se/2011/04/so-it-seems-my</link>
		<comments>http://estan.dose.se/2011/04/so-it-seems-my#comments</comments>
		<pubDate>Mon, 25 Apr 2011 20:00:12 +0000</pubDate>
		<dc:creator>estan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[planetkde]]></category>
		<category><![CDATA[scribus]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=178</guid>
		<description><![CDATA[&#8230;summer of 2011 will come in a distinct 2009 flavor. Can&#8217;t wait to get started ;) I&#8217;ll probably blog my progress here. What do you guys think; OK for me to have it aggregated on p.k.o? Scribus KDE-ish enough for &#8230; <a href="http://estan.dose.se/2011/04/so-it-seems-my">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8230;<a href="http://wiki.scribus.net/canvas/Blog:Scribus_Times_and_Gazette/Scribus_Team's_Google_Summer_of_Code_2011_Students_and_Projects_announced">summer of 2011</a> will come in a distinct <a href="http://techbase.kde.org/Projects/Summer_of_Code/2009/Projects/Basic_tables_support_for_KWord">2009 flavor</a>. Can&#8217;t wait to get started ;)</p>
<p>
I&#8217;ll probably blog my progress here. What do you guys think; OK for me to have it aggregated on p.k.o? Scribus KDE-ish enough for you?
</p>
<p>
<em><br />
PS. For those of you who didn&#8217;t understand or can&#8217;t be bothered to click the links; I&#8217;ve been accepted into GSoC this year to improve the tables support of Scribus. You might remember me doing the same for KWord as part of GSoC back in 2009. DS.<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2011/04/so-it-seems-my/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Call for Help &#8212; Styles Widget for Calligra Words</title>
		<link>http://estan.dose.se/2011/01/call-for-help-styles-widget-for-calligra-words</link>
		<comments>http://estan.dose.se/2011/01/call-for-help-styles-widget-for-calligra-words#comments</comments>
		<pubDate>Thu, 13 Jan 2011 12:39:30 +0000</pubDate>
		<dc:creator>estan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[calligra]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[planetkde]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=165</guid>
		<description><![CDATA[Background Some of us in the Calligra team recently got together and held an IRC meeting to discuss a redesign of the text styles dock widget in Calligra Words. The meeting was attended by both coders and usability people. A &#8230; <a href="http://estan.dose.se/2011/01/call-for-help-styles-widget-for-calligra-words">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://estan.dose.se/wp-content/uploads/2011/01/recruiting.png" alt="" title="We want YOU to write our styles widget" width="400" height="408" class="aligncenter size-full wp-image-175" /></p>
<h2>Background</h2>
<p>Some of us in the Calligra team recently got together and held an IRC meeting to discuss a redesign of the text styles dock widget in Calligra Words. The meeting was attended by both coders and usability people. A full summary of the meeting is available on the <a href="http://community.kde.org/Calligra/End_2010_Text_Styles_UI_IRC_Meeting">wiki</a>, but some of the conclusions were:</p>
<ol>
<li><b>We need two dock widgets:</b> one compact for people who value screen real-estate and one big dock widget for the styles junkies out there who always wants to have the list of text styles available on-screen.</li>
<li>Applying styles should be a <b>one-click operation.</b></li>
<li>As the styles dock widgets are mostly used to apply styles, styles should be presented in the dock widgets <b>as a simple list, not as a tree</b> showing the inheritance between styles.</li>
<li>Previewing of styles should as much as possible be done in-list. That is, items in the styles lists are <b>previews of themselves</b>.
</ol>
<p>Apart from that, most of what was decided at the meeting were details regarding the implementation.</p>
<p>Below are some preliminary mock-ups of how we envision the new styles widget to be used in the two dock widgets. Note that the same styles widget will be used in both these dock widgets, so the two dockers will probably share 99% of their code.</p>
<div id="attachment_170" class="wp-caption aligncenter" style="width: 310px"><a href="http://estan.dose.se/wp-content/uploads/2010/12/compact-docker.png"><img src="http://estan.dose.se/wp-content/uploads/2010/12/compact-docker-300x298.png" alt="Compact Dock Widget Mock-up. Click to enlarge." title="Compact Dock Widget Mock-up" width="300" height="298" class="size-medium wp-image-170" /></a><p class="wp-caption-text">Compact Docker Mock-up. Click to enlarge.</p></div>
<div id="attachment_171" class="wp-caption aligncenter" style="width: 163px"><a href="http://estan.dose.se/wp-content/uploads/2010/12/big-docker.png"><img src="http://estan.dose.se/wp-content/uploads/2010/12/big-docker-153x300.png" alt="Big Dock Widget Mock-up. Click to enlarge." title="Big Dock Widget Mock-up" width="153" height="300" class="size-medium wp-image-171" /></a><p class="wp-caption-text">Big Dock Widget Mock-up. Click to enlarge.</p></div>
<h2>Call for Help!</h2>
<p>Some preliminary coding of the styles widget to be used in the two new dockers has been started by Casper, but now we&#8217;re looking for someone to finish the work. The task involves implementing the actual list view used in these two new dock widgets. If you feel that you</p>
<ul>
<li>want to help out with making Calligra Words a lot more usable</li>
<li>have some experience with the Qt model/view framework</li>
<li>want to work with a motivated and friendly team of developers</li>
<li>like to have your work shine at a very prominent place in Calligra Words</li>
</ul>
<p>then <b>you&#8217;re</b> the one we&#8217;re looking for! If you&#8217;re interested in helping out, you&#8217;re welcome to contact us in the Calligra Team either in <b>#calligra</b> on <b>irc.freenode.net</b> or on our <a href="https://mail.kde.org/mailman/listinfo/calligra-devel">mailing list</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2011/01/call-for-help-styles-widget-for-calligra-words/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spotify Links in Chrome on Linux/KDE</title>
		<link>http://estan.dose.se/2009/10/spotify-links-in-chrome-on-linuxkde</link>
		<comments>http://estan.dose.se/2009/10/spotify-links-in-chrome-on-linuxkde#comments</comments>
		<pubDate>Sat, 10 Oct 2009 16:17:48 +0000</pubDate>
		<dc:creator>estan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[planetkde]]></category>
		<category><![CDATA[spotify]]></category>
		<category><![CDATA[xdg-open]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=163</guid>
		<description><![CDATA[Short tip on how to get this to work: Create a script /path/to/spotify_open.sh with the following in it: #!/bin/bash wine "$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe" /uri "$1" Create $HOME/.kde4/share/kde4/services/spotify.protocol with the following in it: [Protocol] exec=/path/to/spotify_open.sh "%u" protocol=spotify input=none output=none helper=true listing=false reading=false &#8230; <a href="http://estan.dose.se/2009/10/spotify-links-in-chrome-on-linuxkde">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Short tip on how to get this to work:</p>
<p>Create a script /path/to/spotify_open.sh with the following in it:</p>
<pre>
#!/bin/bash
wine "$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe" /uri "$1"
</pre>
<p>Create $HOME/.kde4/share/kde4/services/spotify.protocol with the following in it:</p>
<pre>
[Protocol]
exec=/path/to/spotify_open.sh "%u"
protocol=spotify
input=none
output=none
helper=true
listing=false
reading=false
writing=false
makedir=false
deleting=false
</pre>
<p>That&#8217;s it, spotify:blah style URLs will now open in Spotify launched through Wine. Chrome just uses xdg-open for launching external apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2009/10/spotify-links-in-chrome-on-linuxkde/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HDD fail :/</title>
		<link>http://estan.dose.se/2009/08/hdd-fail</link>
		<comments>http://estan.dose.se/2009/08/hdd-fail#comments</comments>
		<pubDate>Mon, 10 Aug 2009 22:21:00 +0000</pubDate>
		<dc:creator>estan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[planetkde]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=160</guid>
		<description><![CDATA[*From the annoying-like-h**ll department* After a nice weekend at my parents and hanging out with some old friends, one of which recently came back from a stay in Kunshan, China, I was greeted this morning when coming back home by &#8230; <a href="http://estan.dose.se/2009/08/hdd-fail">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>*From the annoying-like-h**ll department*</p>
<p>After a nice weekend at my parents and hanging out with some old friends, one of which recently came back from a stay in Kunshan, China, I was greeted this morning when coming back home by a crashed hard drive on my laptop :/</p>
<p>It started out with things beginning to act irregular, and then after a reboot I was told the computer had been uncleanly shut down and was dropped into an fsck run that failed in flames with I/O errors and whatnot. I ran a manual fsck and actually got it to a state where I could boot it again, the kernel kept spewing I/O error messages and failing ioctl commands though. I managed to get some of the more important files off the drive and onto my USB stick. They were actually surprisingly few compared to last time I had a hard drive crash, which is a small consolation.</p>
<p>Having been through several hard drive crashes in the past, what pisses me off most about this one is not the loss of data but the fact that it&#8217;s just a 1 year old drive that is now failing, which I really think is crappy. But more importantly the annoyance of loosing time having to go hunt for a new drive and set up the system again; I really don&#8217;t have time for this right now. What&#8217;s also annoying is that for many many years I always had at least two computers at home, but since just a few months ago, the laptop has been all I have. And of course the Kubuntu CD I had laying around was scratched so I had to go to a friend to burn a new one.</p>
<p>Anyway, the machine is back to normal now and sounding like a cat from the make -j4 getting a dev env up again. Lessons learned; as always, keep a backup; make sure you have a working installation media for your OS of choice around, and consider having at least two computers in your home.</p>
<p>At the store, getting the replacement drive, I didn&#8217;t really care that much what I was getting and just picked something. On the way back I realize that it&#8217;s a 320 GB Wester Digital&#8230; I think it might actually be the exact same model that I had.. Stupid? ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2009/08/hdd-fail/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

