Coder Social home page Coder Social logo

dist_bhpan's Introduction

本项目提供了上传、下载、管理北航网盘文件的命令行工具,适合在无GUI的服务器上使用

# Anyshare API 参考 https://developers.aishutech.com/openDoc/product/2/version/3/doc/15

# 安装
python setup.py install



# 第一次运行会提示登录
# 凭据存储路径   windows: AppData/Roaming/bhpan   linux: ~/.local/share/bhpan
# 存储的是用北航网盘提供的公钥加密的密码,如果不想存储登录凭据,每次手动输入,那么请在凭据存储路径下的config.json中把"store_password"改为false


# ls
bhpan ls [远程文件/文件夹]
#(可用home表示文档根目录)
bhpan ls home -h



# upload
bhpan upload [本地文件/文件夹] [远程文件夹]



# download
bhpan download [远程文件/文件夹] [本地文件夹]



# rm
bhpan rm [远程文件/文件夹]



# cat
bhpan cat [远程文件]
# 可pipe
bhpan cat home/xxx.txt | tail



# mv rm 和linux下类似
# 重命名
bhpan mv home/test.png home/test2.png
# 移动(home/dir2/dir3必须存在)
bhpan mv home/dir1/test.png home/dir2/dir3
# 移动并重命名
bhpan mv home/dir1/test.png home/dir2/dir3/test2.png
# -f 覆盖


# mkdir可直接创建多级路径
bhpan mkdir home/test/1/2/3



# link 外链分享

# 查看文件上的外链
bhpan link show [远程文件/文件夹]

# 开启/修改
# 启用密码 -p 
# 允许上传 --allow-upload 
# 禁止预览 --no-download
# --expires [过期天数]
bhpan link create [远程文件/文件夹]

# 停止分享
bhpan link delete [远程文件/文件夹]

dist_bhpan's People

Contributors

xdedss avatar

Stargazers

 avatar Dbettkk avatar  avatar Crindzebra Sjimo avatar  avatar Junhao Xu avatar Hyggge avatar  avatar Jialu Zhang avatar Noietch avatar Zifu Zhang avatar 邓宇凡(Yufan Deng) avatar Jingyi Xu avatar Xiancheng, Sun avatar gyc_beauty avatar  avatar Bob Yue avatar  avatar  avatar  avatar  avatar LongZhenren avatar Eros avatar Toby Shi avatar ᡥᠠᡳᡤᡳᠶᠠ ᡥᠠᠯᠠ·ᠨᡝᡴᠣ 猫 avatar cjeen avatar Hao Geng avatar Chenguang Du avatar Sharklet avatar gavin avatar

Watchers

 avatar Toby Shi avatar

dist_bhpan's Issues

无法登录

安装完成后,运行bhpan test,错误如下:

raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='bhpan.buaa.edu.cn', port=443): Max retries exceeded with url: /api/v1/auth1/getnew (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))

北航云盘更新了,目前的这个仓库好像暂时用不了,可以麻烦更新一下代码吗

更新以后可以正常安装并登陆,但以后输入bhpan ls home 会出现如下报错:

Traceback (most recent call last):
  File "/mnt/d/miniconda3/bin/bhpan", line 33, in <module>
    sys.exit(load_entry_point('bhpan==0.0.2', 'console_scripts', 'bhpan')())
  File "/mnt/d/miniconda3/lib/python3.10/site-packages/bhpan-0.0.2-py3.10.egg/pancli/pancli.py", line 650, in main
  File "/mnt/d/miniconda3/lib/python3.10/site-packages/bhpan-0.0.2-py3.10.egg/pancli/pancli.py", line 560, in <lambda>
  File "/mnt/d/miniconda3/lib/python3.10/site-packages/bhpan-0.0.2-py3.10.egg/pancli/pancli.py", line 228, in list_dir
  File "/mnt/d/miniconda3/lib/python3.10/site-packages/bhpan-0.0.2-py3.10.egg/pancli/utils/api_manager.py", line 137, in get_resource_info_by_path
  File "/mnt/d/miniconda3/lib/python3.10/site-packages/bhpan-0.0.2-py3.10.egg/pancli/utils/api.py", line 93, in post_json
pancli.utils.api.ApiException: api returned HTTP 404
{"errcode":404024,"errmsg":"路径不存在","causemsg":""}

之前用的好好的,突然参数不合法

pancli.utils.api.ApiException: api returned HTTP 400
{"causemsg":"参数 (path) 的值无效(错误提供者:EFSHttpServer,
错误值:16777222,错误位置:ncEFSDirHandlerV1.cpp:344)","errcode":400002,"errmsg":"参数不合法。"}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.