Comments (4)
On 09/11/2014 09:40 PM, hbykdx2014 wrote:
我有一个小小的想法,纵观全网,只有你可能能help me 了~~.
你帮忙开发一个展示百度网盘内容结构的软件或者插件吧~~就是软件夹套叠关系...
比如 树枝结构~~ 类似/ home var etc....
我不是搞it的,所以表达很不清楚~~希望你能明白我的意思
就是让别人清楚知道我这个盘里有什么...能自动生成关系图那就是屌爆了..
O(∩_∩)O谢谢 [email protected]等待你的回复哦~~
Reply to this email directly or view it on GitHub:
#47
像这样的?
file:///proc
|-- 1
| |-- attr
| | |-- current
| | |-- exec
| | |-- fscreate
| | |-- keycreate
| | |-- prev
| | `-- sockcreate
| |-- autogroup
| |-- auxv
| |-- cgroup
| |-- clear_refs
| |-- cmdline
| |-- comm
| |-- coredump_filter
| |-- cpuset
| |-- cwd -> (null)
| |-- environ
| |-- exe -> (null)
| |-- fd
| | [Permission denied]
| |-- fdinfo
| | [Permission denied]
| |-- gid_map
| |-- io
| |-- limits
| |-- loginuid
| |-- map_files
| | [Permission denied]
| |-- maps
| |-- mem
| |-- mountinfo
| |-- mounts
| |-- mountstats
| |-- net
from bcloud.
√,非常对~~ 能表示这种关系就行.
2014-09-11 21:58 GMT+08:00 LiuLang [email protected]:
On 09/11/2014 09:40 PM, hbykdx2014 wrote:
我有一个小小的想法,纵观全网,只有你可能能help me 了~~.
你帮忙开发一个展示百度网盘内容结构的软件或者插件吧~~就是软件夹套叠关系...
比如 树枝结构~~ 类似/ home var etc....
我不是搞it的,所以表达很不清楚~~希望你能明白我的意思
就是让别人清楚知道我这个盘里有什么...能自动生成关系图那就是屌爆了..
O(∩_∩)O谢谢 [email protected]等待你的回复哦~~
Reply to this email directly or view it on GitHub:
#47像这样的?
file:///proc
|-- 1
| |-- attr
| | |-- current
| | |-- exec
| | |-- fscreate
| | |-- keycreate
| | |-- prev
| | `-- sockcreate
| |-- autogroup
| |-- auxv
| |-- cgroup
| |-- clear_refs
| |-- cmdline
| |-- comm
| |-- coredump_filter
| |-- cpuset
| |-- cwd -> (null)
| |-- environ
| |-- exe -> (null)
| |-- fd
| | [Permission denied]
| |-- fdinfo
| | [Permission denied]
| |-- gid_map
| |-- io
| |-- limits
| |-- loginuid
| |-- map_files
| | [Permission denied]
| |-- maps
| |-- mem
| |-- mountinfo
| |-- mounts
| |-- mountstats
| |-- net—
Reply to this email directly or view it on GitHub
#47 (comment).
from bcloud.
写了一个小脚本, 使用方法是:
先安装bcloud, 然后把下面的脚本保成bcloud-tree.py, 然后在终端里运行它:
$ python3 bcloud-tree.py
会弹出登录窗口, 登录后就自动遍历你的网盘目录, 并将内容输入到终端, 你也可以将输出的内容重定向到一个文件里, 比如:
$ python3 bcloud-tree.py > my-bcloud-tree
如果需要, 也可以自定义输入格式, 只需要修改一下tree()函数就行了.
#!/usr/bin/env python3
# Copyright (C) 2014 LiuLang <[email protected]>
# Use of this source code is governed by GPLv3 license that can be found
# in http://www.gnu.org/licenses/gpl-3.0.html
'''
Traverse directories of Baidu Pan
'''
import sys
from gi.repository import Gtk
from bcloud import gutil
from bcloud import pcs
from bcloud.SigninDialog import SigninDialog
class App(object):
def __init__(self):
self.app = Gtk.Application.new('org.liulang.bcloud_tree', 0)
self.app.connect('startup', self.on_app_startup)
self.app.connect('activate', self.on_app_activate)
self.app.connect('shutdown', self.on_app_shutdown)
self.profile = None
def run(self):
self.app.run([])
def on_app_startup(self, app):
self.window = Gtk.ApplicationWindow.new(app)
self.window.set_default_size(200, 200)
self.app.add_window(self.window)
self.label = Gtk.Label()
self.label.set_text('Signin ...')
self.window.add(self.label)
def on_app_activate(self, app):
self.window.show_all()
dialog = SigninDialog(self, auto_signin=False)
dialog.run()
dialog.destroy()
if self.cookie and self.tokens:
self.label.set_text('Fetching directory tree now...')
gutil.async_call(self.tree, callback=self.on_list_dir_finished)
else:
self.label.set_text('Failed to sign in')
def on_app_shutdown(self, app):
pass
def tree(self, parent='/', indent=0):
parent_, files = pcs.list_dir_all(self.cookie, self.tokens, parent)
indent_str = ' ' * indent
for file_ in files:
suf = '/' if file_['isdir'] else ''
print(indent_str, file_['server_filename'], suf, sep='')
if file_['isdir']:
self.tree(file_['path'], indent + 2)
def on_list_dir_finished(self, *args):
self.label.set_text('Finished!')
if __name__ == '__main__':
app = App()
app.run()
from bcloud.
钦佩,感激[?]
On Fri, Sep 12, 2014 at 1:04 PM, LiuLang [email protected] wrote:
写了一个小脚本, 使用方法是:
先安装bcloud, 然后把下面的脚本保成bcloud-tree.py, 然后在终端里运行它:
$ python3 bcloud-tree.py
会弹出登录窗口, 登录后就自动遍历你的网盘目录, 并将内容输入到终端, 你也可以将输出的内容重定向到一个文件里, 比如:
$ python3 bcloud-tree.py > my-bcloud-tree
如果需要, 也可以自定义输入格式, 只需要修改一下tree()函数就行了.#!/usr/bin/env python3
Copyright (C) 2014 LiuLang [email protected]
Use of this source code is governed by GPLv3 license that can be found
in http://www.gnu.org/licenses/gpl-3.0.html
'''
Traverse directories of Baidu Pan
'''import sys
from gi.repository import Gtk
from bcloud import gutil
from bcloud import pcs
from bcloud.SigninDialog import SigninDialogclass App(object):
def __init__(self): self.app = Gtk.Application.new('org.liulang.bcloud_tree', 0) self.app.connect('startup', self.on_app_startup) self.app.connect('activate', self.on_app_activate) self.app.connect('shutdown', self.on_app_shutdown) self.profile = None def run(self): self.app.run([]) def on_app_startup(self, app): self.window = Gtk.ApplicationWindow.new(app) self.window.set_default_size(200, 200) self.app.add_window(self.window) self.label = Gtk.Label() self.label.set_text('Signin ...') self.window.add(self.label) def on_app_activate(self, app): self.window.show_all() dialog = SigninDialog(self, auto_signin=False) dialog.run() dialog.destroy() if self.cookie and self.tokens: self.label.set_text('Fetching directory tree now...') gutil.async_call(self.tree, callback=self.on_list_dir_finished) else: self.label.set_text('Failed to sign in') def on_app_shutdown(self, app): pass def tree(self, parent='/', indent=0): parent_, files = pcs.list_dir_all(self.cookie, self.tokens, parent) indent_str = ' ' * indent for file_ in files: suf = '/' if file_['isdir'] else '' print(indent_str, file_['server_filename'], suf, sep='') if file_['isdir']: self.tree(file_['path'], indent + 2) def on_list_dir_finished(self, *args): self.label.set_text('Finished!')
if name == 'main':
app = App()
app.run()—
Reply to this email directly or view it on GitHub
#47 (comment).
from bcloud.
Related Issues (20)
- 我想改成黑色主题 请问配置完自动登陆后如何改黑色
- 无法上传
- 无法登陆,显示无法获取bdstoken HOT 26
- 执行python3 setup.py报错 HOT 1
- 验证码(Verification)输入后点击ok无反映,点击刷新则一直卡在刷新环节上 HOT 8
- ERROR SigninDialog.on_post_login: (5, None), None 无法登陆 HOT 22
- 登录提示错误 HOT 3
- 求更新~~~ HOT 1
- 验证码对的,但是提示错误 HOT 1
- Failed to get bdstoken! HOT 2
- 请教一下如何使用IPV6下载
- setup安装后,运行不了 HOT 1
- 在DEBIAN9下安装bcloud_3.8.2-1_all.deb HOT 2
- bcloud-gui运行不了 HOT 4
- 打开下载文件后,客户端卡死
- 转址陷入无线循环导致无法取得token HOT 1
- 能否提高最大连接数? HOT 3
- 获取dbstoken失败
- bcloud找不到下载地址,一直下载失败
- 登录不进去
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bcloud.