Package: bs-tureng-cli
IntroductionInstallationInstall As a Bash ScriptCommands as Bash scriptUsagetranslatesentencesynonymError HandlingHelp about parametersIntroductionI created this repo to easily translate English and Turkish words by using very good project,Tureng.This CLI basically scrapeshttps://tureng.com/en/turkish-englishlink to parse translation results. You can just pass the word as a parameter to translate.InstallationYou can easily start using the CLI by installing it as a package on your Python environment.pipinstall.Or you can install it by using the command belowpipinstallgit+https://github.com/BaysanSoft/Tureng-Translation-CLI.gitOr you can just usesudo make install.Install As a Bash ScriptIf you want to use it from bash, you can just movetureng-cli.shto/usr/sbin/.!With this kind of installation, you can usetranslatecommand for default.>>>sudomvtureng-cli.sh/usr/sbin/
>>>turenh-cli.sh"hurricane"Meaningsof"hurricane"inTurkishEnglishDictionary:15result(s)#       Category        English         Turkish1+CommonUsage+hurricane+kasırga2+General+hurricane+fırtına3+General+hurricane+urağan4+General+hurricane+kasırga5+General+hurricane+(güçveyahızbakımından)kasırgayabenzeyenşey6+Technical+hurricane+bora7+Technical+hurricane+kasırga8+Environment+hurricane+tropiksiklon9+Geography+hurricane+kasırga10+Geography+hurricane+batıvirginiaeyaletindeşehir11+Geography+hurricane+utaheyaletindeşehir12+Meteorology+hurricane+bora13+Meteorology+hurricane+hortum14+Meteorology+hurricane+kasırga15+Military+hurricane+ikincidünyasavaşı'ndaingilizlertarafındankullanılanbirsavaşuçağıCommands as Bash scripttureng.shfile helps us to execute commands from Bash.Syntax:tureng.sh {command} "{word}" {n_result: default 15}Example of usage:tureng.sh synonym "hurricane" 15>>>sudomvtureng.sh/usr/sbin/
>>>tureng.shsynonym"hurricane"2Hurricanesynonyms#       Synonym         Defination1+cyclone+(Meteorol.)Asystemofrotatingwindsoveravastarea,spinninginwardtoalowpressurecenter(counterclockwiseintheNHemisphere)andgenerallycausingstormyweather:commonlycalledalow,sinceitcoexistswithlowbarometricpressure2+typhoon+AviolentcyclonicstormoccurringinthewesternPacificOcean.UsagetranslateThis command is using for translating words.There are basically 2 parameters by using the CLI:-wor--wordfor words to translate in both language Turkish or English-nor--n-resultsto limit the result of the translation rowsThe example below is for Turkish -> English.>>>tureng-clitranslate-wKasırga-n10Meaningsof"kasırga"inEnglishTurkishDictionary:33result(s)#       Category        Turkish         English1+CommonUsage+kasırga+hurricane2+CommonUsage+kasırga+whirlwind3+General+kasırga+wind4+General+kasırga+cyclone5+General+kasırga+twist6+General+kasırga+squall7+General+kasırga+windstorm8+General+kasırga+whirlwind9+General+kasırga+twister10+General+kasırga+tourbillionThe example below is for English -> Turkish.>>>tureng-clitranslate-wHurricane-n10Meaningsof"hurricane"inTurkishEnglishDictionary:15result(s)#       Category        English         Turkish1+CommonUsage+hurricane+kasırga2+General+hurricane+fırtına3+General+hurricane+urağan4+General+hurricane+kasırga5+General+hurricane+(güçveyahızbakımından)kasırgayabenzeyenşey6+Technical+hurricane+bora7+Technical+hurricane+kasırga8+Environment+hurricane+tropiksiklon9+Geography+hurricane+kasırga10+Geography+hurricane+batıvirginiaeyaletindeşehirsentenceThis command is using for showing sentence examples.There are basically 2 parameters by using the CLI:-wor--wordfor words to get the related sentences with it-nor--n-resultsto limit the result of the translation rows>>>tureng-clisentence-w"Hurricane"-n10Hurricanesentenceexample#       Sentence1+Oh,andthetropicalstormwillbecomeahurricanelateSaturdaynight.2+Thetownwasconsiderablydamagedbythegreathurricaneofthe8thofAugust1899.3+He'd managed to miss the hurricane, though the waters were still rough and the waves high.4       + Everything needs to be ready, especially if the hurricane shifts to make landfall.5       + In 1907 a hurricane destroyed the greater part of the laurels of the Prado and the royal palms of the Parque de Colon.6       + He felt like he'dbeenhitbyahurricane.7+In1090atremendoushurricanepassedoverLondon,andblewdownsixhundredhousesandmanychurches.8+Anopenspaceformingtheheartofthesquareinwhichthechurchstandsseparatesthesolitarywesterntower(14thcentury)fromthechoirandtransept,thenavehavingbeenblowndownbyaviolenthurricanein1674andneverrebuilt.9+InJuly,ontheapproachofthedangeroushurricaneseason,RodneysailedforNorthAmerica,reachingNewYorkonthe14thofSeptember.10+Thehurricane,too,wasfollowedbyrepeateddroughts,andtheinhabitantsoftheout-islandswerereducedtoindigenceandwant,aconditionwhichisstill,insomemeasure,inevidence.synonymThis command is using for showing synonyms of the word.There are basically 2 parameters by using the CLI:-wor--wordfor words to get related synonyms-nor--n-resultsto limit the result of the translation rows>>>tureng-clisynonym-w"Hurricane"-n3Hurricanesynonyms#       Synonym         Defination1+cyclone+(Meteorol.)Asystemofrotatingwindsoveravastarea,spinninginwardtoalowpressurecenter(counterclockwiseintheNHemisphere)andgenerallycausingstormyweather:commonlycalledalow,sinceitcoexistswithlowbarometricpressure2+typhoon+AviolentcyclonicstormoccurringinthewesternPacificOcean.3+wind+Thewindinstrumentsofanorchestra,ortheplayersoftheseinstrumentsError Handling>>>tureng-clitranslate-w"excissment"-n10Maybethecorrectoneis
excitement
exciseman
excipient
excise
excised
excipients
excising
excimer
excision
excitantHelp about parametersYou can use--helpflag to get help.>>>tureng-cli--help

Usage:cli.py[OPTIONS]COMMAND[ARGS]...

Options:--helpShowthismessageandexit.

Commands:translateCommandtotranslateaTurkishwordtoEnglishOr you can get help for specific commands.>>>tureng-clitranslate--help

Usage:cli.pytranslate[OPTIONS]CommandtotranslateaTurkishwordtoEnglishArgs:word(str):Turkishwordn(int):Therangeofthelistoftranslatedresults

Options:-w,--wordTEXTAwordtotranslatefromTurkish.-n,--n-resultINTEGERNrowstoshow.--helpShowthismessageandexit.