百度云盘:python版本。。
下载地址:
https://github.com/houtianze/bypy
我的云盘分享:
链接: http://pan.baidu.com/s/1mgFqTJy 密码: yusy
1. 下载相应的源
2.进入相应路径.
查看readme. 查看指导。按说明安装 sudo pip install requests.
如果提示安装pip就先按提示安装python pip。
3.装好后。
sudo ./byty.py list
(第一次登陆)会提示个网址,把网址打开进入,登陆你的百度云盘,提取访问码。返回终端把码复制进去就可以了。。
再输入。 sudo ./byty.py list
就可以看到列表了。。
4.命令安装:
sudo ./setup.py build
sudo ./setup.py install
具体遇到问题以命令提示为参考慢慢解决。~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
操作说明:
agv@yhzhao:~$ bypy.py syncup /home/agv/Desktop/petrobot /petrobot
注:远程云盘地址的书写 在'/apps/bypy'下。。只需要写云盘 {我的应用数据/pyby}路径下的地址。。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5.具体的你按照说明。。另外附上相应指令说明。
agv@agv:~/000_yhzhao$ ./bypy.py help
Token file: '/home/agv/.bypy.json'
Hash Cache file: '/home/agv/.bypy.pickle'
App root path at Baidu Yun '/apps/bypy'
sys.stdin.encoding = UTF-8
sys.stdout.encoding = UTF-8
----
usage: bypy.py [-h] [--TESTRUN] [--PROFILE] [-V] [-d] [-v] [-r RETRY]
[-q QUIT] [-t TIMEOUT] [-s SLICE] [--chunk CHUNK] [-e] [-f]
[-l LISTFILE] [--resume-download RESUMEDL]
[--include-regex INCREGEX] [--on-dup ONDUP] [--no-symlink]
[--disable-ssl-check] [-c]
[command [command ...]]
bypy -- Python client for Baidu Yun
https://www.gnu.org/licenses/gpl-3.0.txt
bypy is a Baidu Yun client written in Python (2.7).
positional arguments:
command operations (quota / list)
optional arguments:
-h, --help show this help message and exit
--TESTRUN Perform python doctest [default: False]
--PROFILE Profile the code [default: False]
-V, --version show program's version number and exit
-d, --debug enable debugging & logging [default: 0]
-v, --verbose set verbosity level [default: 0]
-r RETRY, --retry RETRY
number of retry attempts on network error [default: 5
times]
-q QUIT, --quit-when-fail QUIT
quit when maximum number of retry failed [default:
False]
-t TIMEOUT, --timeout TIMEOUT
network timeout in seconds [default: 60]
-s SLICE, --slice SLICE
size of file upload slice (can use '1024', '2k',
'3MB', etc) [default: 20 MB]
--chunk CHUNK size of file download chunk (can use '1024', '2k',
'3MB', etc) [default: 20 MB]
-e, --verify Verify upload / download [default : False]
-f, --force-hash force file MD5 / CRC32 calculation instead of using
cached values [default: False]
-l LISTFILE, --list-file LISTFILE
input list file (used by some of the commands only
[default: None]
--resume-download RESUMEDL
resume instead of restarting when downloading if local
file already exists [default: True]
--include-regex INCREGEX
regular expression of files to include. if not
specified (default), everything is included. for
download, the regex applies to the remote files; for
upload, the regex applies to the local files. to
exclude files, think about your regex, some tips here:
https://*.com/questions/406230/regular-
expression-to-match-string-not-containing-a-word
[default: ]
--on-dup ONDUP what to do when the same file / folder exists in the
destination: 'overwrite', 'skip', 'prompt' [default:
overwrite]
--no-symlink DON'T follow symbol links when uploading / syncing up
[default: True]
--disable-ssl-check DON'T verify host SSL cerificate [default: True]
-c, --clean 1: clean settings (remove the token file) 2: clean
settings and hash cache [default: 0]
Commands:
help command - provide some information for the command
cleancache - remove invalid entries from hash cache file
combine <remotefile> [md5s] [localfile] - try to create a file at PCS by combining slices, having MD5s specified
compare [remotedir] [localdir] - compare the remote direcotry with the local directory
copy/cp <from> <to> - copy a file / dir remotely at Baidu Yun
delete/remove/rm <remotepath> - delete a file / dir remotely at Baidu Yun
downdir <remotedir> [localdir] - download a remote directory (recursively)
downfile <remotefile> [localpath] - download a remote file.
dumpcache - display file hash cache
list/ls [remotepath] [format] [sort] [order] - list the 'remotepath' directory at Baidu PCS
listrecycle [start] [limit] - list the recycle contents
meta <remotepath> [format] - get information of the given path (dir / file) at Baidu Yun.
mkdir <remotedir> - create a directory at Baidu Yun
move/mv/rename/ren <from> <to> - move a file / dir remotely at Baidu Yun
quota/info - displays the quota information
refreshtoken - refresh the access token
restore <remotepath> - restore a file from the recycle bin
search <keyword> [remotepath] [recursive] - search for a file using keyword at Baidu Yun
stream <remotefile> <localpipe> [format] [chunk] - stream a video / audio file converted to M3U format at cloud side, to a pipe.
syncdown [remotedir] [localdir] [deletelocal] - sync down from the remote direcotry to the local directory
syncup [localdir] [remotedir] [deleteremote] - sync up from the local direcotry to the remote directory
upload [localpath] [remotepath] [ondup] - upload a file or directory (recursively)