<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to External_Commands</title><link>https://sourceforge.net/p/mcomix/wiki/External_Commands/</link><description>Recent changes to External_Commands</description><atom:link href="https://sourceforge.net/p/mcomix/wiki/External_Commands/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 31 Jan 2015 11:18:20 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/mcomix/wiki/External_Commands/feed" rel="self" type="application/rss+xml"/><item><title>External_Commands modified by Ark</title><link>https://sourceforge.net/p/mcomix/wiki/External_Commands/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -49,6 +49,17 @@
 %C | Absolute path of the directory containing the currently opened archive | /home/user
 %c | Name of the directory containing the currently opened archive | user

+#### Container-related variables
+
+These variables expand differently depending on whether an archive or a directory is opened when the command is executed. (Think of it as B as in "book" and S as in "shelf".)
+
+Variable | Meaning | Directory Example | Archive Example
+---------|---------|-------------------|----------------
+%B | Absolute path to the directory containing the currently opened image file, or absolute path to the currently opened archive | /home/user/Downloads | /home/user/comic-2012.zip
+%b | Name of the directory containing the currently opened image file, or name of the currently opened archive | Downloads | comic-2012.zip
+%S | Absolute path of the directory containing the currently opened directory or archive | /home/user | /home/user
+%s | Name of the directory containing the currently opened directory or archive | user | user
+
 #### Miscellaneous variables

 Use these variables to insert special meta characters that MComix uses for variable substitution.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ark</dc:creator><pubDate>Sat, 31 Jan 2015 11:18:20 -0000</pubDate><guid>https://sourceforge.net5e1132c845695a1d764f7bb12901ad1b02d0edec</guid></item><item><title>WikiPage External_Commands modified by Oddegamra</title><link>https://sourceforge.net/p/mcomix/wiki/External_Commands/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -14,3 +14,47 @@
 The edit window first displays a list of all commands, and a few buttons to edit those commands.

 [[img src="mcomix-external-commands.png" alt="Edit external commands"]]
+
+Each command consists of four parts:
+
+- *Label*: The name the command will be listed as in the menu.
+- *Command*: The executable that is to be run, followed by zero or more arguments, all separated by spaces. If an argument contains spaces, wrap it in quotation marks. The command can contain certain variables, as listed under *Variables* further down. 
+- *Working directory*: The command will be executed in this directory. Only one directory is allowed. If the directory contains spaces, wrap it with quotation marks.
+- *Disabled in archives*: If this box is ticked, the command will not be run when an archive is currently opened. This helps prevent accidentally working on temporary files that will be deleted as soon as the archive is closed.
+
+Variables
+---
+
+The following variables can be inserted into the command and working directory fields. When a command is run, these variables will be substituted with their respective special meaning.
+
+#### Image-related variables
+
+Variable | Meaning | Example
+---------|---------|--------
+%F | Absolute path to the currently opened image file | /home/user/Downloads/cats.jpg
+%f | Name of the currently opened image file | cats.jpg
+%D | Absolute path to the directory containing the currently opened image file | /home/user/Downloads
+%d | Name of the directory containing the currently opened image file | Downloads
+
+These variables will expand to temporary filenames and directories when used in conjunction with archives.
+
+#### Archive-related variables
+
+These variables are only valid if an archive is opened when the command is executed.
+
+Variable | Meaning | Example
+---------|---------|--------
+%A | Absolute path to the currently opened archive | /home/user/comic-2012.zip
+%a | Name of the currently opened archive | comic-2012.zip
+%C | Absolute path of the directory containing the currently opened archive | /home/user
+%c | Name of the directory containing the currently opened archive | user
+
+#### Miscellaneous variables
+
+Use these variables to insert special meta characters that MComix uses for variable substitution.
+
+Variable | Meaning | Example
+---------|---------|--------
+%/ | Inserts a backslash or slash, depending on operating system. Windows users will see a backslash, others a forward slash. | /
+%" | Insert a literal quote | "
+%% | Insert a literal percent character | %
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oddegamra</dc:creator><pubDate>Mon, 04 Mar 2013 19:53:15 -0000</pubDate><guid>https://sourceforge.netf5596f1693227f4072f051f2ac4b8e9d74aa86ac</guid></item><item><title>WikiPage External_Commands modified by Oddegamra</title><link>https://sourceforge.net/p/mcomix/wiki/External_Commands/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -12,3 +12,5 @@
 ---

 The edit window first displays a list of all commands, and a few buttons to edit those commands. 
+
+[[img src="mcomix-external-commands.png" alt="Edit external commands"]]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oddegamra</dc:creator><pubDate>Mon, 04 Mar 2013 19:36:41 -0000</pubDate><guid>https://sourceforge.netacec6022839c847599a710ed800171da3b4571d5</guid></item><item><title>WikiPage External_Commands modified by Oddegamra</title><link>https://sourceforge.net/p/mcomix/wiki/External_Commands/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1,11 +1,14 @@
+External commands
+===
+
 Overview
-===
+---

 Sometimes, MComix might not provide enough functionality for certain needs - for example, it does not display animated GIF files. Or, you might just want to open a file manager at the location of the currently opened images to perform some move operations.

 MComix provides for such cases by allowing the user to define a list of external commands that can be executed at will. The relevant menu can be accessed via "File&amp;rarr;Open with". Initially, this submenu will be empty. New commands can be added with the "Edit commands" menu item. After one or more commands have been specified, they can be executed either via menu entry, or by pressing the 1 to 9 keys. Those activate the first to ninth command, respectively.

 Add and edit commands
-===
+---

 The edit window first displays a list of all commands, and a few buttons to edit those commands. 
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oddegamra</dc:creator><pubDate>Mon, 04 Mar 2013 19:30:14 -0000</pubDate><guid>https://sourceforge.net7c4b8d99a81ea16447ff1b453e9f69825315953e</guid></item><item><title>WikiPage External_Commands modified by Oddegamra</title><link>https://sourceforge.net/p/mcomix/wiki/External_Commands/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oddegamra</dc:creator><pubDate>Mon, 04 Mar 2013 19:29:24 -0000</pubDate><guid>https://sourceforge.net4c54bfd18609269f35420d7f459340fda495f3fd</guid></item><item><title>WikiPage External Commands modified by Oddegamra</title><link>https://sourceforge.net/p/mcomix/wiki/External%2520Commands/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="overview"&gt;Overview&lt;/h1&gt;
&lt;p&gt;Sometimes, MComix might not provide enough functionality for certain needs - for example, it does not display animated GIF files. Or, you might just want to open a file manager at the location of the currently opened images to perform some move operations.&lt;/p&gt;
&lt;p&gt;MComix provides for such cases by allowing the user to define a list of external commands that can be executed at will. The relevant menu can be accessed via "File&amp;rarr;Open with". Initially, this submenu will be empty. New commands can be added with the "Edit commands" menu item. After one or more commands have been specified, they can be executed either via menu entry, or by pressing the 1 to 9 keys. Those activate the first to ninth command, respectively.&lt;/p&gt;
&lt;h1 id="add-and-edit-commands"&gt;Add and edit commands&lt;/h1&gt;
&lt;p&gt;The edit window first displays a list of all commands, and a few buttons to edit those commands. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oddegamra</dc:creator><pubDate>Mon, 04 Mar 2013 19:29:00 -0000</pubDate><guid>https://sourceforge.net7c08d0089eb47bcb1676355634b851115b097169</guid></item></channel></rss>