如何使用ThinkUp存档,搜索和查看推文统计信息

Worried about archiving your tweets? Want a more powerful search? Want to see your tweet statistics? You can do all of that and more by installing ThinkUp on your home server.

担心将您的推文存档? 想要更强大的搜索? 想查看您的推文统计信息吗? 您可以通过在家庭服务器上安装ThinkUp来完成所有这些以及更多操作。

ThinkUp is a brilliant application (currently in beta) that will archive all of your tweets, your replies, responses, etc. so that you can search through them and find out some helpful usage statistics. It has quite a few plugins, including one that adds full Facebook support, too.

ThinkUp是一个出色的应用程序(当前处于Beta版),它将存档您的所有推文,答复,响应等,以便您可以搜索它们并查找一些有用的使用情况统计信息。 它有很多插件,其中包括一个完全支持Facebook的插件。

It’s designed to be installed on a LAMP server; that is, Linux, Apache, MySQL, and PHP is what will provide the backbone for it. While it’s possible to install it on a Windows– or Mac-based machine, it’s most easily handled in Linux, so we’ll be using Ubuntu to show you how to get it up and running. It’s in very active development by the founder, Gina Trapani, and by many users in the community.

它被设计为安装在LAMP服务器上。 也就是说,Linux,Apache,MySQL和PHP将为其提供支撑。 尽管可以将其安装在Windows基于Mac的计算机上 ,但在Linux中最容易处理,因此我们将使用Ubuntu来向您展示如何启动和运行它。 创始人Gina Trapani和社区中的许多用户都在积极地进行开发。

先决条件 (Prerequisites)

ThinkUp is currently in beta, so there will be some bugs and things may not go perfectly, so unless you’re interested in tinkering (and maybe helping out by submitting bug reports), this may not be for you. Firstly, you’ll need to have a LAMP server up and running, and we’re going to assume you’ve got that set up already. You’ll need a personal MySQL user account already set up, too. Finally, the mail function in PHP should be working, which means you’ll need an program or script that can send mail, but if not, we’ve got you covered.

ThinkUp当前处于测试阶段,因此会出现一些错误,并且可能无法完美运行,因此,除非您对修补(并可能通过提交错误报告有所帮助)感兴趣,否则可能不适合您。 首先,您需要启动并运行LAMP服务器,我们将假定您已经完成了设置。 您还需要已设置一个个人MySQL用户帐户。 最后,PHP中的mail函数应该可以正常工作,这意味着您将需要一个可以发送邮件的程序或脚本,但是如果没有,我们将为您服务。

Okay, to begin, we’ll need to install some extra stuff that may not already be installed, such as cURL and GD. To do that, just enter the following command:

好的,首先,我们需要安装一些可能尚未安装的其他东西,例如cURL和GD。 为此,只需输入以下命令:

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl php5-gd

须藤apt-get install curl libcurl3 libcurl3-dev php5-curl php5-gd

00 reqs

Enter your password, and let it install. To finish this off, you’ll have to restart the Apache server:

输入您的密码,然后安装。 要完成此操作,您必须重新启动Apache服务器:

sudo /etc/init.d/apache2 restart

sudo /etc/init.d/apache2重新启动

Alternatively, you can use:

或者,您可以使用:

sudo service apache2 restart

sudo服务apache2重新启动

00 restart apache

Keep your terminal window open, because you may need to switch back to it often to change some things.

保持终端窗口处于打开状态,因为您可能需要经常切换回该窗口以进行某些更改。

发送邮件 (SendMail)

As noted above, you will need something that can send mail on your server itself. If you don’t, there’s a really easy fix for it. Just install sendmail with the following command:

如上所述,您将需要一些可以在服务器本身上发送邮件的东西。 如果您不这样做,那么有一个非常简单的解决方法。 只需使用以下命令安装sendmail:

sudo apt-get install sendmail

须藤apt-get install sendmail

Then, we need to edit the php.ini file to point to the newly installed program.

然后,我们需要编辑php.ini文件以指向新安装的程序。

sudo nano /etc/php5/apache2/php.ini

