Skip to content

Commit cba2d93

Browse files
committed
Release 1.0.1
1 parent dfd1e28 commit cba2d93

File tree

6 files changed

+17
-19
lines changed

6 files changed

+17
-19
lines changed

AlpasDocs.alfredworkflow

281 Bytes
Binary file not shown.

alpas.php

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,22 @@
1212
$parsedown = new Parsedown;
1313
$algolia = new Algolia('BH4D9OD16A', 'e017bb0b99fe3193f750d48a4e7d441e');
1414

15-
AlgoliaUserAgent::addSuffixUserAgentSegment('Alpas Docs Alfred Workflow', '1.0.0');
15+
AlgoliaUserAgent::addSuffixUserAgentSegment('Alpas Docs Alfred Workflow', '1.0.1');
1616

1717
$index = $algolia->initIndex('alpas');
1818
$search = $index->search($query);
1919
$results = $search['hits'];
2020

21-
$subtextSupported = $subtext === '0' || $subtext === '2';
22-
2321
if (empty($results)) {
24-
if (empty($results)) {
25-
$workflow->result()
26-
->title('No matches')
27-
->icon('google.png')
28-
->subtitle("No match found in the docs. Search Google for: \"Alpas+{$query}\"")
29-
->arg("https://www.google.com/search?q=alpas+{$query}")
30-
->quicklookurl("https://www.google.com/search?q=alpas+{$query}")
31-
->valid(true);
32-
33-
echo $workflow->output();
34-
exit;
35-
}
22+
$workflow->result()
23+
->title('No matches')
24+
->icon('google.png')
25+
->subtitle("No match found in the docs. Search Google for: \"Alpas+{$query}\"")
26+
->arg("https://www.google.com/search?q=alpas+{$query}")
27+
->quicklookurl("https://www.google.com/search?q=alpas+{$query}")
28+
->valid(true);
29+
30+
echo $workflow->output();
3631
exit;
3732
}
3833

@@ -47,7 +42,10 @@
4742
$subtitle = $hit['hierarchy']['lvl0'];
4843
while ($currentLvl < $highestLvl) {
4944
$currentLvl = $currentLvl + 1;
50-
$subtitle = $subtitle.' » '.$hit['hierarchy']['lvl'.$currentLvl];
45+
$lvl = $hit['hierarchy']['lvl'.$currentLvl];
46+
if (!empty($lvl)) {
47+
$subtitle = $subtitle.''.$lvl;
48+
}
5149
}
5250

5351
$workflow->result()

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "alpas/docsalfred",
33
"description": "Alpas docs search workflow for Alfred.",
4-
"version": "1.1.0",
4+
"version": "1.0.1",
55
"keywords": ["alfred", "alfred-workflow", "alpas", "algolia"],
66
"homepage": "https://github.com/alpas",
77
"support": {

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
<key>variablesdontexport</key>
124124
<array/>
125125
<key>version</key>
126-
<string>1.0.0</string>
126+
<string>1.0.1</string>
127127
<key>webaddress</key>
128128
<string>https://alpas.dev</string>
129129
</dict>

screenshot.png

-1.49 KB
Loading

0 commit comments

Comments
 (0)