尤达:你的linux系统命令行个人助理-买球官网平台

admin 19 0

尤达:你的linux系统命令行个人助理-第1张图片-过客财经网_国内财经资讯信息门户网站

编译自:3359 www . ostechnix.com/yoda-the-command-line-personal-assistant-for-your-linux-system/作者:sk

译者:amwps290

不久前,我们推出了一款名为“betty”的命令行虚拟助手[1]。今天偶然发现一个类似的实用程序,叫做“yoda”。yoda是一个命令行个人助理,可以帮助你完成linux中一些琐碎的任务。这是一个用python编写的免费开源应用程序。在本指南中,我们将学习如何在gnu/linux中安装和使用yoda。

尤达需要python 2和pip。如果您的linux中没有安装pip,请参考以下指南进行安装。只要安装了python2-pip。yoda可能不支持python 3。

如何使用pip [2]管理python包

注:建议你试试python虚拟环境下的yoda。不仅是yoda,任何python应用程序都应该在虚拟环境中尝试,这样它们就不会干扰全球安装的软件包。您可以按照上面链接中“创建虚拟环境”一节中的描述来设置虚拟环境。

在您的系统上安装pip之后,使用下面的命令克隆yoda库。

$ git clone https://github.com/yoda-pa/yoda上述命令将在当前工作目录下创建一个名为yoda的目录,并克隆其中的所有内容。转到yoda目录:

$ cd yoda/运行以下命令安装yoda应用程序。

$ pip安装。请注意最后一个点(。).现在,将下载并安装所有必需的软件包。

00-1010首先,设置配置以在本地系统上保存您的信息。

运行以下命令:

$ yoda设置新填写以下问题:

输入你的名字: senthil kumar

你的电子邮件id是什么?

[电子邮件受保护]

你的github用户名是什么?

沙王

输入您的github密码:

密码:

您的配置应该存储在哪里?(默认: ~/。尤达/)

配置文件已经存在。确定要覆盖它吗?(是/否)

y

你的密码加密后保存在配置文件里,不用担心。

要检查当前配置,请运行:

$ yoda setup check你会看到下面的输出。

姓名: [email protected]

github用户名: sk

默认情况下,您的信息存储在~/中。尤达目录。

要删除现有配置,请执行以下操作:

$ yoda安装删除

yoda包含一个简单的聊天机器人。您可以使用下面的聊天命令与之互动。

$ yoda chat你是谁示例输出:

尤达说话:我是虚拟特工

$ yoda chat你好

yoda speaks:

我过得很好。谢谢!

kquote>

以下是我们可以用 yoda 做的事情:


让我们问一下 yoda 关于互联网速度的问题。运行:


$ yoda speedtest

speed test results:


ping: 108.45 ms


download: 0.75 mb/s


upload: 1.95 mb/s


yoda 还有助于缩短任何网址:


$ yoda url shorten https://www.ostechnix.com/

here's your shortened url:


https://goo.gl/hvw6u0


要展开缩短的网址:


$ yoda url expand https://goo.gl/hvw6u0

here's your original url:


https://www.ostechnix.com/


我是 hacker news 网站的常客。 如果你像我一样,你可以使用 yoda 从下面的 hacker news 网站阅读新闻。


$ yoda hackernews

news-- 1/513


title-- show hn: a yelp for ios developers


description-- i came up with this idea "a yelp for developers" when talking with my colleagues. my hypothesis is that, it would be very helpful if we know more about a library before choosing to use it. it's similar to that we want to know more about a restaurant by checki…


url-- https://news.ycombinator.com/item?id=16636071


continue? [press-"y"]


yoda 将一次显示一个项目。 要阅读下一条新闻,只需输入 y 并按下回车。


我们也可以保留个人日记以记录重要事件。


使用命令创建一个新的日记:


$ yoda diary nn

input your entry for note:


today i learned about yoda


要创建新笔记,请再次运行上述命令。


查看所有笔记:


$ yoda diary notes

today's notes:


----------------


time | note


--------|-----


