A talifi na gaba zamu kalli How2. A cikin wannan shafin yanar gizon, 'yan watannin da suka gabata, mun yi rubutu game da shi SoCLI. Wannan rubutun Python ne don bincika da kewaya yanar gizon Stack Overflow daga layin umarni. A yau kayan aikin da za mu gani a yau sun yi kama, kuma ana kiran shi 'how2'. Amfani ne na layin umarni wanda zamu iya bincika Stack Overflow daga tashar.
Amfani da rubutu mai sauƙi, kewaya StackOverflow daga tasharmu ya zama aiki mai sauƙi. Idan, kamar ni, kuna ciyar da lokaci mai amfani a cikin tashar, kuna da kayan aiki da aka sanya kamar yadda2 ya zama mai amfani sosai. Tare da wannan mai amfani, za mu iya yin tambayoyi, a Turanci, kamar yadda za mu yi bincike a cikin Google. Zamuyi amfani da Google da Stackoverflow APIs don neman takamaiman tambayoyin. Yana da amfani kyauta kuma bude rubuta tare da NodeJS.
How2 girkawa
Tunda yaya2 kunshin NodeJS ne, zamu iya girka shi ta amfani da mai sarrafa kunshin Npm. Idan bakayi shigar Npm da NodeJS ba tukuna, zaku iya bincika labarin cewa wani lokaci da suka wuce an buga shi a cikin wannan shafin kan batun. Hakanan zaka iya ɗaukar waƙar sauri kuma buga a cikin m (Ctrl + Alt T):
sudo apt install nodejs npm
Bayan mun girka Npm da NodeJS, zamuyi amfani da wannan umarni don girka how2 mai amfani. Mun buɗe tashar (Ctrl + Alt + T) kuma mu rubuta a ciki:
npm install -g how2
Idan kafuwa ya dawo mana Kuskuren EACCES, za mu bukata gyara npm izini. Ko zamu iya zaba yi amfani da umarni iri ɗaya ta amfani da sudo Don fara shigarwa.
Yi bincike ta amfani da How2
Bayan an gama girka, bari muga yadda ake bincika Stack Overflow ta amfani da wannan shirin. Amfani na yau da kullun don bincika gidan yanar gizon ta amfani da 'how2' mai amfani shine buga wani abu kamar:
how2 consulta a buscar
A matsayin misali na bincike, bari mu gano yadda ake kirkirar fayil din tgz. Don yin wannan a cikin tashar (Ctrl + Alt T) za mu rubuta:
how2 create archive tgz
Anan ga samfurin samfurin daga tsarin Ubuntu 16.04 na.
Binciken Starin yawo
Idan amsar da muke nema bata bayyana a cikin sakamakon da aka nuna ba, za mu danna SPACEBAR don fara binciken mu'amala. A ciki zamu iya yin bitar duk tambayoyin da aka gabatar da amsoshin Stack overflow.
Zamu iya amfani da Kibiyoyin sama / ƙasa don matsawa tsakanin sakamakon. Da zarar mun samu madaidaiciyar amsa, latsa maɓallin SPACEBAR ko maɓallin ENTER don buɗe shi a cikin Terminal.
Lokacin da muke cikin 'yanayin ma'amala' zamu iya ganin sakamako a cikin tashar, amma idan mun danna maballin B zamu bude wannan a cikin burauzar gidan yanar gizo qaddara
Don komawa kan allo na baya har sai mun gama fita daga kayan aikin, zamu danna Maballin ESC.
Nemo amsoshi na takamaiman yare
Idan ba mu tantance wani yare ba, ta hanyar layin layin umarni nan da nan zai ba mu amsar da ta fi dacewa. Amma idan wannan ba abin da muke nema ba ne, kuma muna so mu ɗan gyaru, za mu iya kuma takura sakamako zuwa takamaiman yaremisali php, python, c, Java, da sauransu.
Misali, don bincika tambayoyin da suka shafi yaren 'java' za mu kawai ƙara da -l tuta kamar yadda aka nuna a cikin masu zuwa:
how2 -l java class instance
Taimaka Yaya2
Don samun taimako mai sauri, game da wannan kayan aikin, kawai zamu rubuta:
how2 -h
Umurnin taimako yana ba da ƙaramin bayani, amma yana nuna duk abin da How2 yake yi. Don ƙarin bayani game da wannan kayan aiki da amfanin sa, zamu iya magance ku Shafin GitHub.
A rufe, faɗi cewa mai amfani how2 shine tsarin layin umarni na asali. Hakan kawai zai bamu damar bincika tambayoyi da amsoshi da sauri akan Stack overflow ba tare da barin tashar mu ba. Amma yana yin wannan aikin sosai. Idan abin da muke nema wani abu ne don amfani da ingantattun ayyuka, kamar bincika tambayoyin da aka zaɓa da yawa, bincika tambayoyi ta amfani da alamomi da yawa, kewaya mai launi, ƙaddamar da sabuwar tambaya, da sauransu, SoCLI shine mafi kyawun zaɓi.