须藤纳米/etc/php5/apache2/php.ini

Hit the page down key until you find something that looks like this:

按下页面向下键,直到找到如下所示的内容:

;sendmail_path =

; sendmail_path =

You need to delete the initial semicolon, and append the path at the end. Change that line so it looks like this:

您需要删除初始分号,并在末尾附加路径。 更改该行,使其如下所示:

sendmail_path =  /usr/sbin/sendmail -t –i

sendmail_path = / usr / sbin / sendmail -t –i

To save, hit CTRL+O, and enter. If prompted to overwrite, hit Y. Then exit with CTRL+X.

要保存,请按CTRL + O,然后输入。 如果提示您覆盖,请按Y。然后使用CTRL + X退出。

Lastly, restart Apache, like we did in the last section. This will provide your server with the ability to send mail, which we’ll need in a little while to activate our ThinkUp account.

最后,像上一节中一样重新启动Apache。 这将为您的服务器提供发送邮件的功能,我们需要一点时间来激活我们的ThinkUp帐户。

安装ThinkUp (Installing ThinkUp)

Head on over to the ThinkUp GitHub page to download ThinkUp (currently beta version 0.8). Once you’ve got it downloaded, pop this command in the terminal to extract it to your default web directory:

前往ThinkUp GitHub页面下载ThinkUp(当前为beta版本0.8)。 下载完毕后,在终端中弹出以下命令以将其解压缩到默认的Web目录:

sudo unzip path/to/thinkup-0.8.zip –d /var/www

sudo解压缩路径/to/thinkup-0.8.zip –d / var / www

01 unzip

This will automatically create a directory called “thinkup” in /var/www.

这将在/ var / www中自动创建一个名为“ thinkup”的目录。

To access ThinkUp, open up a web browser and navigate to either one of the following:

要访问ThinkUp,请打开Web浏览器并导航至以下任一位置:

http://localhost/thinkup

http:// localhost / thinkup

http://your.internalip.address/thinkup

http://your.internalip.address/thinkup

02 thinkup in web browser

Odds are that you’ll get that error message due to incorrect permissions. You can just enter that command in a terminal to fix the issue.

奇怪的是,由于权限不正确,您将收到该错误消息。 您只需在终端中输入该命令即可解决此问题。

03 chown

Then, refresh your browser page.

然后,刷新您的浏览器页面。

04 browser again

Click the “installing ThinkUp” link to begin the initial configuration. You’ll see the requirements screen.

单击“安装ThinkUp”链接以开始初始配置。 您会看到需求屏幕。

05 all reqs met

You should be good to go. Scroll down and click the button to continue.

你应该很好。 向下滚动并单击按钮继续。

06 setting up

You’ll have to enter a valid email address, create a password, and set a time zone. Those are the easy options. The tougher ones come next.

您必须输入有效的电子邮件地址,创建密码并设置时区。 这些是简单的选择。 下一个更难对付的人。

  • Database Host: Here, put in your hostname, or if it’s on your private server, just type in “localhost”

    数据库主机:在这里,输入您的主机名,或者如果它在您的私有服务器上,只需键入“ localhost”
  • Database Name: Enter a name for the database that ThinkUp will use for its data. It will be created if it doesn’t exist.

    数据库名称:输入ThinkUp将用于其数据的数据库的名称。 如果不存在,它将被创建。
  • User Name: Your MySQL account username.

    用户名:您MySQL帐户用户名。
  • Password: Your MySQL account password.

    密码:您MySQL帐户密码。

Then click the button to continue. You may see a message like this:

然后单击按钮继续。 您可能会看到以下消息:

08 create config file

Just enter the two commands in a terminal to create the config file and change ownership of it.

只需在终端中输入两个命令即可创建配置文件并更改其所有权。

09 created config term

After clicking the button, you’ll see a message with a green background saying that installation was successful and that an email was sent to activate your account. Log in to your email, click the link (being sure that the IP/domain name is correct), and you’ll see a nice green “activated” message.

单击按钮后,您将看到绿色背景的消息,表明安装成功,并且已发送一封电子邮件以激活您的帐户。 登录到您的电子邮件,单击链接(确保IP /域名正确),您将看到绿色的“已激活”消息。

