<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>User defined variables, decision making, non-interactive processing.</title>
		<link>http://photobatch.wikidot.com/forum/t-46940/user-defined-variables-decision-making-non-interactive-proce</link>
		<description>Posts in the discussion thread &quot;User defined variables, decision making, non-interactive processing.&quot; - Actions should be able to define variables and those variables should be available to all actions that follow.  It should also be possible for actions to be modified or skipped depending on the values of variables.</description>
				<copyright></copyright>
		<lastBuildDate>Mon, 13 Jul 2026 06:57:02 +0000</lastBuildDate>
		
					<item>
				<guid>http://photobatch.wikidot.com/forum/t-46940#post-125671</guid>
				<title>Re: User defined variables, decision making, non-interactive processing.</title>
				<link>http://photobatch.wikidot.com/forum/t-46940/user-defined-variables-decision-making-non-interactive-proce#post-125671</link>
				<description></description>
				<pubDate>Sat, 15 Mar 2008 23:19:46 +0000</pubDate>
				<wikidot:authorName>stani</wikidot:authorName>				<wikidot:authorUserId>60092</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I am not sure I understand this idea fully. Did you know an action is actually saved as a (python) dictionary in a *.phatch file. For example an action list with only the save action is saved as:</p> <div class="code"> <div class="hl-main"> <pre><span class="hl-code">{</span><span class="hl-quotes">'</span><span class="hl-string">actions</span><span class="hl-quotes">'</span><span class="hl-code">: </span><span class="hl-brackets">[</span><span class="hl-code">{</span><span class="hl-quotes">'</span><span class="hl-string">fields</span><span class="hl-quotes">'</span><span class="hl-code">: {</span><span class="hl-quotes">'</span><span class="hl-string">As</span><span class="hl-quotes">'</span><span class="hl-code">: </span><span class="hl-identifier">u</span><span class="hl-quotes">'</span><span class="hl-string">pdf</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-quotes">'</span><span class="hl-string">Filename</span><span class="hl-quotes">'</span><span class="hl-code">: </span><span class="hl-identifier">u</span><span class="hl-quotes">'</span><span class="hl-string">&lt;filename&gt;</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-quotes">'</span><span class="hl-string">In</span><span class="hl-quotes">'</span><span class="hl-code">: </span><span class="hl-identifier">u</span><span class="hl-quotes">'</span><span class="hl-string">&lt;root&gt;/out/&lt;subfolder&gt;</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-quotes">'</span><span class="hl-string">JPG Quality</span><span class="hl-quotes">'</span><span class="hl-code">: </span><span class="hl-identifier">u</span><span class="hl-quotes">'</span><span class="hl-string">60</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-quotes">'</span><span class="hl-string">JPG Size Maximum</span><span class="hl-quotes">'</span><span class="hl-code">: </span><span class="hl-quotes">'</span><span class="hl-string">0kb</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-quotes">'</span><span class="hl-string">JPG Size Tolerance</span><span class="hl-quotes">'</span><span class="hl-code">: </span><span class="hl-quotes">'</span><span class="hl-string">5%</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-quotes">'</span><span class="hl-string">PNG Optimize</span><span class="hl-quotes">'</span><span class="hl-code">: </span><span class="hl-identifier">u</span><span class="hl-quotes">'</span><span class="hl-string">false</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-quotes">'</span><span class="hl-string">Resolution</span><span class="hl-quotes">'</span><span class="hl-code">: </span><span class="hl-quotes">'</span><span class="hl-string">&lt;dpi&gt;</span><span class="hl-quotes">'</span><span class="hl-code">, </span><span class="hl-quotes">'</span><span class="hl-string">__enabled__</span><span class="hl-quotes">'</span><span class="hl-code">: </span><span class="hl-identifier">u</span><span class="hl-quotes">'</span><span class="hl-string">true</span><span class="hl-quotes">'</span><span class="hl-code">}, </span><span class="hl-quotes">'</span><span class="hl-string">label</span><span class="hl-quotes">'</span><span class="hl-code">: </span><span class="hl-quotes">'</span><span class="hl-string">Save</span><span class="hl-quotes">'</span><span class="hl-code">}</span><span class="hl-brackets">]</span><span class="hl-code">, </span><span class="hl-quotes">'</span><span class="hl-string">description</span><span class="hl-quotes">'</span><span class="hl-code">: </span><span class="hl-identifier">u</span><span class="hl-quotes">'</span><span class="hl-string">blabla</span><span class="hl-quotes">'</span><span class="hl-code">}</span></pre></div> </div> <p>So if you want you can easily generate your action lists non-interactively from a python script. Just save some *.phatch files and study their source code. In order to understand you better, please give a hypothetical example with full details (eg width is 5 pixels, etc&#8230;).</p> <p>For Phatch 0.2 I might implement an architecture in which Phatch actions are opened up to external programs such as imagemagic or any other console program. This actually could be taken a step further that Phatch can handle any file type (not just images) and perform any action on it. It is however my concern that the user interface is well designed and polished, so I won't rush into this without thorough thought. Actually</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://photobatch.wikidot.com/forum/t-46940#post-125229</guid>
				<title>User defined variables, decision making, non-interactive processing.</title>
				<link>http://photobatch.wikidot.com/forum/t-46940/user-defined-variables-decision-making-non-interactive-proce#post-125229</link>
				<description></description>
				<pubDate>Fri, 14 Mar 2008 21:43:46 +0000</pubDate>
				<wikidot:authorName>kwhitefoot</wikidot:authorName>				<wikidot:authorUserId>90079</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>If an environment dictionary were passed to each action the action could add variables and modify variables. These could then be used to modify the actions .</p> <p>In addition actions could be defined that do not modify the image but instead decide which actions to apply depending on the values of both built in variables and user defined variables.</p> <p>For instance different scaling methods could be chosen depending on the dimensions of the image.</p> <p>With the addition of user defined variables, decision actions and the ability to execute the action list without showing a UI Phatch could become an alternative to writing shell scripts for some kinds of tasks.</p> <p>Being able to run non-interactively means that one Phatch action list could run another as an external action.</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>