由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
PDA版 - PogoPlug安装Dropbox攻略(部分原创)
相关主题
坑爹的pogoplug可怜的卫东 又被狗狗骗了
25GB skydrive for Iphone and Android请教:不需要Google+账户,如何上传视频到YOUTUBE?
云存储不就是个网上存储嘛?到底有啥用啊?不要说没提醒你们,圣座来了!
怎样同步照片 (从手机到电脑)Pogoplug Pro POGO-P21 咋样?
问下大家给父母share photo用什么pogoplug archlinux+samba
推荐用 Dropbox 分享照片超方便刷pogoplug要多大的U盘?
电视盒看网盘视频和照片硬盘插在pogoplug上面连上路由器,用什么软件能在android板上直接放里面的电影?
what is the best android app that do things as air video on iOS?pogoplug E02 装debian重启失败,求助! (转载)
相关话题的讨论汇总
话题: app话题: dropbox话题: pogo110话题: done话题: uploading
进入PDA版参与讨论
1 (共1页)
E**a
发帖数: 275
1
掌中宝外设,JR上19.99那个P21 black实际上是E02。
发信人: Exia (漂流瓶), 信区: Hardware
标 题: PogoPlug安装Dropbox攻略(部分原创)
发信站: BBS 未名空间站 (Sat Dec 1 06:05:21 2012, 美东)
初衷:原本想用pogoplug架个surveillance webcam,然后把video stream和snapshots
自动上传到dropbox(之所以用dropbox,是因为这个不需要安装客户端,其他的软件俺
暂时没找到解决方案). 用lsusb和hwinfo都能看到我的6年老的logitech quickcam pro
for notebook,但motion始终无法打开/dev/video0,用ls /dev/video*查看竟然无
video device,真tm奇怪。
下面姑且把dropbox搞定:
1. 下载dropbox_uploader的bash script(这个非原创,非常赞的script)
https://github.com/andreafabrizi/Dropbox-Uploader
这个bash script不需要你的dropbox的账号密码
2. 解压上传到Pogoplug里某个文件夹,e.g., /mnt/DropboxUl,其中包含Readme和
dropbox_uploader.sh
3. 首次运行并设置Dropbox帐号关联:
-----------------------------------------------------------------------
root@Pogo:/mnt/DropboxUl# ./dropbox_uploader.sh info
This is the first time you run this script.
Please open this URL from your Browser, and access using your account:
-> https://www2.dropbox.com/developers/apps
If you haven't already done, click "Create an App" and fill in the
form with the following data:
App name: MyUploader123456789
Description: What do you want...
Access level: App folder or Full Dropbox
Now, click on the "Create" button.
When your new App is successfully created, please type the
App Key, App Secret and the Access level:
# App key: ***************
# App secret: ***************
# Access level you have chosen, App folder or Full Dropbox [a/f]: a
> App key is ***************, App secret is *************** and Access level
is App Folder, it's ok? [y/n]y
> Token request... OK
Please visit this URL from your Browser, and allow Dropbox Uploader
to access your DropBox account:
--> https://www2.dropbox.com/1/oauth/authorize?oauth_token=***************
Press enter when done...
> Access Token request... OK
Setup completed!
-----------------------------------------------------------------------
4. 测试文件上传
-----------------------------------------------------------------------
root@Pogo:/mnt/DropboxUl# ./dropbox_uploader.sh upload /media/pogo110/lsusb.
txt /public/lsusb.txt
> Uploading /media/pogo110/lsusb.txt to /public/lsusb.txt...
############################################################ 100.0%
> DONE
因为我在首次运行时设置上传的根目录是App folder而非Full Dropbox(安全起见),并
且我把App folder重命名为PogoPlug,所以我的例子里上传的文件是在:
Dropbox/Apps/PogoPlug/public/lsusb.txt
-----------------------------------------------------------------------
5. 批量上传
下面是我写的批量上传的bash script:startdpul.sh,我把它扔到/mnt目录下
####################################
#!/bin/bash
for file in /media/pogo110/*.txt;
do
/mnt/DropboxUl/dropbox_uploader.sh upload "${file}" /pub/$(basename "${file}
");
done;
#######################################
上述代码是把/media/pogo110/目录下的所有.txt文件上传到dropbox/Apps/PogoPlug/
下的pub目录下,以下是演示结果
-----------------------------------------------------------------------
root@Pogo:/# /mnt/startdpul.sh
> Uploading /media/pogo110/cpuinfo.txt to /pub/cpuinfo.txt...
############################################################ 100.0%
> DONE
> Uploading /media/pogo110/fdisk.txt to /pub/fdisk.txt...
############################################################ 100.0%
> DONE
> Uploading /media/pogo110/hdinfo.txt to /pub/hdinfo.txt...
############################################################ 100.0%
> DONE
> Uploading /media/pogo110/hwinfo.txt to /pub/hwinfo.txt...
############################################################ 100.0%
> DONE
> Uploading /media/pogo110/ipconfig.txt to /pub/ipconfig.txt...
############################################################ 100.0%
> DONE
> Uploading /media/pogo110/kernel.txt to /pub/kernel.txt...
############################################################ 100.0%
> DONE
> Uploading /media/pogo110/lsusb.txt to /pub/lsusb.txt...
############################################################ 100.0%
> DONE
> Uploading /media/pogo110/meminfo.txt to /pub/meminfo.txt...
############################################################ 100.0%
> DONE
-----------------------------------------------------------------------
你可以把文件夹下的所以文件都上传了,比如*.*。
俺还不会连子目录一起上传,请大侠指点。
6. 定时上传
这个需要写个cron script,比如
startdpul.cron:
30 20 * * * /mnt/startdpul.sh
这个是每天晚上8:30自动上传,更多cron的例子:
e.g.
01 * * * * root echo "This command is run at one min past every hour"
17 8 * * * root echo "This command is run daily at 8:17 am"
17 20 * * * root echo "This command is run daily at 8:17 pm"
00 4 * * 0 root echo "This command is run at 4 am every Sunday"
* 4 * * Sun root echo "So is this"
42 4 1 * * root echo "This command is run 4:42 am every 1st of the month"
01 * 19 07 * root echo "This command is run hourly on the 19th of July"
7. 自动检测文件更新上传,这个俺不会,请大侠指点
8. 参考文献:
Squeezebox server:
http://rustybytes.com/2011/02/16/setup-your-pogoplug-as-a-squeezebox-server/

Motion:
http://www.youtube.com/watch?v=rzrXJLdNHwM&feature=related
PogoWeather的例子,但没有具体的tutorial:
http://davysweather.dyndns.org/
n*********n
发帖数: 5605
2


snapshots
pro

【在 E**a 的大作中提到】
: 掌中宝外设,JR上19.99那个P21 black实际上是E02。
: 发信人: Exia (漂流瓶), 信区: Hardware
: 标 题: PogoPlug安装Dropbox攻略(部分原创)
: 发信站: BBS 未名空间站 (Sat Dec 1 06:05:21 2012, 美东)
: 初衷:原本想用pogoplug架个surveillance webcam,然后把video stream和snapshots
: 自动上传到dropbox(之所以用dropbox,是因为这个不需要安装客户端,其他的软件俺
: 暂时没找到解决方案). 用lsusb和hwinfo都能看到我的6年老的logitech quickcam pro
: for notebook,但motion始终无法打开/dev/video0,用ls /dev/video*查看竟然无
: video device,真tm奇怪。
: 下面姑且把dropbox搞定:

1 (共1页)
进入PDA版参与讨论
相关主题
pogoplug E02 装debian重启失败,求助! (转载)问下大家给父母share photo用什么
pogoplug不错啊推荐用 Dropbox 分享照片超方便
刚才搂了一眼,S4提供的1TB云存储是free的吗?电视盒看网盘视频和照片
pogoplug 变砖了,求救!!what is the best android app that do things as air video on iOS?
坑爹的pogoplug可怜的卫东 又被狗狗骗了
25GB skydrive for Iphone and Android请教:不需要Google+账户,如何上传视频到YOUTUBE?
云存储不就是个网上存储嘛?到底有啥用啊?不要说没提醒你们,圣座来了!
怎样同步照片 (从手机到电脑)Pogoplug Pro POGO-P21 咋样?
相关话题的讨论汇总
话题: app话题: dropbox话题: pogo110话题: done话题: uploading