<?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>QKSite</title>
	<atom:link href="http://qksite.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://qksite.com</link>
	<description>Automate the manual web tasks</description>
	<lastBuildDate>Sat, 25 Sep 2010 15:59:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Interesting alternatives in Scripting Technology &#8211; An Update on QKSite</title>
		<link>http://qksite.com/interesting-alternatives-in-scripting-technology-an-update-on-qksite/</link>
		<comments>http://qksite.com/interesting-alternatives-in-scripting-technology-an-update-on-qksite/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 15:59:33 +0000</pubDate>
		<dc:creator>QKDev</dc:creator>
				<category><![CDATA[Site News]]></category>

		<guid isPermaLink="false">http://qksite.com/?p=14</guid>
		<description><![CDATA[I thought I would post up a progress report should anyone pass by and give a few details of what the alternatives are for QKSite at the moment. Which Scripting Technology? Absolute Uniqueness Algorithms and The Eventual Purpose of QKSite <a href="http://qksite.com/interesting-alternatives-in-scripting-technology-an-update-on-qksite/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I thought I would post up a progress report should anyone pass by and give a few details of what the alternatives are for QKSite at the moment.</p>
<p><span id="more-14"></span><strong>Which Scripting Technology?</strong></p>
<p>This has been my biggest headache and the tempation to just pull in the old VBScript modules have been very tempting. The main reason for this is that it is the simplest form of scripting that I can see without going into the world of 3D/2D visual representations &#8211; and I am really tempted I can tell you. A lot of the old ideas have been haunting me and if I had more time I definitely would have dived in &#8211; the idea of having a scripting process so simple to use that a child could do it has always had an appeal to me and I certainly would love to spend the time  seeing what others may have done in this area.</p>
<p>Well the alternatives seem to favour going for JavaScript, mainly because of the strong and tremendous work that has gone in behind GreaseMonkey and Userscripts.org. Add to that that JavaScript tends to be favoured by Google Scripts too. The down side of course maintaining simplicity.</p>
<p>For a while I thought maybe PHP may be a way to go allowing the crossover from scripts run locally and on the server.</p>
<p>The courts still out and I am jumping back occasionally to research it further. If it takes too long I might as well include all of them, but the down side will be the confusion it might cause and maintaining the application. I need some expert opinions in this I think&#8230; The worst thing for time and effort is to change it during development, but it may need to happen because really I want this application back up and working for me as soon as possible.</p>
<p><strong>Absolute Uniqueness Algorithms</strong></p>
<p>This has been an area where I have deliberately spent extra time. I figured that the output from the spinning functions need to be as unique as possible including the ability to create, recreate, stop and start the process anywhere. So I have come up with a few algorithms for maximising uniqueness. The only problem I have at the moment is deciding on how to measure it &#8211; there are so many applications out there that widely differ in this and I want the best definition of it that I can find.</p>
<p>Also I have pushed to be as modular as possible with any functions here. To be able to spin text or any document possible to files, zips or clipboard (almost mentioned DDE &#8211; that&#8217;s a sign of age) is part of the idea and I must leave the hooks there to be able to plugin any inputs and outputs that I can think of. I want to leave it completely open and available for anyone to add modules whenever needed. I have even looked at some of the video creation ideas that exist out there &#8211; so keeping each function in its own domain is a must.</p>
<p>Long term too I want to create assembly for the main routines, although at the moment I have succumbed to the ease of .NET handling I still have proper flowcharts in my mind as to what is going on and its got to be as fast as possible using the least resources. At the moment resources get used with no regard so the first versions of this will just focus on function not efficiency.</p>
<p><strong>The Eventual Purpose of QKSite</strong></p>
<p>Need to remind myself that the spinning that exists there has to migrate into a plugin of QKSite. It is not of itself meant to be a article spinning application, this was done just so I could use it soon myself. The spinning functionality will disappear into a module or plugin of some kind, depending on the final architecture and be brought into any scripts or language only when it is required. The main purpose of QKSite is to manage it and allow automation to be created, shared, controlled, scheduled and visibly manipulated as kinds of projects. For me, for now I see it visually ending up as a kind of dashboard of all the things going on, with the most effective summary views of any activity being shown immediately and constantly. The ability to see what events are happening and to react to them immediately is important, then being able to either deal with them from the dashboard or drill down into the information, to manipulate or query it at any level right down to source.</p>
<p>In a specific visual idea of this, I want to see what is happening on all my sites, all my social and communication points at any time and just control it all from one place. Yes, sounds a bit like a horrendous task, but I am in no hurry at the moment. Other things like keeping the wolf from the door are enought to occupy me for the time being&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://qksite.com/interesting-alternatives-in-scripting-technology-an-update-on-qksite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Signatures are useful for spinning articles</title>
		<link>http://qksite.com/signatures-are-useful-for-spinning-articles/</link>
		<comments>http://qksite.com/signatures-are-useful-for-spinning-articles/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 14:44:50 +0000</pubDate>
		<dc:creator>QKDev</dc:creator>
				<category><![CDATA[Site News]]></category>

		<guid isPermaLink="false">http://qksite.com/?p=12</guid>
		<description><![CDATA[So let's think of an agreed signature for a document. The rule should be a template and a signature should be all that is needed to create the final document.  <a href="http://qksite.com/signatures-are-useful-for-spinning-articles/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Thinking of the different ways that spinning text may be used usefully and simply made me think of what was unique about an article. So keeping everything as simple as possible I came up with the idea of a signature, created each time a document is processed.</p>
<p>So let&#8217;s think of an agreed signature for a document. The rule should be a template and a signature should be all that is needed to create the final document. <span id="more-12"></span>So the simplest signature possible (for spinning only at the moment) should be a recording of which snippets were used to create the output. Snippets are the strings between the delimiters, the places in the document that would actually change.</p>
<p>So in the following example, if the template is</p>
<pre class="brush:plain">A {Day|Week} In {A|The} Life</pre>
<p>The only possible outputs would be</p>
<pre class="brush:plain">A Week In A Life
A Day In A Life
A Week In The Life
A Day In The Life</pre>
<p>So the simplest signature would be which options were chosen in both snippets that were spun. The signatures for the above lines would be</p>
<pre class="brush:plain">2,1
1,1
2,2
1,2</pre>
<p>respectively.</p>
<p>This is easily read and understood and allows a reader to work out what was used where so it looks like a good idea to stick to it and make it exactly that format for now. Maybe later for efficiency the bit arrays can be fully used but for now, to get this working, we&#8217;ll store them in that fashion.</p>
<p>Although the situation is more complex when you want a spin within a spin I found parsing a template into an array of snippets to be really helpful and dealt with it easily. Each time the delimiters are found they are add to an array of snippets. If the snippets themselves contain delimiters then more snippets will be created to deal with them.</p>
<p>So the following template will produce an array of three snippets</p>
<pre class="brush:plain">This product is {top|the {highest sales|best performing} widget} of its range</pre>
<pre class="brush:plain">0: This product is {1} of its range
1: top|the {2} widget
2: highest sales|best performing</pre>
<p>So the signature mask of this template will contain 2 numbers, for snippets 1 and 2. The first snippet did not have any split &#8216;|&#8217; delimiter so needn&#8217;t be recorded. Therefore the total number of signatures for this template is exactly the same as the earlier one, with only 4  possibilities.</p>
<p><strong>What are the advantages of these signatures?</strong></p>
<p>Well their neat fit with the template means that you could actually stored efficiently the documents that have been produced. More efficiently if bit array are used but that&#8217;s for later. So you would have a template and a list of signatures that define what documents have already been done, meaning you can continue in separate stages. You could for example generate a new unique document some time later, whenever you needed it, say for example submitting to directories over an extended period of time.</p>
<p>It means also that you do not need to produce everything at once and only create these documents when they are needed. Useful if you are using several different documents in one go to, without having to produce all the output in marathon sessions.</p>
<p>Another advantage comes back to ensuring uniqueness in the application, the signatures themselves can be the key to ensure that the application does not reproduce the same article again by just checking the existing signatures. I still need to work this out in a future post, but I have had a few ideas for that to keep it efficiently simple, as best I can.</p>
<p>The biggest advantage is that the signatures use less memory, they are smaller, and could possibly be kept in a spreadsheet or database to show which ones have been produced.</p>
<p>Another advantage is that the same output document can be produced again when needed. By applying the signature to the template, meaning that practically creating loads of output files is not really necessary and you can look back at earlier documents that you produced.</p>
<p><strong>What are the disadvantages?</strong></p>
<p>Well, I have been looking around to find the best technology for scripting and to put them into the article template. This is actually the most important feature personally that I am looking for to using, because although spinning give colour and uniqueness to the final document, if used correctly, the most power comes when the document is powered by the data you have collected.</p>
<p>So also it means that uniqueness in signature is of less importance, because the material then gets fed from data that is constantly changing. Also it will break the rule of  &#8220;a template and a signature should be all that is needed to create the final document&#8221; I stated in the beginning.</p>
<p>The thing that would need to be done is to add in the (smallest subset, decision point of, or smallest set of the decision funnel) data that would be needed to recreate the output article. There are more interesting ideas there but we&#8217;ll leave that to the back of my mind for the moment.</p>
<p>Actually the most troublesome bit at the moment is trying to decide on the technologies to use… Things are not as clear cut as they were a few years ago and I get this urge to bring back a 10 year technology VBScript, just because of its simplicity for any users…</p>
<p>Yet another post (or more) there, I am sure.</p>
<p>So Version 1.0.2 will have signatures, they will be a useful feature going forward.</p>
]]></content:encoded>
			<wfw:commentRss>http://qksite.com/signatures-are-useful-for-spinning-articles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Version 1 of QKSite</title>
		<link>http://qksite.com/version-1-of-qksite/</link>
		<comments>http://qksite.com/version-1-of-qksite/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 08:23:26 +0000</pubDate>
		<dc:creator>QKDev</dc:creator>
				<category><![CDATA[Site News]]></category>

		<guid isPermaLink="false">http://qksite.com/?p=9</guid>
		<description><![CDATA[Version 1 of QKSite released <a href="http://qksite.com/version-1-of-qksite/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Nothing special but something to play with. The first build of QKSite allows you to create spun articles. It needs more work in making sure the output is all unique however, that&#8217;ll be worked on next &#8211; see <a href="http://qksite.com/step-1-algorithms-for-spinning-text/">Step 1 algorithms for spinning text</a> for more info.</p>
<p>You can find it here &#8211; <a href="http:\\downloads.qksite.com\setup.exe">http:\\downloads.qksite.com\setup.exe</a></p>
]]></content:encoded>
			<wfw:commentRss>http://qksite.com/version-1-of-qksite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Step 1 algorithms for spinning text</title>
		<link>http://qksite.com/step-1-algorithms-for-spinning-text/</link>
		<comments>http://qksite.com/step-1-algorithms-for-spinning-text/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 15:59:38 +0000</pubDate>
		<dc:creator>QKDev</dc:creator>
				<category><![CDATA[Site News]]></category>

		<guid isPermaLink="false">http://qksite.com/?p=8</guid>
		<description><![CDATA[First attempt at writing a spinner application. <a href="http://qksite.com/step-1-algorithms-for-spinning-text/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well, I spent some time putting the algorithms together to see how they can be used. The actual application I will publish in the next post. There are a few shortcomings when it comes down to avoiding duplication which I admit I didn&#8217;t think of first but I will fix them quite soon.</p>
<p><span id="more-8"></span>Here is the first pass parsing code</p>
<pre class="brush:vb">    Private Sub ParseIt(ByRef strTemplate As String)
        Dim icur As Integer = 0
        ReDim arrStrings(0)
        ReDim arrBelong(0)
        arrStrings(0) = ""
        arrBelong(0) = 0

        ' First pass scan
        For x = 0 To Len(strTemplate) - 1
            Dim strChar As String = strTemplate.Chars(x)
            If strChar = "{" Then
                Dim iprev As Integer = icur
                icur = arrStrings.Length
                ReDim Preserve arrBelong(icur - 1)
                arrBelong(icur - 1) = iprev
                ReDim Preserve arrStrings(icur)
                arrStrings(iprev) += "{" + Str(icur) + "}"
                arrStrings(icur) = ""
            ElseIf strChar = "}" Then
                icur = arrBelong(icur - 1)
            Else
                arrStrings(icur) += strChar
            End If
        Next

        ' Clean up the white stuff
        For x = 0 To arrStrings.Length - 1
            arrStrings(x) = arrStrings(x).Trim
        Next
    End Sub</pre>
<p>Which is done once at the beginning and pulls out the strings that need to be processed on in a template. Although a little tricky keeping track in the arrays is pretty much straightforward.</p>
<p>The spinning however became a little more complex and I kept it reasoably simple to test it out.</p>
<pre class="brush:vb">    Private Function SpinIt(ByVal strPart As String) As String
        Dim strParts() As String = strPart.Split("|")
        Dim random As New Random()
        Dim strResult As String

        If strParts.Length &gt; 1 Then
            ' Choose which bit randomly
            strResult = strParts(random.Next(strParts.Length)).Trim
        Else
            strResult = strPart
        End If

        ' Now process descendants

        While strResult.IndexOf("{") &gt; 0
            Dim iStart As Integer = strResult.IndexOf("{")
            Dim iEnd As Integer = strResult.IndexOf("}")
            Dim iLoc As Integer = Val(strResult.Substring(iStart + 1, iEnd - iStart - 1))
            strResult = strResult.Substring(0, iStart) + SpinIt(arrStrings(iLoc)) + strResult.Substring(iEnd + 1)
        End While

        Return strResult
    End Function</pre>
<p>The fault with this at the moment is in the randomness, admittedly I didn&#8217;t put any effort in there, but it does need to be fixed so that two outputs will never be the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://qksite.com/step-1-algorithms-for-spinning-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Algorithms for spinning</title>
		<link>http://qksite.com/algorithms-for-spinning/</link>
		<comments>http://qksite.com/algorithms-for-spinning/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 15:47:28 +0000</pubDate>
		<dc:creator>QKDev</dc:creator>
				<category><![CDATA[Site News]]></category>

		<guid isPermaLink="false">http://qksite.com/?p=7</guid>
		<description><![CDATA[Thinking about what algorithms can be used not just for spinning text but other template processing as well. <a href="http://qksite.com/algorithms-for-spinning/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Right another set of requirements now that the structure of the template is settled upon. How to do it algorithmically.</p>
<p>What do we need?<span id="more-7"></span></p>
<p>Speed &#8211; we want it to be as efficient as possible at the quickest speed possible.</p>
<p>Size &#8211; we want to handle templates that may be extremely large, I am thinking ebooks or other media later.</p>
<p>Flexibility &#8211; we want to be able to ensure that all inter-related functions within a template are dealt with. This means they should always all get resolved fully but only when they are likely to be needed. If a function makes a call to a data warehouse or database then it should only happen if that part of the template will actually get spun. Otherwise you will get unnecessary calls.</p>
<p>Simple passing through the template and resolving each of the delimiters is the very simplest method, but with spins within spins we need either multiple passes or recurse. My first impression was to go the easiest route and even though it would be quicker to create a recursive call into the template it may not be known which parts of the spun documents are known. That method was certainly adequate for the ArticleBot kind of processing that existed earlier but there is another problem. Speed will be important really only when producing loads of output so parsing them first seems to be the best idea.</p>
<p>So the first pass into the template from beginning to end will be to pull out the codes or spun items into variables. These can hang around and get used when the article is being spun.</p>
]]></content:encoded>
			<wfw:commentRss>http://qksite.com/algorithms-for-spinning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to spin comfortably?</title>
		<link>http://qksite.com/how-to-spin-comfortably/</link>
		<comments>http://qksite.com/how-to-spin-comfortably/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 15:45:48 +0000</pubDate>
		<dc:creator>QKDev</dc:creator>
				<category><![CDATA[Site News]]></category>

		<guid isPermaLink="false">http://qksite.com/?p=6</guid>
		<description><![CDATA[What textual is comfortable when spinning text? <a href="http://qksite.com/how-to-spin-comfortably/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Actually setting up a simple spin is a simple task, but I want to make sure I choose the correct algorithm. I have at the moment two choices, a recursive or a multiple pass.</p>
<p>Let&#8217;s see what we can use…<span id="more-6"></span></p>
<p>First off here are the basic needs. Scan through an article, we stick to text for now, and pick up commands to allow different content to be chosen at specified points. For now the easiest and most well know is to use the characters &#8216;{&#8216; and &#8216;}&#8217; to show the beginning and the end of the text to spin and a character &#8216;|&#8217; to show where the splits will occur.</p>
<p>So easiest article to spin will be something like this:</p>
<pre class="brush:vb">{Hello|Hi} World</pre>
<p>Two results will be either</p>
<p>Hello World</p>
<p>Or</p>
<p>Hi World</p>
<p>But we want it to be a bit more powerful than that don&#8217;t we. We want to be able to spin within a spin something like this:</p>
<pre class="brush:vb">{So that's {the end|finished} |that's it…}</pre>
<p>Three results will be</p>
<p>So that&#8217;s the end</p>
<p>So that&#8217;s finished</p>
<p>That&#8217;s it…</p>
<p>The above is much more useful with longer phrases but that essentially shows that multiple levels of spin are necessary and I do not want any limits.</p>
<p>Right, more requirements, I said I wanted the template to do more, but in the absence of defining exactly what I want now I will need to consider global and local scripts. Another character is needed, let&#8217;s use &#8216;^&#8217; and just in case we actually need &#8216;^&#8217; in our output then make the characters &#8216;^^&#8217; produce it.</p>
<p>The characters I am suggesting I will keep open and in a state where they can be changed at any time in the future. I want to be able to use this a lot before settling down to what the default characters should be.</p>
<p>Right, so how can we use scripts or fields with the &#8216;^&#8217; character.</p>
<p>Let&#8217;s try this example, a light bulb page</p>
<pre class="brush:vb">Light type {^light_type} and { can be found | is available } in wattage of {^wattage_list}</pre>
<p>To produce something like:</p>
<p>Light type is neon and is available in wattage of 10W,20W and 30W</p>
<p>Light type is LCD and can be found in wattage of 1W and  2W</p>
<p>I made an assumption here that the variables may be anything and kept the &#8216;{}&#8217; as delimiters as well because I want to have complete control over spacing. So anything whitespace with these delimiters (maybe I will need to think of quotation marks} will be absorbed. So I can write my template like this:</p>
<pre class="brush:plain">Light type {

^light_type

} and {

can be found | is available

} in wattage of {^wattage_list}</pre>
<p>Or however way I please.</p>
<p>We&#8217;ll see if that works or not.</p>
<p>There maybe optional bits in the template too. For example if a value is know then you might want to spin it but if not you do not want any blank values in the text.</p>
<p>Maybe something like</p>
<pre class="brush:plain">Light type {  ^light_type } {^if(wattage_list) and { can be found | is available } in wattage of {^wattage_list} }</pre>
<p>Finally, to handle the scripting I need to choose the engine. In QKSite I used VBScript because of its simplicity but also allow JavaScript be used if necessary. Maybe those variable will be functions with arguments in parentheses, like in the &#8216;if&#8217; above &#8211; we&#8217;ll see how it looks.</p>
<p>While I make that decision I will continue and build QKSite solely to produce the spinning text for version 1. It looks about as complicated as I would put up with and playing around with it might enable better ways to be imagined.</p>
<p>Let me know if you have any thoughts on this&#8230;</p>
<p>My aim is to keep the template creation as quick and easy as possible without getting untidy, I want to concentrate then on the articles and not any coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://qksite.com/how-to-spin-comfortably/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

