Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
October 13, 2021 10:07 am GMT

Visit StackOverflow without leaving the terminal with Pyhton

Stuck on a coding problem? Wish to visit StackOverflow without leaving the terminal? With howdoi, you can do it!

Introduction to howdoi

Howdoi is an open source command line tool that gives answers to your questions right on the command line. Howdoi can be used by anyone and everyone who finds themselves Googling for answers to their basic programming questions.

You wonder:

howdoi print hello in python

Howdoi output:

print(hello)

Installation

pip install howdoi

Suppose you want to know how to format a date in bash. Why open your browser and read through blogs (risking major distraction) when you can simply stay in the console and ask howdoi:

$ howdoi format date bash> DATE=`date +%Y-%m-%d`

howdoi will answer all sorts of queries:

$ howdoi print stack trace python> import traceback>> try:>     1/0> except:>     print '>>> traceback <<<'>     traceback.print_exc()>     print '>>> end of traceback <<<'> traceback.print_exc()$ howdoi convert mp4 to animated gif> video=/path/to/video.avi> outdir=/path/to/output.gif> mplayer "$video" \>         -ao null \>         -ss "00:01:00" \  # starting point>         -endpos 10 \ # duration in second>         -vo gif89a:fps=13:output=$outdir \>         -vf scale=240:180$ howdoi create tar archive> tar -cf backup.tar --exclude "www/subf3" www

You can also search other StackExchange properties for answers:

HOWDOI_URL=cooking.stackexchange.com howdoi make pesto

or as an alias:

alias hcook='function hcook(){ HOWDOI_URL=cooking.stackexchange.com howdoi $* ; }; hcook'hcook make pesto

I advise you to visit this link: howdoi

There is also an Visual Studio Code Extension, Head over to the MarketPlace to install the extension.

Thank you all.


Original Link: https://dev.to/stokry/visit-stackoverflow-without-leaving-the-terminal-with-pyhton-ie4

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To