GithubHelp home page GithubHelp logo

mesutcan / stackit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lukasschwab/stackit

0.0 1.0 0.0 12.73 MB

Smart Stack Overflow queries from the command line

License: MIT License

Python 100.00%

stackit's Introduction

stackit

The essential sidekick to any superhero developer.

stackit sends smart StackOverflow queries from your command line.

stackitfor.me -- Created at SB Hacks 2015.


Features

  • Written entirely in Python
  • Works on Mac, Windows and Linux
  • Automatically pipes error messages into StackOverflow queries
  • Parses and displays relevant questions and answers directly on the command line in reader-friendly markdown format

Installation

There are two ways to install stackit. Both should have roughly the same outcome, but have their advantages/disadvantages.

1. PyPI/pip

This method will always produce some stable build, but may not be the most up to date version. New functionality will come slower than building from this repo.

$ pip install stackit

Note, depending on your computer's settings, you may need to sudo pip install stackit.

2. Build from this repo

This method will always include the latest features, but sometimes will not work at all. Oops!

Clone the repo, then use setup.py to install the package. Note, this process will differ only slightly in a non-bash shell.

$ git clone https://github.com/lukasschwab/stackit.git
$ cd stackit
$ python setup.py install

Note, depending on your computer's settings, you may need to sudo python setup.py install.

Usage

The install process establishes an alias, stackit, for stackit_core.py's functionality. Instead of using python stackit_core.py, you will always simply use stackit at the command prompt.

Command line arguments

  • none: version splash page // usage
  • -h, --help: version splash page // usage
  • -s: --search: search by user term (string)
  • --version: simple version report
  • --verbose: full text of top result and accepted answer
  • -e: --stderr: runs your program and searches by stderr output
  • -t: --tags: searches by tags in particular (multiple arguments)

Interface flow commands

  • m: more: shows the next 5 questions
  • #: select: shows full question//top answer text in focus -- be careful that it's clearly not the SO question ID, but the list index
  • --b: opens focused question in browser
  • --x: exit: go back to the list focus

Examples

To search Stack Overflow for "How do I create a bash alias" with the tags, "shell";

$ stackit -s"How do I create a bash alias?" -t "shell"

More examples on our website

Thanks

This project is possible because of several other pre-existing projects and their contributors:

  • Py-StackExchange: a Python wrapper for the StackExchange API
  • Requests: "HTTP for Humans"
  • Beautiful Soup 4: pretty data parsing for HTML/XML files, so you can read stuff
  • Pyfancy makes your print statements colorful // legible. This project doesn't incorporate pyfancy.py verbatim, but this project demonstrates the method.
  • Karan Goel's work with joe was a tremendous help in designing a command line tool in Python, and his Medium article on putting together a good readme is an inspiration to us all. Thank you based joe.
  • Peter Downs has a great article on how to submit a package to PyPI.

Contributing

Contribution instructions coming soon.

For now, hands off.

Contributors

stackit's People

Contributors

lukasschwab avatar eniasebiomo avatar vickiniu avatar lanidelrey avatar

Watchers

Sait Mesutcan Ilhaner avatar

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.