biliarchiver


Namebiliarchiver JSON
Version 0.1.12 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2024-06-15 16:39:10
maintainerNone
docs_urlNone
authoryzqzss
requires_python<4.0,>=3.9
licenseNone
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/0a/bf/27f684ba14812799440ba5d8c963f130703ab6fced4146468c68fed20771/biliarchiver-0.1.12.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": null,
    "version": "0.1.12",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f9ee24a2c9200828691828bb17be95f432c8e29785d8f4d39bc2af337a0fbf68",
                "md5": "17d41cca20daea83dd2d5b8c73950cb3",
                "sha256": "33986e6b887d470f2965e0fe4904ab72036179f4d0ea105cbf6db64ca7659965"
            },
            "downloads": -1,
            "filename": "biliarchiver-0.1.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "17d41cca20daea83dd2d5b8c73950cb3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 62594,
            "upload_time": "2024-06-15T16:39:08",
            "upload_time_iso_8601": "2024-06-15T16:39:08.560329Z",
            "url": "https://files.pythonhosted.org/packages/f9/ee/24a2c9200828691828bb17be95f432c8e29785d8f4d39bc2af337a0fbf68/biliarchiver-0.1.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0abf27f684ba14812799440ba5d8c963f130703ab6fced4146468c68fed20771",
                "md5": "deb74f0bac2f00bce18709cf804efdf8",
                "sha256": "2c54ca863a6344554d12abeb53649ea01a60436c25370e30e8a73c67ffdc2121"
            },
            "downloads": -1,
            "filename": "biliarchiver-0.1.12.tar.gz",
            "has_sig": false,
            "md5_digest": "deb74f0bac2f00bce18709cf804efdf8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 47836,
            "upload_time": "2024-06-15T16:39:10",
            "upload_time_iso_8601": "2024-06-15T16:39:10.583095Z",
            "url": "https://files.pythonhosted.org/packages/0a/bf/27f684ba14812799440ba5d8c963f130703ab6fced4146468c68fed20771/biliarchiver-0.1.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-15 16:39:10",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "biliarchiver"
}
        
Elapsed time: 1.28649s