Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

BGmi is a cli tool for subscribed bangumi.

Project Description

BGmi is a cli tool for subscribed bangumi.

TODO

Empty as my wallet.

Update Log

  • Search / Download bangumi filter by regex
  • Download specified episode
  • Transmission-rpc support
  • Remove aria2 download method
  • Followed Bangumis Calendar for iOS / Android
  • Bugs fixed

Feature

  • Subscribe/unsubscribe bangumi
  • Bangumi calendar
  • Bangumi episode information
  • Download bangumi by subtitle group
  • Web page to view all subscribed bangumi
  • RSS feed for uTorrent
  • Play bangumi online with danmaku
  • Download bangumi by specified keywords (included and excluded).
  • BGmi have supported Windows now

Installation

For Mac OS X / Linux / Windows:

git clone https://github.com/RicterZ/BGmi
cd BGmi
python setup.py install

Or use pip:

pip install bgmi

Usage of bgmi

Show bangumi calendar:

bgmi cal all

Subscribe bangumi:

bgmi add "Re:CREATORS" "夏目友人帐 陆" "进击的巨人 season 2"
bgmi add "樱花任务" --episode 0

Unsubscribe bangumi:

bgmi delete --name "Re:CREATORS"

Update bangumi database which locates at ~/.bgmi/bangumi.db defaultly:

bgmi update --download
bgmi update "从零开始的魔法书" --download 2 3
bgmi update "时钟机关之星" --download

Set up the bangumi subtitle group filter and fetch entries:

bgmi list
bgmi fetch "Re:CREATORS"
bgmi filter "Re:CREATORS" --subtitle "DHR動研字幕組,豌豆字幕组" --include 720P --exclude BIG5
bgmi fetch "Re:CREATORS"
# remove subtitle, include and exclude keyword filter and add regex filter
bgmi filter "Re:CREATORS" --subtitle "" --include "" --exclude "" --regex
bgmi filter "Re:CREATORS" --regex "(DHR動研字幕組|豌豆字幕组).*(720P)"
bgmi fetch "Re:CREATORS"

Search bangumi and download:

bgmi search '为美好的世界献上祝福!' --regex-filter '.*动漫国字幕组.*为美好的世界献上祝福!].*720P.*'
# download
bgmi search '为美好的世界献上祝福!' --regex-filter '.*合集.* --download

Modify bangumi episode:

bgmi list
bgmi mark "Re:CREATORS" 1

Manage download items:

bgmi download --list
bgmi download --list --status 0
bgmi download --mark 1 --status 2

Status code:

  • 0 - Not downloaded items
  • 1 - Downloading items
  • 2 - Downloaded items

Show BGmi configure and modify it:

bgmi config
bgmi config ARIA2_RPC_TOKEN 'token:token233'

Fields of configure file:

BGmi configure: + BANGUMI_MOE_URL: url of bangumi.moe mirror + BGMI_SAVE_PATH: bangumi saving path + DOWNLOAD_DELEGATE: the ways of downloading bangumi (aria2-rpc, transmission-rpc, xunlei) + MAX_PAGE: max page for fetching bangumi information + BGMI_TMP_PATH: just a temporary path + DANMAKU_API_URL: url of danmaku api + CONVER_URL: url of bangumi’s cover + LANG: language

Aria2-rpc configure: + ARIA2_RPC_URL: aria2c deamon RPC url + ARIA2_RPC_TOKEN: aria2c deamon RPC token(“token:” for no token)

Xunlei configure: + XUNLEI_LX_PATH: path of xunlei-lixian binary

Transmission-rpc configure: + TRANSMISSION_RPC_URL: transmission rpc host + TRANSMISSION_RPC_PORT: transmission rpc port

Usage of bgmi_http

Start BGmi HTTP Service bind on 0.0.0.0:8888:

bgmi_http --port=8888 --address=0.0.0.0

Configure tornado with nginx:

server {
    listen 80;
    root /var/www/html/bangumi;
    autoindex on;
    charset utf8;
    server_name bangumi.example.com;

    location /bangumi {
        alias /var/www/html/bangumi;
    }

    location / {
        # reverse proxy to tornado listened port.
        proxy_pass http://127.0.0.1:8888;
    }
}

Of cause you can use yaaw to manage download items if you use aria2c to download bangumi.

...
location /bgmi_admin {
    auth_basic "BGmi admin (yaaw)";
    auth_basic_user_file /etc/nginx/htpasswd;
    alias /var/www/html/yaaw;
}

location /jsonrpc {
    # aria2c listened port
    proxy_pass http://127.0.0.1:6800;
}
...

DPlayer and Danmaku

BGmi use DPlayer to play bangumi.

First, setup nginx to access bangumi files. Second, choose one danmaku backend at DPlayer#related-projects.

Use bgmi config to setup the url of danmaku api.

bgmi config DANMAKU_API_URL http://127.0.0.1:1207/

… and enjoy :D

License

The MIT License (MIT)

Copyright (c) 2017 Ricter Zheng

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release History

Release History

This version
History Node

1.3.5

History Node

1.3.5b3

History Node

1.3.5b2

History Node

1.3.5b1

History Node

1.3.4

History Node

1.3.3

History Node

1.3.2

History Node

1.3.1

History Node

1.3.0b1

History Node

1.3.0b0

History Node

1.2.3

History Node

1.2.2

History Node

1.2.1

History Node

1.2.0

History Node

1.0.29

History Node

1.0.28

History Node

1.0.26

History Node

1.0.25

History Node

1.0.24

History Node

1.0.23

History Node

1.0.22

History Node

1.0.21

History Node

1.0.20

History Node

1.0.17

History Node

1.0.16

History Node

1.0.15

History Node

1.0.14

History Node

1.0.13

History Node

1.0.12

History Node

1.0.11

History Node

1.0.10

History Node

1.0.8

History Node

1.0.7

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bgmi-1.3.5.tar.gz (622.4 kB) Copy SHA256 Checksum SHA256 Source Jul 6, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting