Skip to content

Commit

Permalink
Rebuild with fixed help file
Browse files Browse the repository at this point in the history
  • Loading branch information
deanishe committed Feb 23, 2019
1 parent 57ced1f commit 2b73b9e
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 62 deletions.
51 changes: 46 additions & 5 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@


</head>
<body class="normal">
<body class="normal firstload">
<div id="wrapper">
<h1>Sublime Text Projects Alfred Workflow</h1>

Expand Down Expand Up @@ -683,19 +683,60 @@ <h2>Usage</h2>
</ul></li>
</ul>

<p><strong>Note</strong>: You must edit the configuration and add some directories to search before using the workflow, or it won&#8217;t do anything.</p>
<h2>How it works</h2>

<p>The workflow scans your system for <code>.sublime-project</code> files using <code>locate</code>, <code>mdfind</code> and (optionally) <code>find</code>. It then caches the list of projects for 10 minutes (by default).</p>

<p>As the <code>locate</code> database isn&#8217;t enabled on most machines (and isn&#8217;t updated frequently in any case), and <code>mdfind</code> ignores hidden directories, there is an additional, optional <code>find</code>-based scanner to &#8220;fill the gaps&#8221;, which you must specifically configure (see below).</p>

<h2>Configuration</h2>

<p>The workflow is configured by editing the <code>sublime.toml</code> file in the workflow&#8217;s data directory. It will be created by the workflow on first run, and you can use <code>.stconfig &gt; Edit Config File</code> to open it in Sublime Text.</p>
<p>Scan intervals are configured in the <a href="https://www.alfredapp.com/help/workflows/advanced/variables/#environment">workflow&#8217;s configuration sheet in Alfred Preferences</a>:</p>

<table>
<colgroup>
<col style="text-align:left;"/>
<col style="text-align:left;"/>
</colgroup>

<thead>
<tr>
<th style="text-align:left;">Variable</th>
<th style="text-align:left;">Usage</th>
</tr>
</thead>

<tbody>
<tr>
<td style="text-align:left;"><code>INTERVAL_FIND</code></td>
<td style="text-align:left;">How long to cache <code>find</code> search results for</td>
</tr>
<tr>
<td style="text-align:left;"><code>INTERVAL_LOCATE</code></td>
<td style="text-align:left;">How long to cache <code>locate</code> search results for</td>
</tr>
<tr>
<td style="text-align:left;"><code>INTERVAL_MDFIND</code></td>
<td style="text-align:left;">How long to cache <code>mdfind</code> search results for</td>
</tr>
</tbody>
</table>

<p>The values should be of the form <code>10m</code> or <code>2h</code>. Set to <code>0</code> to disable a particular scanner.</p>

<p>The workflow should work &#8220;out of the box&#8221;, but if you have project files in directories that <code>mdfind</code> doesn&#8217;t see (hidden directories, network shares), you may have to explicitly add some search paths to the <code>sublime.toml</code> configuration file in the workflow&#8217;s data directory. The file is created on first run, and you can use <code>.stconfig &gt; Edit Config File</code> to open it in Sublime Text.</p>

<p>These directories are searched with <code>find</code>.</p>

<p>You can also add glob patterns to the <code>excludes</code> list in the settings file to ignore certain results. Excludes apply to all scanners.</p>

<p>The available options are documented in the settings file itself.</p>
<p>The options are documented in the settings file itself.</p>

<h2>Licensing, thanks</h2>

<p>All the code is released under the <a href="http://opensource.org/licenses/MIT">MIT Licence</a>.</p>

<p>The workflow is based on the [AwGo library][alfred-workflow], also released under the <a href="http://opensource.org/licenses/MIT">MIT Licence</a>.</p>
<p>The workflow is based on the <a href="https://github.com/deanishe/awgo">AwGo workflow library</a> and <a href="https://github.com/docopt/docopt.go">docopt</a>, both also released under the <a href="http://opensource.org/licenses/MIT">MIT Licence</a>.</p>

<p>The icons are based on <a href="https://fontawesome.com">Font Awesome</a> and <a href="https://materialdesignicons.com/">Material Design Icons</a>.</p>
<!-- ##END MARKED WRAPPER## -->
Expand Down
125 changes: 68 additions & 57 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -217,42 +217,6 @@
<string>Sublime Text Projects</string>
<key>objects</key>
<array>
<dict>
<key>config</key>
<dict>
<key>triggerid</key>
<string>projects</string>
</dict>
<key>type</key>
<string>alfred.workflow.trigger.external</string>
<key>uid</key>
<string>0A75A8BC-3856-4729-B16A-62B167B2E91F</string>
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>concurrently</key>
<false/>
<key>escaping</key>
<integer>102</integer>
<key>script</key>
<string>./alfsubl $action "$1"</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
<string></string>
<key>type</key>
<integer>5</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>506077C9-6BF8-401D-B34D-ACAEAA975F30</string>
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -300,6 +264,42 @@
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>triggerid</key>
<string>projects</string>
</dict>
<key>type</key>
<string>alfred.workflow.trigger.external</string>
<key>uid</key>
<string>0A75A8BC-3856-4729-B16A-62B167B2E91F</string>
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>concurrently</key>
<false/>
<key>escaping</key>
<integer>102</integer>
<key>script</key>
<string>./alfsubl $action "$1"</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
<string></string>
<key>type</key>
<integer>5</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>506077C9-6BF8-401D-B34D-ACAEAA975F30</string>
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -462,25 +462,6 @@
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>inputstring</key>
<string>{var:action}</string>
<key>matchcasesensitive</key>
<true/>
<key>matchmode</key>
<integer>1</integer>
<key>matchstring</key>
<string>rescan</string>
</dict>
<key>type</key>
<string>alfred.workflow.utility.filter</string>
<key>uid</key>
<string>2DBA4231-BA57-4BB8-9E1D-DD1F29FA2A8A</string>
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand All @@ -504,6 +485,25 @@
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>inputstring</key>
<string>{var:action}</string>
<key>matchcasesensitive</key>
<true/>
<key>matchmode</key>
<integer>1</integer>
<key>matchstring</key>
<string>rescan</string>
</dict>
<key>type</key>
<string>alfred.workflow.utility.filter</string>
<key>uid</key>
<string>2DBA4231-BA57-4BB8-9E1D-DD1F29FA2A8A</string>
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -567,7 +567,18 @@
</dict>
</array>
<key>readme</key>
<string></string>
<string>Sublime Text Projects
=====================
Open Sublime Text projects from Alfred.
The workflow scans your system for `.sublime-project` files and allows you to open them in Sublime or the project directories in Finder.
It primarily uses `mdfind` and `locate` (if enabled) to search your system. There is an optional `find`-based scanner to "fill the gaps".
You can disable a specific scanner by setting its INTERVAL_* setting to 0.
To add additional directories to scan, use `.stconfig &gt; Edit Config File`.</string>
<key>uidata</key>
<dict>
<key>0A75A8BC-3856-4729-B16A-62B167B2E91F</key>
Expand Down Expand Up @@ -705,7 +716,7 @@
<string>10m</string>
</dict>
<key>version</key>
<string>3.0.1</string>
<string>3.0.2</string>
<key>webaddress</key>
<string></string>
</dict>
Expand Down

0 comments on commit 2b73b9e

Please sign in to comment.