Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/willfarrell/alfred-debugger

A little script to help you write your Alfred Workflows.
https://github.com/willfarrell/alfred-debugger

Last synced: about 2 months ago
JSON representation

A little script to help you write your Alfred Workflows.

Awesome Lists containing this project

README

        

alfred-debugger
===============

A little script to help you write your Alfred Workflows. In the case your script has an error, Alfred defautls to searching your query in a search engine. To catch these errors you can run them in Terminal, and see what the errors are quickly and easily.

## Install
```bash
cp alfred /usr/local/bin/alfred
chmod +x /usr/local/bin/alfred

# Add `alias alfred=/usr/local/bin/alfred` to `~/.bashrc`
# or
# Add `/usr/local/bin` to `$PATH`, if you use homebrew it should already be there
```

## Options
```bash
alfred [options] [-f] [-q]
alfred

-f --file Filename of php file (ex 'script.php')
-h --help Show help options (what you're viewing now)
-q --query Value to replace {query} with
-v --version Return version of script
```

## Running
Just run `alfred `.

## Sample
In Alfred create a `Script Filter` with the following code.
```php
// PHP
$query = urlencode("{query}");
require("sample.php");
```

Right-click the workflow in Alfred, click `Show in Finder`. Create a new file `sample.php` that will be include by the code above.

```php
result( 'debug', $query, "Your query was '$query'", '', 'icon.png', 'yes' );

echo $w->toxml();
?>
```

Open terminal to the open folder and run `$ alfred -f sample.php -q helloworld`. If all works ok you can be sure your Alfred Workflow will too. Go ahdea and try it out now, and have fun making new workflows.