biliarchiver
Archiving tool for Bilibili based on bilix
Install
pip install biliarchiver
Usage
biliarchiver --help
Basic usage
Follow these steps to start archiving:
- Initialize a new workspace in current working directory:
biliarchiver init
- Provide cookies and tokens following instructions:
biliarchiver auth
- Download videos from BiliBili:
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.
- Upload videos to Internet Archive:
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
- Start server
biliarchiver api
- Add videos
curl -X PUT -H "Content-Type: application/json" http://127.0.0.1:8000/archive/BVXXXXXX
Develop
Install
Please use poetry to install dependencies:
poetry install
Build English locale if necessary. Refer to the last section for details.
Run
poetry run biliarchiver --help
Debug using another workspace:
poetry --directory /path/to/workspace run biliarchiver --help
Lint
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:
find biliarchiver/ -name '*.py' | xargs xgettext -d base -o biliarchiver/locales/biliarchiver.pot
Add a new language:
msginit -i biliarchiver/locales/biliarchiver.pot -o en.po -l en
Update a language:
msgmerge -U biliarchiver/locales/en/LC_MESSAGES/biliarchiver.po biliarchiver/locales/biliarchiver.pot
(Important) Build a language:
msgfmt biliarchiver/locales/en/LC_MESSAGES/biliarchiver.po -o biliarchiver/locales/en/LC_MESSAGES/biliarchiver.mo
Release files for biliarchiver 0.1.20
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| biliarchiver-0.1.20.tar.gz | 54.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| biliarchiver-0.1.20-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 129.4 kB
Release files / biliarchiver-0.1.20.tar.gz
| Download URL | biliarchiver-0.1.20.tar.gz |
|---|---|
| Size | 54.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b686be765de5c9575b795c8ad13f6718a967bbc6bcd69525cff1b6d6855b7122
|
|
BLAKE2b-256 checksum How to use checksums |
d93ff02773fd543ddabbb4b8ac8dfb628e322c8aa4d53718e0844bf41b372d32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.13.1 Linux/6.12.12-amd64
|
Release files / biliarchiver-0.1.20-py3-none-any.whl
| Download URL | biliarchiver-0.1.20-py3-none-any.whl |
|---|---|
| Size | 75.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6980ea1dbd8bebd487f73db80eed6847d960834bdc21b72dca3275fc366ef7f0
|
|
BLAKE2b-256 checksum How to use checksums |
73f7fbed9f0259eca61680486efd7bc2970f0f13fbe97e664d1f64bfc8fcc9ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.13.1 Linux/6.12.12-amd64
|