我最近发现了miniflux，一个自托管的基于网络的RSS客户端，可以安装到树莓派上。和许多人一样，当谷歌宣布将在7月1号关闭Google Reader后我也开始将个人数据迁移出来。我使用了一阵子rss2email，让它把RSS每一条目都发送到我的邮箱中。但其实我不是很喜欢这个方法，于是我花了点时间寻找Google Reader替代品并试过了rss2email之后找到了miniflux。在树莓派上安装miniflux十分简单，你只需要提前安装PHP和一个web服务器软件就好了，比如nginx或者Apache。
One of the most important uses I have for my Raspberry Pi is backing up my email. I use a program called getmail that can be used to check an email account using POP or IMAP. I have it checking my gmail and other email accounts at regular intervals with cron job. The email is saved to a mbox file that can be copied to another computer at any time for long-term email archiving. I wrote a small guide about how I do this here: How to Back Up Email with Getmail.
For a while I had a webcam connected to my Raspberry Pi and was using a program called motion to detect and capture images of movement in front of my house. motion is a powerful program that can be heavily customized/extended to do all kinds of image and video capture. I had a site set up to view the images taken by the Raspberry Pi and motion, and each image was a link to a video of the event.
I recently discovered a self-hosted, web-based RSS client called miniflux that can be installed on a Raspberry Pi. I, as many have, migrated off of Google Reader when it was announced that it would be shut down on July 1, 2013. I was using a program called rss2email for a while to send RSS feed items to my email inbox. However, I wasn't as happy with that method and I found miniflux after looking around for an alternative to Google Reader and rss2email. miniflux is very simple to set up on a Raspberry Pi. All you need is PHP and a web server program like nginx or Apache.
One of the most obvious uses for my Raspberry Pi was to host a website or three. For a while, this site was hosted on my Pi (and might be again, soon). The Pi has plenty of horsepower to handle static sites and also some using web frameworks. I've hosted Flask sites on mine and I have read about some people even installing a Wordpress instance on a Raspberry Pi. Here are a couple of tutorials to get you started:
With the very low power usage of a Raspberry Pi, it's a perfect candidate for being a NAS, or network attached storage device. I previously had a 500 GB laptop hard drive connected to the Pi (and was even running the Pi's OS on it). I would store many of the files on it that I needed to transfer between my computers. I would then connect to it via SFTP and have access to all of my media from any machine in my house (or outside of it, with the right routing). You can also set up Samba on a Raspberry Pi to make it easy for Macs and PCs to access the storage. Update: I've started using BitTorrent Sync on my Pi to replace Dropbox. It's working great and I have much more space than what I had onDropbox (2 + 19 GB bonus). You can read about setting it up here: Installing BitTorrent Sync on a Raspberry Pi.
Another use I have put my Raspberry Pi to is checking web sites that are important to me. I have written a Python script and run it at regular times to make sure these sites return a 200 status (meaning they are up). The script will email me a summary of the incident if the site is deemed to be down or inaccessible. I use a Python module calledRequests to check the site, and another called smtplib to email me.
I use my Raspberry Pi to email me about important events that I need to remember. I previously used Google Calendar, but I only needed it for simple reminders. So I substitute the functionality with my Raspberry Pi, a Python script and cron jobs. I set a cron job for the date and time I need to remember, which executes the python script and passes in a message argument. This message is sent to my email and reminds me of the event on the date that I choose.
My Raspberry Pi also hosts a private website that displays all of my family photos. I have set up authentication for the site so that only people I wish to see it can access it. This is a good replacement for placing all of your photos on Facebook, where you account can be deleted or photos viewed by strangers on accident. It's a simple PHP site that loads images from a directory on the Pi that I choose.
Since my Pi acts as a NAS, I have all of my music stored on it. I also have a set of stereo speakers connected to the audio jack on the Pi and I use mpg123 to play music from the Raspberry Pi's command line. Although there are other mp3 players out there, including graphical ones, I went with mpg123 for it's simplicity and ease of set up.
Since I don't really trust Google to sync my contacts and calendar to my phone anymore, I set up a CalDav and CardDav server on my Raspberry Pi. I use Radicale as the server (http://radicale.org/) and DavDroid on my phone as the client. Radicale is easy to set up, and you can get DavDroid for free if you use F-Droid, the alternative Android market. Now that all my contacts and events are synced to my Pi, I'm the only one that sees them, I can back them up at the filesystem, and I don't have to worry about a company deciding they would rather my use a new Calendar or Contact storage paradigm on a whim.
If you're a developer or like versioned files, you can set up your Pi to serve your git repos. All you have to do is do a
git clone --barefrom your repo's current location. Then you can access the repo at ssh://yourpi.com/absolute/path/to/repo, replacing each part of the url with your info.
I know a lot of people complain that any of these uses for the Raspberry Pi can also be applied to any other Linux machine. This is true, and I encourage you to use an old laptop to experiment with these activities. But the Pi is silent and won't show up on your electricity bill as heavily, so I think it is better suited for many of these projects.
Installing BitTorrent Sync on a Raspberry Pi
To install BitTorrent Sync on your Raspberry Pi download the ARM version and transfer it to your Pi. Next, extract it and in the folder you will find the BitTorrent Sync binary called btsync. Following BitTorrent's instructions, simply run that binary by entering `./bstync` in your Raspberry Pi's terminal.
Next, you can visit /gui on port 8888 of your Pi. So if your Pi's IP address is 192.168.1.4, visit http://192.168.1.4:8888/gui to set up the folders you want to share.
Once you select a folder to sync on the Pi, you can generate a secret string for that folder. When you enter that string in the web interface for BitTorrent Sync running on another computer, it will start syncing files from that folder on your Pi. To get BitTorrent Sync for your other computer (Windows, Linux, or Mac) go to that same download page and download the client for your machine.
BitTorrent Sync is a great replacement for Dropbox or other similar file syncing software. You also get to control the computers that your files are on with BitTorrent Sync, and aren't vulnerable to anyone deleting an account and endangering your data.
If you have any questions just ask them in the comments below and I'll help you out.