Giter Club home page Giter Club logo

alfred-stackexchange's Introduction

StackExchange Search for Alfred

Search for answers on StackExchange sites from Alfred 4+.

Download

Get StackExchange for Alfred from GitHub releases.

Usage

The main action (keyword stack) shows a list of all StackExchange sites. Choose one to search it.

There is also a search for StackOverflow.com configured (keyword .so), but it is easy to add searches for your own favourite StackExchange sites.

  • stack [<query>] — Choose a StackExchange site to search.
    • — Select site
    • ⌘↩ — Set as default site
    • ⌥↩ — Reveal site icon in Finder
    • ⌘C — Copy site ID to clipboard (for adding Script Filters)
  • .so <query> — Search StackOverflow.com for <query>. See below for syntax.
    • or ⌘+NUM — Open result in default browser
    • ⌘L — Show full question title in Alfred's Large Text window

Query syntax

Prefix a word in your <query> with . (full stop) to indicate that it's a tag, e.g requests .python will search for answers tagged python with the query requests.

Results

Answered questions will be shown first in the list of results (and have a green check mark on their icon).

Adding custom searches

You can easily add your own searches for specific sites by adding your own Script Filter with the following Script:

/usr/bin/python so.py search --site <siteid> "$1"

The easiest way to do this is to make and edit a copy of the built-in StackOverflow.com search.

To get a site ID, use the site search (keyword stack) and hit ⌘C on the desired site to copy its ID to the clipboard.

You can also use ⌥↩ on a site to reveal its icon in Finder.

Licensing, thanks

This workflow is released under the MIT Licence.

It is heavily based on Alfred-Workflow, also MIT-licensed.

alfred-stackexchange's People

Contributors

deanishe avatar roboxdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfred-stackexchange's Issues

400 bad request returned

Import workflow-StackOverflow, open Alfred and type in '.so test', verified 400 bad request returned.

v2.0 has some issues

Firstly the release has .alfred4workflow as extension ending and thus is not openable by Alfred. Had to change it to .alfredworkflow to be recognizable by Alfred and be opened.

Then when I did load it, trying to run the .so script filter I get error in console:

[17:23:49.332] ERROR: StackExchange Search[Script Filter] Code 1: Traceback (most recent call last):
  File "so.py", line 27, in <module>
    from common import CLIENT_ID, CLIENT_KEY
ImportError: No module named common

But not CLIENT_ID and KEY are setup to be defined in wf env variables. Perhaps Im missing something.

Get same error on stack keyword too.

Just noticed it also says ImportError: No module named common so perhaps I have to pip install it inside workflow, not sure.

Add if no question not found open in SO search

It's pretty nice but seems like it only finds questions where the headline is equal to my search query. StackOverflow tries to find similar questions when searching. If this is not possible add something like "Search for xyz on StackOverflow". So it would at least show more questions there.

Is there a way to add support to stack teams?

Hi
I've recently started using stackoverflow teams ("internal" knowledge sharing)
It's the same stackoverflow api and address except one thing it's restricted to authenticated users,
I couldn't figure out how can I add it to the siteids but is there a way? Can I assist in some way?

python2.7+ ssl error fix

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>
20:06:03 workflow.py:2082 INFO for assistance, see: https://github.com/deanishe/alfred-stackoverflow
20:06:03 workflow.py:2103 DEBUG ---------- finished in 1.307s ----------

modify web.py add two line

import ssl   #add line 1

ssl._create_default_https_context = ssl._create_unverified_context  #add line 2

Multiple word queries not working?

Queries that contain multiple words don't seem to work.

For example, if I search for "scala" I get these results:

image

Clearly the first result has something to do with Groovy, so if I search for "scala groovy" I would expect to see that question, but instead I see this:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.