如何使用Linux终端更新Twitter

时间:2024-04-04 18:33:18
如何使用Linux终端更新Twitter

Twitter has become an addicting, fun distraction for many of us. But since it’s mostly a text only media, why not tweet while you’re working in the Linux terminal? Score some geek points, and tweet the Linux geek’s way.

Twitter已成为我们许多人上瘾,有趣的干扰。 但是,由于它主要是纯文本的媒体,为什么在Linux终端中工作时不发推文呢? 取得一些极客点,并用鸣叫Linux极客的方式。

如何使用Linux终端更新Twitter

Twidge is a simple Twitter client for the Linux command line. There are other command line Twitter clients, but Twidge is simple to use and easy to install, where many others have not been updated since Twitter changed authorization, and therefore do not work. The Twidge project can be found here, at github.

Twidge是Linux命令行的简单Twitter客户端。 还有其他命令行Twitter客户端,但是Twidge易于使用且易于安装,自Twitter更改授权以来,其中许多未更新,因此无法正常工作。 Twidge项目可以在github上找到。

如何使用Linux终端更新Twitter

The github wiki page has links to source, Debian and Arch Linux Packages. Choose whichever suits you, suited for whatever distro of Linux you happen to be running. We’ll be downloading the Debian package and installing it into Ubuntu. Here’s two ways to install Twidge.

github Wiki页面包含指向源,Debian和Arch Linux软件包的链接。 选择适合您的,适合您运行Linux发行版。 我们将下载Debian软件包并将其安装到Ubuntu中。 这是安装Twidge的两种方法。

选项1:添加存储库并通过命令行安装 (Option 1: Add Repositories and Install Via Command Line)

如何使用Linux终端更新Twitter

If you prefer, you can edit your repositories by opening up a Terminal and running:

如果愿意,可以通过打开终端并运行以下命令来编辑存储库:

$ sudo gedit /etc/apt/sources.list

$ sudo gedit /etc/apt/sources.list

The current repository you’ll have to add in your sources.list is for “squeeze” the current stable release. Copy it from here, if you dislike typing.

您必须在sources.list中添加的当前存储库用于“压缩”当前的稳定版本。 如果您不喜欢打字,请从这里复制。

deb http://ftp.de.debian.org/debian squeeze main

deb http://ftp.de.debian.org/debian squeeze main

Save this repository to your sources.list to be able to download Twidge. In order to install from the command line, run:

将此存储库保存到您的sources.list中,以能够下载Twidge。 为了从命令行安装,请运行:

$ sudo apt-get update

$ sudo apt-get更新

$ sudo apt-get install twidge

$ sudo apt-get install twidge

Twidge will be ready to run. If you prefer to install in a more Windows-user friendly method by downloading the Debian package, read the next step.

Twidge将准备运行。 如果您希望通过下载Debian软件包以Windows用户更友好的方式进行安装,请阅读下一步。

选项2:下载并安装Debian软件包 (Option 2: Download and Install the Debian Package)

如何使用Linux终端更新Twitter

Assuming you’re using Ubuntu, you should find the links to the Debian packages on the Twidge wiki front page. As of this posting, the current version is “squeeze,” so navigate to that via the link below.

假设您使用的是Ubuntu,则应在Twidge Wiki主页上找到Debian软件包的链接。 在发布时,当前版本为“ squeeze”,因此请通过下面的链接导航至该版本。

如何使用Linux终端更新Twitter

Many different architectures are available. Most readers are probably i386 or amd64, although there’s a good chance most of you Linux geeks already know that. Download the appropriate architecture from any mirror that suits you.

有许多不同的体系结构可用。 大多数读者可能是i386或amd64,尽管您中的大多数Linux极有可能已经知道这一点。 从适合您的任何镜像下载适当的体系结构。

如何使用Linux终端更新Twitter

Simply double-click the package to install.

只需双击该软件包即可安装。

如何使用Linux终端更新Twitter

Easy enough. Keep in mind that installing this way means you cannot pull updates from the repository, so if there’s a major update to Twidge, you’ll have to download and reinstall yourself.

很简单。 请记住,以这种方式安装意味着您不能从存储库中获取更新,因此,如果Twidge有重要更新,则必须下载并重新安装。

设置向导 (Setting Up Twidge)

如何使用Linux终端更新Twitter

Open up a terminal. We’ll need to run the setup for Twidge, which is a simple, if not obvious command.

打开一个终端。 我们需要运行Twidge的安装程序,这是一个简单的命令,即使不是很明显的命令。

$ twidge setup

$ twidge设置

如何使用Linux终端更新Twitter

Twidge runs an authorization, generating a secure link to a page where Twitter authorizes the application. Click it to open it in your browser.

Twidge运行授权,从而生成指向Twitter授权应用程序页面的安全链接。 单击它以在浏览器中将其打开。

如何使用Linux终端更新Twitter

Another easy step. Input your username and password, and click authorize.

另一个简单的步骤。 输入您的用户名和密码,然后单击授权。

如何使用Linux终端更新Twitter

You’ll get a PIN to copy into your terminal where it requests it.

您将获得一个PIN码,以将其复制到您的终端中。

如何使用Linux终端更新Twitter

Simply type or paste the key from your browser into your terminal window shown above.

只需将**从浏览器中键入或粘贴到上面显示的终端窗口中即可。

如何使用Linux终端更新Twitter

And you’ve set up Twidge. In order to learn the ropes, don’t be afraid to read the man page:

并且您已经设置了Twidge。 为了学习绳索,请不要害怕阅读手册页:

$ man twidge

$男子

发送第一条推文 (Sending That First Tweet)

如何使用Linux终端更新Twitter

You can always update your Twitter with your newly authenticated client by using the following command:

您始终可以使用以下命令使用新认证的客户端更新Twitter:

$ twidge update

$ twidge更新

And then typing your 140 character update, as shown above.

然后输入140个字符的更新,如上所示。

如何使用Linux终端更新Twitter

Likewise, you can check your @replies with the command:

同样,您可以使用以下命令检查@replies:

$ twidge lsreplies

$ twidge lsreplies

如何使用Linux终端更新Twitter

And this is the command to see the most recent updates from your timeline:

这是从您的时间轴查看最新更新的命令:

$ twidge lsrecent

$ twidge lsrecent

如何使用Linux终端更新Twitter

However, this is LINUX! Why waste time typing long commands when you can create aliases in your .bashrc file and save yourself the hassle?

但是,这是LINUX! 当您可以在.bashrc文件中创建别名并省去麻烦时,为什么还要浪费时间键入长命令?

$ sudo gedit ~/.bashrc

$ sudo gedit〜/ .bashrc

Then add:

然后加:

alias tweet=”twidge update”

别名tweet =“更新更新”

alias replies=”twidge lsreplies”

别名replies =“ twidge lsreplies”

alias recent=”twidge lsrecent”

别名最近=“ twistge lsrecent”

Then save and close your gedit window. The aliases “tweet,” “replies,” and “recent” will do in place of the normal versions in the man page for Twidge.

然后保存并关闭您的gedit窗口。 别名“ tweet”,“ reply”和“ recent”将代替Twidge手册页中的常规版本。

如何使用Linux终端更新Twitter

Your tweets appear, easily sent via the command line. Enjoy using your Terminal to tell everybody about your breakfast!

出现您的推文,可通过命令行轻松发送。 享受使用终端向大家介绍早餐的乐趣!

翻译自: https://www.howtogeek.com/62018/how-to-use-the-linux-terminal-to-update-twitter/

相关文章