Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
prefs.plist
Binary file removed EB659F0C-7997-4F23-AECB-2B470BDA0ECE.png
Binary file not shown.
20 changes: 11 additions & 9 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

<img src="assets/alfred-workflow-preview.png">

An [Alfred workflow](https://www.alfredapp.com/) to easily search through [Atlassian Confluence](https://www.atlassian.com/software/confluence) written in [NodeJS](https://nodejs.dev/) using [Alfy](https://github.com/sindresorhus/alfy)
An [Alfred workflow](https://www.alfredapp.com/) to search through [Atlassian Confluence](https://www.atlassian.com/software/confluence) written in [NodeJS](https://nodejs.dev/) using [Alfy](https://github.com/sindresorhus/alfy).

Inspired by [Alfred Confluence written in Python2](https://github.com/skleinei/alfred-confluence) by [skleinei](https://github.com/skleinei)
Inspired by [Alfred Confluence written in Python2](https://github.com/skleinei/alfred-confluence) by [skleinei](https://github.com/skleinei).

## Automatic notification of updates

The workflow informs you when a new version is available
![image](https://user-images.githubusercontent.com/644550/181432647-27ebc1f7-da6f-4816-a96d-2854f30eef30.png)

Expand All @@ -18,17 +19,18 @@ npm install --global alfred-confluence-search

*Requires [Node.js](https://nodejs.org) 14+ and the Alfred [Powerpack](https://www.alfredapp.com/powerpack/).*

## Workflow Environment Variables
## Workflow User Configuration

<img src="assets/alfred-workflow-variables.png">

1. Click on the `[X]` (red arrow) to open the Workflow Environment Variables window
2. Set the value of the 3 Workflow Environment Variables:
- `BASE_URL`
When your Confluence url is https://myawesomecompany.atlassian.net/wiki/spaces/MYK/pages/1323642387/Bootstrapping the `BASE_URL` is `https://myawesomecompany.atlassian.net`
- `USERNAME`
username to login into your Atlassian account
- `API_TOKEN` your Atlassian API token from https://id.atlassian.com/manage-profile/security/api-tokens
2. Set the value of the 3 Workflow User Configuration values:
* Base URL:
* When your Confluence url is `https://myawesomecompany.atlassian.net/wiki/spaces/MYK/pages/1323642387/Bootstrapping` your Base URL is `https://myawesomecompany.atlassian.net`
* Username
* The username you use to log in to your Atlassian account
* API token
* Your Atlassian API token from https://id.atlassian.com/manage-profile/security/api-tokens

## Usage

Expand Down
123 changes: 87 additions & 36 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<key>createdby</key>
<string>Bas van Dijk</string>
<key>description</key>
<string></string>
<string>Alfred workflow to search through Atlassian Confluence written in NodeJS</string>
<key>disabled</key>
<false/>
<key>name</key>
Expand Down Expand Up @@ -58,9 +58,9 @@
<key>queuemode</key>
<integer>1</integer>
<key>runningsubtext</key>
<string>Searching</string>
<string>Searching</string>
<key>script</key>
<string>./node_modules/.bin/run-node index.js "$1"
<string>npx run-node index.js "$1"
</string>
<key>scriptargtype</key>
<integer>1</integer>
Expand All @@ -87,12 +87,14 @@
<dict>
<key>browser</key>
<string></string>
<key>skipqueryencode</key>
<false/>
<key>skipvarencode</key>
<false/>
<key>spaces</key>
<string></string>
<key>url</key>
<string>{query}</string>
<key>utf8</key>
<true/>
</dict>
<key>type</key>
<string>alfred.workflow.action.openurl</string>
Expand All @@ -103,59 +105,108 @@
</dict>
</array>
<key>readme</key>
<string>Confluence Quick Search using NodeJS

I was using alfred-confluence by skleinei https://github.com/skleinei/alfred-confluence

Unfortunately this was based on Python2 which is not part of MacOS Monterey anymore.
<string># Confluence Quick Search using NodeJS

Since I am a NodeJS developer I created my own script which uses NodeJS
I was using [`alfred-confluence` by @skleinei](https://github.com/skleinei/alfred-confluence).

Make sure you've set the following Workflow Environment Variables:
Unfortunately this is based on Python 2 which is not part of macOS Monterey anymore.

BASE_URL
When your Confluence url is https://myawesomecompany.atlassian.net/wiki/spaces/MYK/pages/1323642387/Bootstrapping the BASE_URL is https://myawesomecompany.atlassian.net
Since I am a NodeJS developer I created my own script which uses NodeJS.

USERNAME
Username to login into your Atlassian account
You’ll need to supply the required User Configuration:

API_TOKEN
Your Atlassian API token from https://id.atlassian.com/manage-profile/security/api-tokens</string>
* Base URL:
* When your Confluence url is `https://myawesomecompany.atlassian.net/wiki/spaces/MYK/pages/1323642387/Bootstrapping` your Base URL is `https://myawesomecompany.atlassian.net`
* Username
* The username you use to log in to your Atlassian account
* API token
* Your Atlassian API token from https://id.atlassian.com/manage-profile/security/api-tokens</string>
<key>uidata</key>
<dict>
<key>072D55A5-F67B-47F0-ABEF-1D45225C6EEA</key>
<dict>
<key>xpos</key>
<integer>275</integer>
<real>275</real>
<key>ypos</key>
<integer>105</integer>
<real>105</real>
</dict>
<key>EB659F0C-7997-4F23-AECB-2B470BDA0ECE</key>
<dict>
<key>xpos</key>
<integer>100</integer>
<real>100</real>
<key>ypos</key>
<integer>105</integer>
<real>105</real>
</dict>
</dict>
<key>variables</key>
<dict>
<key>API_TOKEN</key>
<string></string>
<key>BASE_URL</key>
<string></string>
<key>USERNAME</key>
<string></string>
</dict>
<key>variablesdontexport</key>
<key>userconfigurationconfig</key>
<array>
<string>BASE_URL</string>
<string>API_TOKEN</string>
<string>USERNAME</string>
<dict>
<key>config</key>
<dict>
<key>default</key>
<string></string>
<key>placeholder</key>
<string></string>
<key>required</key>
<true/>
<key>trim</key>
<true/>
</dict>
<key>description</key>
<string>Your Atlassian API token from https://id.atlassian.com/manage-profile/security/api-tokens</string>
<key>label</key>
<string>API token</string>
<key>type</key>
<string>textfield</string>
<key>variable</key>
<string>API_TOKEN</string>
</dict>
<dict>
<key>config</key>
<dict>
<key>default</key>
<string></string>
<key>placeholder</key>
<string></string>
<key>required</key>
<true/>
<key>trim</key>
<true/>
</dict>
<key>description</key>
<string>If your Confluence url is https://myawesomecompany.atlassian.net/wiki/spaces/MYK/pages/1323642387/Bootstrapping your Base URL is https://myawesomecompany.atlassian.net</string>
<key>label</key>
<string>Base URL</string>
<key>type</key>
<string>textfield</string>
<key>variable</key>
<string>BASE_URL</string>
</dict>
<dict>
<key>config</key>
<dict>
<key>default</key>
<string></string>
<key>placeholder</key>
<string></string>
<key>required</key>
<true/>
<key>trim</key>
<true/>
</dict>
<key>description</key>
<string>Your username for logging in to your Atlassian account</string>
<key>label</key>
<string>Username</string>
<key>type</key>
<string>textfield</string>
<key>variable</key>
<string>USERNAME</string>
</dict>
</array>
<key>version</key>
<string>0.0.1</string>
<key>webaddress</key>
<string>https://usto.nl</string>
<string>https://github.com/basvdijk/alfred-confluence-search</string>
</dict>
</plist>