16:41:41| today i learned about yoda


不仅仅是笔记,yoda 还可以帮助你创建任务。


要创建新任务,请运行:


$ yoda diary nt

input your entry for task:


write an article about yoda and publish it on ostechnix


要查看任务列表,请运行:


$ yoda diary tasks

today's agenda:


----------------


status | time | text


-------|---------|-----


o | 16:44:03: write an article about yoda and publish it on ostechnix


----------------


summary:


----------------


incomplete tasks: 1


completed tasks: 0


正如你在上面看到的,我有一个未完成的任务。 要将其标记为已完成,请运行以下命令并输入已完成的任务序列号并按下回车键:


$ yoda diary ct

today's agenda:


----------------


number | time | task


-------|---------|-----


1 | 16:44:03: write an article about yoda and publish it on ostechnix


enter the task number that you would like to set as completed


1


您可以随时使用命令分析当前月份的任务:


$ yoda diary analyze

percentage of incomplete task : 0


percentage of complete task : 100


frequency of adding task (task/day) : 3


有时候,你可能想要记录一个关于你爱的或者敬佩的人的个人资料。


首先,您需要设置配置来存储朋友的详细信息。 请运行:


$ yoda love setup

输入你的朋友的详细信息:


enter their name:

abdul kalam


enter sex(m/f):


m


where do they live?


rameswaram


要查看此人的详细信息,请运行:


$ yoda love status

{'place': 'rameswaram', 'name': 'abdul kalam', 'sex': 'm'}


要添加你的爱人的生日:


$ yoda love addbirth

enter birthday


15-10-1931


查看生日:


$ yoda love showbirth

birthday is 15-10-1931


你甚至可以添加关于该人的笔记:


$ yoda love note

avul pakir jainulabdeen abdul kalam better known as a. p. j. abdul kalam, was the 11th president of india from 2002 to 2007.


您可以使用命令查看笔记:


$ yoda love notes

notes:


1: avul pakir jainulabdeen abdul kalam better known as a. p. j. abdul kalam, was the 11th president of india from 2002 to 2007.


你也可以写下这个人喜欢的东西:


$ yoda love like

add things they like


physics, aerospace


want to add more things they like? [y/n]


n


要查看他们喜欢的东西,请运行:


$ yoda love likes

likes:


1: physics, aerospace


您不需要单独的工具来维护您的财务支出。 yoda 会替您处理好。


首先,使用命令设置您的金钱支出配置:


$ yoda money setup

输入您的货币代码和初始金额:


enter default currency code:

inr


{u'usd': 0.015338, u'idr': 211.06, u'bgn': 0.024436, u'isk': 1.5305, u'ils': 0.053402, u'gbp': 0.010959, u'dkk': 0.093063, u'cad': 0.020041, u'mxn': 0.28748, u'huf': 3.8873, u'ron': 0.058302, u'myr': 0.060086, u'sek': 0.12564, u'sgd': 0.020208, u'hkd': 0.12031, u'aud': 0.019908, u'chf': 0.014644, u'krw': 16.429, u'cny': 0.097135, u'try': 0.06027, u'hrk': 0.092986, u'nzd': 0.021289, u'thb': 0.47854, u'eur': 0.012494, u'nok': 0.11852, u'rub': 0.88518, u'jpy': 1.6332, u'czk': 0.31764, u'brl': 0.050489, u'pln': 0.052822, u'php': 0.79871, u'zar': 0.1834}



indian rupee


enter initial amount:


10000


要查看金钱配置,只需运行:


$ yoda money status

{'initial_money': 10000, 'currency_code': 'inr'}


让我们假设你买了一本价值 250 卢比的书。 要添加此费用,请运行:


$ yoda money exp

spend 250 inr on books


output:


要查看花费,请运行:


$ yoda money exps

2018-03-21 17:12:31 inr 250 books


创建一个新的想法:


$ yoda ideas add --task
  • 随机文章

  • 热门文章

  • 热评文章

发表评论 (已有0条评论)

还木有评论哦,快来抢沙发吧~