Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
deanishe committed Jul 20, 2017
0 parents commit 683d9cd
Show file tree
Hide file tree
Showing 9 changed files with 559 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

# Created by https://www.gitignore.io/api/vim,go,sublimetext

### Go ###
# Binaries for programs and plugins
*.exe
*.dll
*.so
*.dylib
/forklift

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/

### SublimeText ###
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache

# workspace files are user-specific
*.sublime-workspace

# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project

# sftp configuration file
sftp-config.json

# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache

# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings

### Vim ###
# swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]
# session
Session.vim
# temporary
.netrwhist
*~
# auto-generated tag files
tags

# End of https://www.gitignore.io/api/vim,go,sublimetext
Binary file added ForkLift-Favourites-0.1.alfredworkflow
Binary file not shown.
26 changes: 26 additions & 0 deletions LICENCE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Secure SHell for Alfred. Open SSH connections from Alfred 2.

The MIT License (MIT)
---------------------

Copyright (c) 2016 Dean Jackson <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ForkLift Favourites for Alfred
==============================

Browse, filter and open [ForkLift 3][forklift] favourites from [Alfred][alfred].


Usage
-----

- `ftp [<query>]` — List/filter ForkLift favourites
- `` — Open favourite in ForkLift


Licensing & thanks
------------------

This workflow is released under the [MIT licence][mit].

It is based on the [AwGo library][awgo], also released under the MIT licence.


[alfred]: https://www.alfredapp.com
[awgo]: https://git.deanishe.net/deanishe/awgo/
[forklift]: http://www.binarynights.com/forklift/
[mit]: ./LICENCE.txt
71 changes: 71 additions & 0 deletions build-workflow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/bin/bash

here="$( cd "$( dirname "$0" )"; pwd )"


log() {
echo "$@" > /dev/stderr
}

pushd "$here" &> /dev/null

log "cleaning ./build ..."
rm -rvf ./build

log

log "copying assets to ./build ..."

mkdir -vp ./build

cp -v icon.png ./build/
cp -v info.plist ./build/
cp -v README.md ./build/
cp -v LICENCE.txt ./build/

log

log "building executable(s) ..."
go build -v -o ./forklift ./forklift.go
ST_BUILD=$?
if [ "$ST_BUILD" != 0 ]; then
log "error building executable."
rm -rf ./build/
popd &> /dev/null
exit $ST_BUILD
fi

chmod 755 ./forklift
cp -v ./forklift ./build/forklift

# Get the dist filename from the executable
zipfile="$(./forklift --distname 2> /dev/null)"

log

if test -e "$zipfile"; then
log "removing existing .alfredworkflow file ..."
rm -rvf "$zipfile"
log
fi

log "building .alfredworkflow file ..."
pushd ./build/ &> /dev/null
zip -v "../${zipfile}" *
ST_ZIP=$?
if [ "$ST_ZIP" != 0 ]; then
log "error creating .alfredworkflow file."
rm -rf ./build/
popd &> /dev/null
exit $ST_ZIP
fi
popd &> /dev/null

log

log "cleaning up ..."
rm -rvf ./build/

popd &> /dev/null
log "all done."

Loading

0 comments on commit 683d9cd

Please sign in to comment.