Skip to content

code: <howdoi> instant coding answers via the command line by Golang ❤️ is Work ✅

Notifications You must be signed in to change notification settings

chinanf-boy/howdoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

howdoi Build Status

Copy from howdoi:py, But Faster

Install

go get -v -u github.com/chinanf-boy/howdoi

of cos, releases

Uasge

same as py:howdoi , but lit diff

$ howdoi -q "format date bash" -c -C

demo

TODO

  • base Feature, Get the data
  • Proxy can with Socks5
  • how many answers you want -n
  • go func with questions
  • colorful Code text with shell env -c/-T, chroma
  • cache Result -C useful refs
  • ReCache Result -R, just use GET, you still use -C if want to Cache Result
  • go func with ALL engines
  • add ChanHowdoi: got one result, show it, rather than all results
  • test file
  • Issue me anything

Notes: , cli-name Over the Python version cli

Tips

About the ENV

ENV Desc Default
HOWDOI_DISABLE_SSL change https:// => http:// nil
HOWDOI_URL search engine with the ask website stackoverflow.com
HOWDOI_URL_REGEX match the regex with URL questions/\d+/
HOWDOI_SEARCH_ENGINE search engine{bing|google} ALL
HOWDOI_CACHE_DIR http Response - Cached dir $HOME/.howdoi-cache
-T chroma theme pygments

HOWDOI_SEARCH_ENGINE, default ALL, mean GET ALL engines, but got the winner about speed.

NOTE, careful about Cache dir, you will miss the ever Data after you changed diff HOWDOI_CACHE_DIR。

Ref

chroma theme

themes >>
[
  abap, algol, algol_nu, arduino, autumn, borland, bw, colorful, dracula, emacs, friendly, fruity, github, igor, lovelace, manni, monokai, monokailight, murphy, native, paraiso-dark, paraiso-light, pastie, perldoc, pygments, rainbow_dash, rrt, solarized-dark, solarized-dark256, solarized-light, swapoff, tango, trac, vim, vsxcode
]

Cli

usage: howdoi [-h|--help] [-c|--color] [-v|--version] [-n|--num <integer>]
              -q|--query "<value>" [-q|--query "<value>" ...] [-D|--debug]
              [-T|--theme "<value>"] [-C|--cache] [-R|--recache]

              cli to Ask the question

Arguments:

  -h  --help     Print help information
  -c  --color    colorful Output. Default: false
  -v  --version  version
  -n  --num      how many answer. Default: 1
  -q  --query    query what
  -D  --debug    debug *
  -T  --theme    chrome styles. Default: pygments
  -C  --cache    cache response?. Default: false
  -R  --recache  reGET response, Cache thing have to with -C ?. Default: false

Why rewrite

  1. proxy,some issue with socks
  2. fast

About

code: <howdoi> instant coding answers via the command line by Golang ❤️ is Work ✅

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages