Jump to content

Search the Community

Showing results for tags 'golang'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

Found 4 results

  1. Greatly improved workflow re-written in Rust. Check out the github page for installation and new features such as popular tag suggestion link preview deletion... Automatic workflow updates Install it from: Github: https://github.com/spamwax/alfred-pinboard-rs/releases/latest https://github.com/spamwax/alfred-pinboard-rs Update (2019-06-21) 0.15.5 Add option to either show TAGs or URLs in search results. Fix multiple issues related to release of Alfred 4 pcheck should now force a network call regardless of when last update check was done. Add a combo modifier for search result to copy URL to clipboard. Fix: deleting a bookmark was not working. Full CHANGELOG Update (2018-06-04) 0.14.0 Add support for automatic update of workflow Fix a caching bug Update (12/08/2017): v0.5.0 Add support for dev version of Safari & Firefox (thanks to https://github.com/grusch-it) Add support to set toread flag of bookmarks. Just add toread to description/note (after semi-colon) p tag1 tag2 ; note toread Update (01/28/15): Another attempt at fixing openning browsers (thanks to https://github.com/grusch-it) Removed unecessary browser settings from workflow. Update (01/26/15): Fix the broken option settings due to an incomplete pull request merge Fix not getting title of the Firefox tab Update (11/25/14): Add support to automatically pick the most front browser (Chrome, Safari, Firefox, Chromium) Show the 'New Tag' item at the bottom of tag suggestion list Update (08/10/14): Add (kind of hacky) support for Firefox Update (07/12/14): Add support for Chromium browser Add options to perform search on tags only Add support for private/public bookmarks Add support for auto-updating the bookmarks cache after posting a new bookmark. Download link: http://goo.gl/55917Z Update (01/29/14): Bug Fix: searching should be case sensitive now. Update (12/15/13): Added (fuzzy) search capability. User friendlier approach to specifying workflow's settings. I am planning to add more features such as Delicious API support. For details and features please visit https://bitbucket.org/listboss/go-pinboard/wiki/Home I mainly wrote this so I can learn/practice Go (golang). It uses an Alfred workflow helper that's also written in Go. The helper is similar to what Dave has for php: https://bitbucket.org/listboss/go-alfred Some screenshots:
  2. Easy Alfred Workflow Script Filters in Go https://github.com/drgrib/alfred This is a lean but comprehensive implementation of the Alfred Script Filter JSON Format to get Alfred workflows off the ground quickly with blazingly fast script filters in Go that can be seamlessly developed inside or outside Alfred. It uses standard, familiar Go syntax and conventions as much as possible for rapid use by Go developers and integration with other Go code. A Simple Example Let's say we want to create a simple script filter that converts a given query to title case, lower case, or upper case, for which Go conveniently has built-in support. Let's start by prototyping our logic in Go with a case.go file in our workflow folder. We can do this on the command line or in the editor of our choice and easily run it inside or outside of Alfred: package main import ( "strings" "github.com/drgrib/alfred" ) func addCases(arg string) { titlecase := strings.Title(arg) alfred.Add(alfred.Item{ Title: titlecase, Subtitle: "Title", Arg: titlecase, UID: "titlecase", }) lowercase := strings.ToLower(arg) alfred.Add(alfred.Item{ Title: lowercase, Subtitle: "Lower", Arg: lowercase, UID: "lowercase", }) uppercase := strings.ToUpper(arg) alfred.Add(alfred.Item{ Title: uppercase, Subtitle: "Upper", Arg: uppercase, UID: "uppercase", }) } func main() { arg := "just a test" addCases(arg) alfred.Run() } { "items": [ { "uid": "title", "title": "Just A Test", "subtitle": "Title", "arg": "Just A Test" }, { "uid": "lower", "title": "just a test", "subtitle": "Lower", "arg": "just a test" }, { "uid": "upper", "title": "JUST A TEST", "subtitle": "Upper", "arg": "JUST A TEST" } ] } Looks good. Now let's add os.Args support and test it on the command line to simulate Alfred input: package main import ( "os" "strings" "github.com/drgrib/alfred" ) // [same stuff in the middle] func main() { arg := os.Args[1] addCases(arg) alfred.Run() } go build case.go ./case "another test" { "items": [ { "uid": "title", "title": "Another Test", "subtitle": "Title", "arg": "Another Test" }, { "uid": "lower", "title": "another test", "subtitle": "Lower", "arg": "another test" }, { "uid": "upper", "title": "ANOTHER TEST", "subtitle": "Upper", "arg": "ANOTHER TEST" } ] } Right again. Alright. Now let's drop this into our script filter: And give it a whirl: Why not copy these to the clipboard so we can actually use them? With a few simple runs and a glance at the Alfred clipboard history, we can see we are ready for business: Easy!
  3. AwGo — A Go library for Alfred workflows Full-featured library to build lightning-fast workflows in a jiffy. https://github.com/deanishe/awgo Features Easy access to Alfred configuration, including populating a struct from workflow variables and persisting settings back to info.plist. Straightforward generation of Alfred JSON feedback. Support for all applicable Alfred features up to v3.5. Fuzzy sorting/filtering. Simple API for caching/saving workflow data. Catches panics, logs stack trace and shows user an error message. Workflow updates API with built-in support for GitHub releases. Built-in logging for easier debugging. "Magic" queries/actions for simplified development and user support. macOS system icons. Installation & usage Install AwGo with: go get -u github.com/deanishe/awgo/... Typically, you'd call your program's main entry point via Run(). This way, the library will rescue any panic, log the stack trace and show an error message to the user in Alfred. program.go: package main // Package is called aw import "github.com/deanishe/awgo" // Workflow is the main API var wf *aw.Workflow func init() { // Create a new Workflow using default settings. // Critical settings are provided by Alfred via environment variables, // so this *will* die in flames if not run in an Alfred-like environment. wf = aw.New() } // Your workflow starts here func run() { // Add a "Script Filter" result wf.NewItem("First result!") // Send results to Alfred wf.SendFeedback() } func main() { // Wrap your entry point with Run() to catch and log panics and // show an error in Alfred instead of silently dying wf.Run(run) } In the Script Filter's Script box (Language = /bin/bash with input as argv): ./program "$1" Documentation Read the docs on GoDoc. Check out the example workflows (docs), which show how to use AwGo. Use one as a template to get your own workflow up and running quickly. Running/testing The library, and therefore the unit tests, rely on being run in an Alfred-like environment, as they pull configuration options from environment variables (which are set by Alfred). As such, you must source the env.sh script in the project root or run unit tests via the run-tests.sh script (which also sets up an appropriate environment then calls go test). Licensing & thanks This library is released under the MIT licence. The icon is based on the Go Gopher by Renee French.
  4. Title Case Server This workflow goes with an upcoming tutorial on using golang with Alfred on tutplus.com. It currently runs a small web app for doing title case conversions. The workflow has these commands: Command Description ------------------------------------ tcs:launch This will start the title case server on port 9910 tcs:stop This will stop the title case server tcs:convert This will take a string on the Alfred prompt, send it to the title case server, and return the result in a notification and the clipboard. It also has a hotkey specified to take the selected text, convert it, and paste it back in place. You will have to set the hotkey yourself. The go source code is included in the workflow. This is really a example of how you can write a web app in go and use it with Alfred. GitHub: https://github.com/raguay/MyAlfred/blob/master/TitleCaseServer.alfredworkflow Packal: http://www.packal.org/workflow/title-case-server
×
×
  • Create New...