p115updatedb


Namep115updatedb JSON
Version 0.0.9.2 PyPI version JSON
download
home_pagehttps://github.com/ChenyangGao/p115client/tree/main/modules/p115updatedb
Summary把 115 网盘的文件列表导出到数据库
upload_time2024-12-20 12:03:43
maintainerNone
docs_urlNone
authorChenyangGao
requires_python<4.0,>=3.12
licenseMIT
keywords python-115 updatedb
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 把 115 网盘的文件列表导出到数据库

## 安装

你可以通过 [pypi](https://pypi.org/project/p115updatedb/) 安装

```console
pip install -U p115updatedb
```

## 用法

### 模块

```python
from p115updatedb import updatedb, updatedb_one, updatedb_tree
```

另外也提供了一些工具函数,封装了一些数据库查询

```python
from p115updatedb.query import *
```

### 命令行

```console
$ p115updatedb -h
usage: p115updatedb [-h] [-cp COOKIES_PATH] [-f DBFILE] [-st AUTO_SPLITTING_THRESHOLD] [-sst AUTO_SPLITTING_STATISTICS_TIMEOUT] [-nm] [-nr]
                    [-de] [-v] [-l]
                    [dir ...]

遍历 115 网盘的目录信息导出到数据库

positional arguments:
  dir                   115 目录,可以传入多个,如果不传默认为 0
                        允许 3 种类型的目录
                            1. 整数,视为目录的 id
                            2. 形如 "/名字/名字/..." 的路径,最前面的 "/" 可以省略,本程序会尝试获取对应的 id
                            3. 形如 "根目录 > 名字 > 名字 > ..." 的路径,来自点击文件的【显示属性】,在【位置】这部分看到的路径,本程序会尝试获取对应的 id

options:
  -h, --help            show this help message and exit
  -cp COOKIES_PATH, --cookies-path COOKIES_PATH
                        cookies 文件保存路径,默认为当前工作目录下的 115-cookies.txt
  -f DBFILE, --dbfile DBFILE
                        sqlite 数据库文件路径,默认为在当前工作目录下的 f'115-{user_id}.db'
  -st AUTO_SPLITTING_THRESHOLD, --auto-splitting-threshold AUTO_SPLITTING_THRESHOLD
                        自动拆分的文件数阈值,大于此值时,自动进行拆分,如果 = 0,则总是拆分,如果 < 0,则总是不拆分,默认值 100,000(10 万)
  -sst AUTO_SPLITTING_STATISTICS_TIMEOUT, --auto-splitting-statistics-timeout AUTO_SPLITTING_STATISTICS_TIMEOUT
                        自动拆分前的执行文件数统计的超时时间(秒),大于此值时,视为文件数无穷大,如果 <= 0,视为永不超时,默认值 3
  -nm, --no-dir-moved   声明没有目录被移动或改名(但可以有目录被新增或删除),这可以加快批量拉取时的速度
  -nr, --not-recursive  不遍历目录树:只拉取顶层目录,不递归子目录
  -de, --disable-event  关闭 event 表的数据收集
  -v, --version         输出版本号
  -l, --license         输出开源协议
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ChenyangGao/p115client/tree/main/modules/p115updatedb",
    "name": "p115updatedb",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "python-115, updatedb",
    "author": "ChenyangGao",
    "author_email": "wosiwujm@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/64/e1/5c4cb17ad48611cea57f4e8b7d2804da511e53c40755ea4a807c0a561354/p115updatedb-0.0.9.2.tar.gz",
    "platform": null,
    "description": "# \u628a 115 \u7f51\u76d8\u7684\u6587\u4ef6\u5217\u8868\u5bfc\u51fa\u5230\u6570\u636e\u5e93\n\n## \u5b89\u88c5\n\n\u4f60\u53ef\u4ee5\u901a\u8fc7 [pypi](https://pypi.org/project/p115updatedb/) \u5b89\u88c5\n\n```console\npip install -U p115updatedb\n```\n\n## \u7528\u6cd5\n\n### \u6a21\u5757\n\n```python\nfrom p115updatedb import updatedb, updatedb_one, updatedb_tree\n```\n\n\u53e6\u5916\u4e5f\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5de5\u5177\u51fd\u6570\uff0c\u5c01\u88c5\u4e86\u4e00\u4e9b\u6570\u636e\u5e93\u67e5\u8be2\n\n```python\nfrom p115updatedb.query import *\n```\n\n### \u547d\u4ee4\u884c\n\n```console\n$ p115updatedb -h\nusage: p115updatedb [-h] [-cp COOKIES_PATH] [-f DBFILE] [-st AUTO_SPLITTING_THRESHOLD] [-sst AUTO_SPLITTING_STATISTICS_TIMEOUT] [-nm] [-nr]\n                    [-de] [-v] [-l]\n                    [dir ...]\n\n\u904d\u5386 115 \u7f51\u76d8\u7684\u76ee\u5f55\u4fe1\u606f\u5bfc\u51fa\u5230\u6570\u636e\u5e93\n\npositional arguments:\n  dir                   115 \u76ee\u5f55\uff0c\u53ef\u4ee5\u4f20\u5165\u591a\u4e2a\uff0c\u5982\u679c\u4e0d\u4f20\u9ed8\u8ba4\u4e3a 0\n                        \u5141\u8bb8 3 \u79cd\u7c7b\u578b\u7684\u76ee\u5f55\n                            1. \u6574\u6570\uff0c\u89c6\u4e3a\u76ee\u5f55\u7684 id\n                            2. \u5f62\u5982 \"/\u540d\u5b57/\u540d\u5b57/...\" \u7684\u8def\u5f84\uff0c\u6700\u524d\u9762\u7684 \"/\" \u53ef\u4ee5\u7701\u7565\uff0c\u672c\u7a0b\u5e8f\u4f1a\u5c1d\u8bd5\u83b7\u53d6\u5bf9\u5e94\u7684 id\n                            3. \u5f62\u5982 \"\u6839\u76ee\u5f55 > \u540d\u5b57 > \u540d\u5b57 > ...\" \u7684\u8def\u5f84\uff0c\u6765\u81ea\u70b9\u51fb\u6587\u4ef6\u7684\u3010\u663e\u793a\u5c5e\u6027\u3011\uff0c\u5728\u3010\u4f4d\u7f6e\u3011\u8fd9\u90e8\u5206\u770b\u5230\u7684\u8def\u5f84\uff0c\u672c\u7a0b\u5e8f\u4f1a\u5c1d\u8bd5\u83b7\u53d6\u5bf9\u5e94\u7684 id\n\noptions:\n  -h, --help            show this help message and exit\n  -cp COOKIES_PATH, --cookies-path COOKIES_PATH\n                        cookies \u6587\u4ef6\u4fdd\u5b58\u8def\u5f84\uff0c\u9ed8\u8ba4\u4e3a\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e0b\u7684 115-cookies.txt\n  -f DBFILE, --dbfile DBFILE\n                        sqlite \u6570\u636e\u5e93\u6587\u4ef6\u8def\u5f84\uff0c\u9ed8\u8ba4\u4e3a\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e0b\u7684 f'115-{user_id}.db'\n  -st AUTO_SPLITTING_THRESHOLD, --auto-splitting-threshold AUTO_SPLITTING_THRESHOLD\n                        \u81ea\u52a8\u62c6\u5206\u7684\u6587\u4ef6\u6570\u9608\u503c\uff0c\u5927\u4e8e\u6b64\u503c\u65f6\uff0c\u81ea\u52a8\u8fdb\u884c\u62c6\u5206\uff0c\u5982\u679c = 0\uff0c\u5219\u603b\u662f\u62c6\u5206\uff0c\u5982\u679c < 0\uff0c\u5219\u603b\u662f\u4e0d\u62c6\u5206\uff0c\u9ed8\u8ba4\u503c 100,000\uff0810 \u4e07\uff09\n  -sst AUTO_SPLITTING_STATISTICS_TIMEOUT, --auto-splitting-statistics-timeout AUTO_SPLITTING_STATISTICS_TIMEOUT\n                        \u81ea\u52a8\u62c6\u5206\u524d\u7684\u6267\u884c\u6587\u4ef6\u6570\u7edf\u8ba1\u7684\u8d85\u65f6\u65f6\u95f4\uff08\u79d2\uff09\uff0c\u5927\u4e8e\u6b64\u503c\u65f6\uff0c\u89c6\u4e3a\u6587\u4ef6\u6570\u65e0\u7a77\u5927\uff0c\u5982\u679c <= 0\uff0c\u89c6\u4e3a\u6c38\u4e0d\u8d85\u65f6\uff0c\u9ed8\u8ba4\u503c 3\n  -nm, --no-dir-moved   \u58f0\u660e\u6ca1\u6709\u76ee\u5f55\u88ab\u79fb\u52a8\u6216\u6539\u540d\uff08\u4f46\u53ef\u4ee5\u6709\u76ee\u5f55\u88ab\u65b0\u589e\u6216\u5220\u9664\uff09\uff0c\u8fd9\u53ef\u4ee5\u52a0\u5feb\u6279\u91cf\u62c9\u53d6\u65f6\u7684\u901f\u5ea6\n  -nr, --not-recursive  \u4e0d\u904d\u5386\u76ee\u5f55\u6811\uff1a\u53ea\u62c9\u53d6\u9876\u5c42\u76ee\u5f55\uff0c\u4e0d\u9012\u5f52\u5b50\u76ee\u5f55\n  -de, --disable-event  \u5173\u95ed event \u8868\u7684\u6570\u636e\u6536\u96c6\n  -v, --version         \u8f93\u51fa\u7248\u672c\u53f7\n  -l, --license         \u8f93\u51fa\u5f00\u6e90\u534f\u8bae\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "\u628a 115 \u7f51\u76d8\u7684\u6587\u4ef6\u5217\u8868\u5bfc\u51fa\u5230\u6570\u636e\u5e93",
    "version": "0.0.9.2",
    "project_urls": {
        "Homepage": "https://github.com/ChenyangGao/p115client/tree/main/modules/p115updatedb",
        "Repository": "https://github.com/ChenyangGao/p115client/tree/main/modules/p115updatedb"
    },
    "split_keywords": [
        "python-115",
        " updatedb"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "700afaea85194704f6dfeb2d2604c51bd85a71b03a1a9abdd66906bccdf2da7c",
                "md5": "9fdcd107b9e1c525c7dfbada0ac3415d",
                "sha256": "cb748ed73b0be825bf5a18d9abd452f40dfe252e955aeead4918b25ee9589826"
            },
            "downloads": -1,
            "filename": "p115updatedb-0.0.9.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9fdcd107b9e1c525c7dfbada0ac3415d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 57851,
            "upload_time": "2024-12-20T12:03:41",
            "upload_time_iso_8601": "2024-12-20T12:03:41.610782Z",
            "url": "https://files.pythonhosted.org/packages/70/0a/faea85194704f6dfeb2d2604c51bd85a71b03a1a9abdd66906bccdf2da7c/p115updatedb-0.0.9.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64e15c4cb17ad48611cea57f4e8b7d2804da511e53c40755ea4a807c0a561354",
                "md5": "10c0d98249c43651a2c44c62f8a4d94a",
                "sha256": "485a0c6aa7be919cc0efedaf423c4456725d0ad2e6c55719f117cc51315438ef"
            },
            "downloads": -1,
            "filename": "p115updatedb-0.0.9.2.tar.gz",
            "has_sig": false,
            "md5_digest": "10c0d98249c43651a2c44c62f8a4d94a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 43102,
            "upload_time": "2024-12-20T12:03:43",
            "upload_time_iso_8601": "2024-12-20T12:03:43.289012Z",
            "url": "https://files.pythonhosted.org/packages/64/e1/5c4cb17ad48611cea57f4e8b7d2804da511e53c40755ea4a807c0a561354/p115updatedb-0.0.9.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-20 12:03:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ChenyangGao",
    "github_project": "p115client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "p115updatedb"
}
        
Elapsed time: 0.40723s