Name | biliarchiver JSON |
Version |
0.1.18
JSON |
| download |
home_page | None |
Summary | Archiving tool for Bilibili based on bilix |
upload_time | 2024-12-12 16:36:20 |
maintainer | None |
docs_url | None |
author | yzqzss |
requires_python | <4.0,>=3.9 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# biliarchiver
> Archiving tool for Bilibili based on bilix
[![PyPI version](https://badge.fury.io/py/biliarchiver.svg)](https://badge.fury.io/py/biliarchiver)
## Install
```bash
pip install biliarchiver
```
## Usage
```bash
biliarchiver --help
```
### Basic usage
Follow these steps to start archiving:
1. Initialize a new workspace in current working directory:
```bash
biliarchiver init
```
2. Provide cookies and tokens following instructions:
```bash
biliarchiver auth
```
3. Download videos from BiliBili:
```bash
biliarchiver down --bvids BVXXXXXXXXX
```
- This command also accepts a list of BVIDs or path to a file. Details can be found in `biliarchiver down --help`.
4. Upload videos to Internet Archive:
```bash
biliarchiver up --bvids BVXXXXXXXXX
```
- This command also accepts a list of BVIDs or path to a file. Details can be found in `biliarchiver up --help`.
### Rest API
1. Start server
```bash
biliarchiver api
```
2. Add videos
```bash
curl -X PUT -H "Content-Type: application/json" http://127.0.0.1:8000/archive/BVXXXXXX
```
## Develop
### Install
Please use poetry to install dependencies:
```sh
poetry install
```
Build English locale if necessary. Refer to the last section for details.
### Run
```sh
poetry run biliarchiver --help
```
Debug using another workspace:
```sh
poetry --directory /path/to/workspace run biliarchiver --help
```
### Lint
```sh
poetry run ruff check .
```
### i18n
To generate and build locales, you need a GNU gettext compatible toolchain. You can install `mingw` and use `sh` to enter a bash shell on Windows.
Generate or update `biliarchiver.pot`:
```sh
find biliarchiver/ -name '*.py' | xargs xgettext -d base -o biliarchiver/locales/biliarchiver.pot
```
Add a new language:
```sh
msginit -i biliarchiver/locales/biliarchiver.pot -o en.po -l en
```
Update a language:
```sh
msgmerge -U biliarchiver/locales/en/LC_MESSAGES/biliarchiver.po biliarchiver/locales/biliarchiver.pot
```
**(Important)** Build a language:
```sh
msgfmt biliarchiver/locales/en/LC_MESSAGES/biliarchiver.po -o biliarchiver/locales/en/LC_MESSAGES/biliarchiver.mo
```
Raw data
{
"_id": null,
"home_page": null,
"name": "biliarchiver",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "yzqzss",
"author_email": "yzqzss@yandex.com",
"download_url": "https://files.pythonhosted.org/packages/4e/e9/ad54068524fc9382dfdef6e5267e71f91eb139cd27927c1ebb73203cc3c5/biliarchiver-0.1.18.tar.gz",
"platform": null,
"description": "# biliarchiver\n\n> Archiving tool for Bilibili based on bilix\n\n[![PyPI version](https://badge.fury.io/py/biliarchiver.svg)](https://badge.fury.io/py/biliarchiver)\n\n## Install\n\n```bash\npip install biliarchiver\n```\n\n## Usage\n\n```bash\nbiliarchiver --help\n```\n\n### Basic usage\n\nFollow these steps to start archiving:\n\n1. Initialize a new workspace in current working directory:\n\n```bash\nbiliarchiver init\n```\n\n2. Provide cookies and tokens following instructions:\n\n```bash\nbiliarchiver auth\n```\n\n3. Download videos from BiliBili:\n\n```bash\nbiliarchiver down --bvids BVXXXXXXXXX\n```\n\n- This command also accepts a list of BVIDs or path to a file. Details can be found in `biliarchiver down --help`.\n\n4. Upload videos to Internet Archive:\n\n```bash\nbiliarchiver up --bvids BVXXXXXXXXX\n```\n\n- This command also accepts a list of BVIDs or path to a file. Details can be found in `biliarchiver up --help`.\n\n### Rest API\n\n1. Start server\n\n```bash\nbiliarchiver api\n```\n\n2. Add videos\n\n```bash\ncurl -X PUT -H \"Content-Type: application/json\" http://127.0.0.1:8000/archive/BVXXXXXX\n```\n\n## Develop\n\n### Install\n\nPlease use poetry to install dependencies:\n\n```sh\npoetry install\n```\n\nBuild English locale if necessary. Refer to the last section for details.\n\n### Run\n\n```sh\npoetry run biliarchiver --help\n```\n\nDebug using another workspace:\n\n```sh\npoetry --directory /path/to/workspace run biliarchiver --help\n```\n\n### Lint\n\n```sh\npoetry run ruff check .\n```\n\n### i18n\n\nTo generate and build locales, you need a GNU gettext compatible toolchain. You can install `mingw` and use `sh` to enter a bash shell on Windows.\n\nGenerate or update `biliarchiver.pot`:\n\n```sh\nfind biliarchiver/ -name '*.py' | xargs xgettext -d base -o biliarchiver/locales/biliarchiver.pot\n```\n\nAdd a new language:\n\n```sh\nmsginit -i biliarchiver/locales/biliarchiver.pot -o en.po -l en\n```\n\nUpdate a language:\n\n```sh\nmsgmerge -U biliarchiver/locales/en/LC_MESSAGES/biliarchiver.po biliarchiver/locales/biliarchiver.pot\n```\n\n**(Important)** Build a language:\n\n```sh\nmsgfmt biliarchiver/locales/en/LC_MESSAGES/biliarchiver.po -o biliarchiver/locales/en/LC_MESSAGES/biliarchiver.mo\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Archiving tool for Bilibili based on bilix",
"version": "0.1.18",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a15a4b0ff9bbb7f687c764de6d1c8da3efb8ee4e2013ab3aa2547ed30ccb6dd7",
"md5": "44aaa691be105335de31f1027cdc073f",
"sha256": "57c7f346fbcc9f584704b40174aac5ff2ad0a20c3c923f911d300d8cd1b46696"
},
"downloads": -1,
"filename": "biliarchiver-0.1.18-py3-none-any.whl",
"has_sig": false,
"md5_digest": "44aaa691be105335de31f1027cdc073f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 63932,
"upload_time": "2024-12-12T16:36:17",
"upload_time_iso_8601": "2024-12-12T16:36:17.445575Z",
"url": "https://files.pythonhosted.org/packages/a1/5a/4b0ff9bbb7f687c764de6d1c8da3efb8ee4e2013ab3aa2547ed30ccb6dd7/biliarchiver-0.1.18-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4ee9ad54068524fc9382dfdef6e5267e71f91eb139cd27927c1ebb73203cc3c5",
"md5": "3c404534e74cae0783a10c7e8ae45ad6",
"sha256": "3260ad17179339d4aeda2284cefe800f0485194b129d57c3bbabad977d8140ea"
},
"downloads": -1,
"filename": "biliarchiver-0.1.18.tar.gz",
"has_sig": false,
"md5_digest": "3c404534e74cae0783a10c7e8ae45ad6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 49200,
"upload_time": "2024-12-12T16:36:20",
"upload_time_iso_8601": "2024-12-12T16:36:20.299323Z",
"url": "https://files.pythonhosted.org/packages/4e/e9/ad54068524fc9382dfdef6e5267e71f91eb139cd27927c1ebb73203cc3c5/biliarchiver-0.1.18.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-12 16:36:20",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "biliarchiver"
}