Skip to main content
https://img.shields.io/pypi/v/yanico.svg https://img.shields.io/pypi/pyversions/yanico.svg https://github.com/ma8ma/yanico/workflows/CI/badge.svg

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 以降)

  • setuptools_scm

  • サードパーティ製の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

Release files for yanico 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yanico 0.3.0
File Size Uploaded
yanico-0.3.0.tar.gz 21.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yanico 0.3.0
File Interpreter ABI Platform
yanico-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.8 kB

Release files / yanico-0.3.0.tar.gz

Download URL yanico-0.3.0.tar.gz
Size 21.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c05827f11083f62187cda33a5a0a77e4c35c39dd41ae33e91ded14a64b0f261e
BLAKE2b-256 checksum
How to use checksums
236a3eed754d14f5231c3d0c9f028f575f89649fda4dd839a710cc8d443c09c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / yanico-0.3.0-py3-none-any.whl

Download URL yanico-0.3.0-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31fb4e36f2b163128bf10c64d4e338522480fb2439dd7d88596a47f928eb0585
BLAKE2b-256 checksum
How to use checksums
5fcf7a3fee3c917a181ce99c7916e8bb472c85fbb03805a797717eb48a39f883
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page