09 activated

Enter your credentials and log in!

输入您的凭据并登录!

配置ThinkUp (Configuring ThinkUp)

Once you’re in, you’ll see that you don’t have any accounts set up yet. Click the link to change that.

进入后,您会看到尚未设置任何帐户。 单击链接以进行更改。

10 click setup account

By default, it’ll ask you to add a Twitter account. Scroll down to where it says “Configure the Twitter Plugin” and follow the steps to register ThinkUp on Twitter.

默认情况下,它将要求您添加一个Twitter帐户。 向下滚动到显示“配置Twitter插件”的位置,然后按照以下步骤在Twitter上注册ThinkUp。

Be aware that you may have to change your callback URL to point to your external IP or a DNS alias. Twitter should give you some extra information: consumer and secret keys.

请注意,您可能必须将回调URL更改为指向您的外部IP或DNS别名。 Twitter应该给您一些额外的信息:使用者密钥和秘密密钥。

image

Be careful with these, as they are unique to this application’s interaction with your specific Twitter account! Enter these keys in your ThinkUp configuration.

请注意这些,因为它们是该应用程序与您的特定Twitter帐户交互所特有的! 在您的ThinkUp配置中输入这些密钥。

Next, click on “Show Advanced Options” towards the bottom to reveal this:

接下来,单击底部的“显示高级选项”以显示以下内容:

image

You can up the values like I did. Once configuration is complete, ThinkUp will use a crawler to get your info from Twitter. By increasing these error toleration and other values, we’ll be able to get more and more data each crawl. When you’re done, click the “Save” button, and scroll up. You’ll see another button that says “Authorize ThinkUp on Twitter”.  Click it.

您可以像我一样增加值。 配置完成后,ThinkUp将使用搜寻器从Twitter获取您的信息。 通过提高这些错误容忍度和其他值,我们将能够在每次爬网中获取越来越多的数据。 完成后,单击“保存”按钮,然后向上滚动。 您将看到另一个按钮,显示“在Twitter上授权ThinkUp”。 点击它。

image

It will redirect you to Twitter, where you just need to click the “Allow” button, and then it should send you back to ThinkUp.

它会将您重定向到Twitter,在这里您只需要单击“允许”按钮,然后它将使您回到ThinkUp。

13 set to public

When you scroll up, you’ll see your account listed under “Twitter Plugin” and if you can make your stats public by click the “Set to public” button. This will make it so that you don’t have to log in to see all of your stats when you go to http://localhost/thinkup in the future.

向上滚动时,您会在“ Twitter插件”下看到您的帐户,并且如果可以通过单击“设置为公开”按钮将统计信息公开。 这样一来,以后您在访问http:// localhost / thinkup时就不必登录即可查看所有统计信息。

通过Cron搜寻数据 (Crawling for Data via Cron)

We need to get some data into ThinkUp. Click the ThinkUp logo, or just go to your ThinkUp main page. Click on any of the stats listed in the menu on the left.

我们需要向ThinkUp中获取一些数据。 单击ThinkUp徽标,或仅转到您的ThinkUp主页。 单击左侧菜单中列出的任何统计信息。

image

You’ll see that there’s nothing available, but you will see a link that says “Update your data now.”

您会看到没有可用的内容,但是会看到一个链接,显示“立即更新数据”。

Clicking it will take you to another page where you can see the attempts made my ThinkUp to grab data off of Twitter for you. This is the previously mentioned crawler.

单击它会将您带到另一个页面,您可以在其中看到我的ThinkUp尝试为您从Twitter获取数据的尝试。 这是前面提到的搜寻器。

If you scroll down, you’ll see a handy suggestion.

如果向下滚动,则会看到一个方便的建议。

14 automate crawler

That command at the bottom? We can automate that in Linux via something called cron. Switch back to your terminal and enter the following command:

底部的命令? 我们可以在Linux中通过称为cron的方式使之自动化。 切换回您的终端并输入以下命令:

crontab –e

crontab –e

15 crontab edit

