Yet Another Niconico-douga Command-line Interface
Project description
Yet Another Niconico-douga Command-line Interface
Description
yanico は Apache 2.0 ライセンスで公開されている ニコニコ動画 にアクセスするためのCUIコマンドです。 メインコマンド yan (yanico の先頭3文字)に続けて サブコマンドを指定することで機能を実行します。 機能を集めることができる CUIコマンドを目標にゆっくり開発していきます。 パッケージに含むREADME等のドキュメントは日本語で先に書いていきます。
Feature
yan コマンドの体系は git や mercurial のようなサブコマンドの集合です。
ログインのセッション情報などはブラウザから取得します。
Firefoxのセッション情報を取得します。
他のブラウザへの対応は未定です。
コマンドからログインする機能は今のところ未定です。
Python と setuptools の知識が必要ですが、 ユーザーが 独自にコマンドを追加 することができます。
Requirement
Python (バージョン3.10以降)
pip (バージョン10以降)
setuptools (バージョン 61.0.0 以降)
サードパーティ製のHTTPライブラリ(予定)
Install
PYPI のリリース版をインストールする:
$ pip install yanico
リポジトリ の最新版をインストールする:
$ pip install git+https://github.com/ma8ma/yanico
Usage
ホームディレクトリに設定ファイル .yanico.conf を置きます。 [session] セクションに実行時に使用するセッション情報を読み込む ブラウザのタイプ type と プロファイルのパス profile を設定してください。
設定例:
$ cat <<EOF >~/.yanico.conf [session] type = firefox profile = /home/user/path/to/firefox/profile EOF
コマンド例:
$ yan subcommand arg1 arg2
Development
開発に使う追加のツールをインストールする:
$ pip install yanico[dev]
Testing
テストを行うには pytest を実行する:
$ pytest
コードカバレッジ( coverage )を計測して結果を表示する:
$ coverage run -m pytest $ coverage report
Code check
コードをチェックするには pylint を実行する:
$ pylint setup.py tests/ yanico/
Type check
型をチェックするには mypy を実行する:
$ mypy yanico/
Code formatting
ソースコードを整形するには black を実行する:
$ black .
What’s New
v0.3.0 (2025-12-23)
Python 3.9のサポートを終了しました。
v0.2.0 (2024-12-31)
Python 3.8のサポートを終了しました。
user_session を直接指定するセッションタイプ __token__ を追加しました。
以前のバージョンでの変更は CHANGES.ja.md を見てください。
TODO
コマンドを追加する方法のドキュメントを書く (v1.0.0までには書く)
Copyright (C) 2015-2025 Masayuki Yamamoto
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yanico-0.3.0.tar.gz.
File metadata
- Download URL: yanico-0.3.0.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c05827f11083f62187cda33a5a0a77e4c35c39dd41ae33e91ded14a64b0f261e
|
|
| MD5 |
fb5096e13e8d09322614a8e15b85f658
|
|
| BLAKE2b-256 |
236a3eed754d14f5231c3d0c9f028f575f89649fda4dd839a710cc8d443c09c5
|
File details
Details for the file yanico-0.3.0-py3-none-any.whl.
File metadata
- Download URL: yanico-0.3.0-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31fb4e36f2b163128bf10c64d4e338522480fb2439dd7d88596a47f928eb0585
|
|
| MD5 |
5fa323f97d18ce1f4199f9735273b5e4
|
|
| BLAKE2b-256 |
5fcf7a3fee3c917a181ce99c7916e8bb472c85fbb03805a797717eb48a39f883
|