Name | biliarchiver JSON |
Version |
0.1.16
JSON |
| download |
home_page | None |
Summary | Archiving tool for Bilibili based on bilix |
upload_time | 2024-11-30 05:30:46 |
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
pnpx gpt-po sync --po biliarchiver/locales/en/LC_MESSAGES/biliarchiver.po --pot 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/00/11/fb01a1b4ee6dc5b5b51926307b66b7646ee1b7cd4d0e8b69f57187bfc989/biliarchiver-0.1.16.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\npnpx gpt-po sync --po biliarchiver/locales/en/LC_MESSAGES/biliarchiver.po --pot 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.16",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7658227e7bc8905e4ab805208fdb0e942e33a4895960391827c5d5416bbc9647",
"md5": "da2c5d0b4f867500ec5009f1bfba2a8c",
"sha256": "553d87865da8641b58932915a1ac71a76ce5a4b7cfdcdc57cafffccc1b3f0f60"
},
"downloads": -1,
"filename": "biliarchiver-0.1.16-py3-none-any.whl",
"has_sig": false,
"md5_digest": "da2c5d0b4f867500ec5009f1bfba2a8c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 63441,
"upload_time": "2024-11-30T05:30:19",
"upload_time_iso_8601": "2024-11-30T05:30:19.172697Z",
"url": "https://files.pythonhosted.org/packages/76/58/227e7bc8905e4ab805208fdb0e942e33a4895960391827c5d5416bbc9647/biliarchiver-0.1.16-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0011fb01a1b4ee6dc5b5b51926307b66b7646ee1b7cd4d0e8b69f57187bfc989",
"md5": "cce7db2185ea688d5c76a26c17688af3",
"sha256": "54aa7768aec615320b08cdc10d61304b95409f6729cd04415b451b3d54dcc57d"
},
"downloads": -1,
"filename": "biliarchiver-0.1.16.tar.gz",
"has_sig": false,
"md5_digest": "cce7db2185ea688d5c76a26c17688af3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 49101,
"upload_time": "2024-11-30T05:30:46",
"upload_time_iso_8601": "2024-11-30T05:30:46.885942Z",
"url": "https://files.pythonhosted.org/packages/00/11/fb01a1b4ee6dc5b5b51926307b66b7646ee1b7cd4d0e8b69f57187bfc989/biliarchiver-0.1.16.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-30 05:30:46",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "biliarchiver"
}