It’ll ask you to choose a text editor. Nano is great for beginners, and it’s what we used earlier on, so hit 2 to make that the default.

它将要求您选择一个文本编辑器。 Nano非常适合初学者,这是我们之前使用的功能,因此请按2使其成为默认值。

16 editing crontab

Each of the five columns up top represents time periods to repeat on: minutes, hours, day of the month, month, and day of the week. Entering a number will set those values, while entering an asterisk will ignore that criterion. Above, you see I have entered:

顶部的五列中的每一列都代表要重复的时间段:分钟,小时,一个月中的某天,一个月和一周中的某天。 输入数字将设置这些值,而输入星号将忽略该条件。 在上方,您看到我已经输入:

34 * * * *

34 * * * *

That means that every hour at the 34 minute mark, it will execute a command. Which command? Why, the one ThinkUp suggested, of course!

这意味着每小时在34分钟标记处,它将执行一条命令。 哪个命令? 为什么,一个ThinkUp建议,当然!

cd /var/www/thinkup/crawler/;export THINKUP_PASSWORD=yourpassword; /usr/bin/phpcrawl.php your@email.com

cd / var / www / thinkup / crawler /; export THINKUP_PASSWORD =您的密码; /usr/bin/phpcrawl.php your@email.com

Be sure to make sure you enter your password and check the email address in this command! This will make sure that every hour ThinkUp refreshes itself to get new data. If you want to use more elaborate criteria for your crawler, I suggest starting with the Cron How-To from the Ubuntu Community Documentation. Hit CTRL+O to save, and then CTRL+X to exit.

请确保在此命令中输入密码并检查电子邮件地址! 这将确保ThinkUp每小时刷新一次以获取新数据。 如果您想对爬虫使用更详尽的标准,建议从Ubuntu社区文档中Cron How-To开始 。 按CTRL + O保存,然后按CTRL + X退出。

Twitter统计 (Twitter Statistics)

In addition to just archiving all of your tweets, replies, and other information into a MySQL database, you get to see a lot of interesting statistics. You can see your usage of specific clients, how much you reply compared to how much you tweet, how many followers you have, which of those are most followed, and much more.

除了将所有推文,回复和其他信息归档到MySQL数据库之外,您还会看到很多有趣的统计信息。 您可以查看特定客户的使用情况,与发推文相比要回复多少,您有多少关注者,关注最多的关注者等等。

18 main statistics

ThinkUp also pulls out some useful information for you, such as all posts that mention you, mentions that are not replies or forwards, and full conversations.

ThinkUp还会为您提取一些有用的信息,例如所有提及您的帖子,不是答复或转发的提及以及完整的对话。

17 all mentions

At the bottom, you can also see how ThinkUp pulls out lists of links that appear in your tweets, pictures that appear in your tweets, and more.

在底部,您还可以查看ThinkUp如何提取出现在推文中的链接列表,出现在推文中的图片等。

image

And, of course, you can search through any of these categories by clicking the search link.

而且,当然,您可以通过单击搜索链接来搜索所有这些类别。

image

You’ll get a great search window that’s pared down to text.

您会得到一个很好的搜索窗口,可以将其简化为文本。

image


ThinkUp provides a lot of functionality with Twitter, but its Facebook plug-in is just as powerful. Once you configure ThinkUp, you can even let your friends create accounts so they can use it, too! In addition to preservation, you can also use ThinkUp to track answers to questions you post and filter out useful information from your entire timeline. It helps a lot when you’re Twitter feed is ridiculously busy or there’s a lot of following going on.

ThinkUp通过Twitter提供了许多功能,但其Facebook插件功能同样强大。 一旦配置了ThinkUp,您甚至可以让您的朋友创建帐户,以便他们也可以使用它! 除了保留之外,您还可以使用ThinkUp跟踪发布的问题的答案,并从整个时间轴中筛选出有用的信息。 当您的Twitter feed异常繁忙或有很多后续活动时,它会很有帮助。

翻译自: https://www.howtogeek.com/howto/42260/how-to-archive-search-and-view-your-tweet-statistics-with-thinkup/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值