Skip to main content

BGmi is a cli tool for subscribed bangumi.

Project description

b'BGmi\n====\nBGmi is a cli tool for subscribed bangumi.\n\n|travis|\n|pypi|\n\n====\nTODO\n====\nEmpty as my wallet.\n\n==========\nUpdate Log\n==========\n+ Search / Download bangumi filter by regex\n+ Download specified episode\n+ Transmission-rpc support\n+ Remove aria2 download method\n+ Followed Bangumis Calendar for iOS / Android\n+ Bugs fixed\n\n=======\nFeature\n=======\n+ Subscribe/unsubscribe bangumi\n+ Bangumi calendar\n+ Bangumi episode information\n+ Download bangumi by subtitle group\n+ Web page to view all subscribed bangumi\n+ RSS feed for uTorrent\n+ Play bangumi online with danmaku\n+ Download bangumi by specified keywords (included and excluded).\n+ **BGmi have supported Windows now**\n\n.. image:: https://raw.githubusercontent.com/RicterZ/BGmi/master/images/bgmi.png\n :alt: BGmi\n :align: center\n.. image:: https://raw.githubusercontent.com/RicterZ/BGmi/master/images/bgmi_http.png\n :alt: BGmi HTTP Service\n :align: center\n.. image:: https://raw.githubusercontent.com/RicterZ/BGmi/master/images/bgmi_player.png\n :alt: BGmi HTTP Service\n :align: center\n\n============\nInstallation\n============\nFor **Mac OS X / Linux / Windows**:\n\n.. code-block:: bash\n\n git clone https://github.com/RicterZ/BGmi\n cd BGmi\n python setup.py install\n\nOr use pip:\n\n.. code-block:: bash\n\n pip install bgmi\n\n=============\nUsage of bgmi\n=============\n\nShow bangumi calendar:\n\n.. code-block:: bash\n\n bgmi cal all\n\n\nSubscribe bangumi:\n\n.. code-block:: bash\n\n bgmi add "Re:CREATORS" "\xe5\xa4\x8f\xe7\x9b\xae\xe5\x8f\x8b\xe4\xba\xba\xe5\xb8\x90 \xe9\x99\x86" "\xe8\xbf\x9b\xe5\x87\xbb\xe7\x9a\x84\xe5\xb7\xa8\xe4\xba\xba season 2"\n bgmi add "\xe6\xa8\xb1\xe8\x8a\xb1\xe4\xbb\xbb\xe5\x8a\xa1" --episode 0\n\n\nUnsubscribe bangumi:\n\n.. code-block:: bash\n\n bgmi delete --name "Re:CREATORS"\n\n\nUpdate bangumi database which locates at ~/.bgmi/bangumi.db defaultly:\n\n.. code-block:: bash\n\n bgmi update --download\n bgmi update "\xe4\xbb\x8e\xe9\x9b\xb6\xe5\xbc\x80\xe5\xa7\x8b\xe7\x9a\x84\xe9\xad\x94\xe6\xb3\x95\xe4\xb9\xa6" --download 2 3\n bgmi update "\xe6\x97\xb6\xe9\x92\x9f\xe6\x9c\xba\xe5\x85\xb3\xe4\xb9\x8b\xe6\x98\x9f" --download\n\n\nSet up the bangumi subtitle group filter and fetch entries:\n\n.. code-block:: bash\n\n bgmi list\n bgmi fetch "Re:CREATORS"\n bgmi filter "Re:CREATORS" --subtitle "DHR\xe5\x8b\x95\xe7\xa0\x94\xe5\xad\x97\xe5\xb9\x95\xe7\xb5\x84,\xe8\xb1\x8c\xe8\xb1\x86\xe5\xad\x97\xe5\xb9\x95\xe7\xbb\x84" --include 720P --exclude BIG5\n bgmi fetch "Re:CREATORS"\n # remove subtitle, include and exclude keyword filter and add regex filter\n bgmi filter "Re:CREATORS" --subtitle "" --include "" --exclude "" --regex\n bgmi filter "Re:CREATORS" --regex "(DHR\xe5\x8b\x95\xe7\xa0\x94\xe5\xad\x97\xe5\xb9\x95\xe7\xb5\x84|\xe8\xb1\x8c\xe8\xb1\x86\xe5\xad\x97\xe5\xb9\x95\xe7\xbb\x84).*(720P)"\n bgmi fetch "Re:CREATORS"\n\n\nSearch bangumi and download:\n\n.. code-block:: bash\n\n bgmi search \'\xe4\xb8\xba\xe7\xbe\x8e\xe5\xa5\xbd\xe7\x9a\x84\xe4\xb8\x96\xe7\x95\x8c\xe7\x8c\xae\xe4\xb8\x8a\xe7\xa5\x9d\xe7\xa6\x8f\xef\xbc\x81\' --regex-filter \'.*\xe5\x8a\xa8\xe6\xbc\xab\xe5\x9b\xbd\xe5\xad\x97\xe5\xb9\x95\xe7\xbb\x84.*\xe4\xb8\xba\xe7\xbe\x8e\xe5\xa5\xbd\xe7\x9a\x84\xe4\xb8\x96\xe7\x95\x8c\xe7\x8c\xae\xe4\xb8\x8a\xe7\xa5\x9d\xe7\xa6\x8f\xef\xbc\x81].*720P.*\'\n # download\n bgmi search \'\xe4\xb8\xba\xe7\xbe\x8e\xe5\xa5\xbd\xe7\x9a\x84\xe4\xb8\x96\xe7\x95\x8c\xe7\x8c\xae\xe4\xb8\x8a\xe7\xa5\x9d\xe7\xa6\x8f\xef\xbc\x81\' --regex-filter \'.*\xe5\x90\x88\xe9\x9b\x86.* --download\n\n\nModify bangumi episode:\n\n.. code-block:: bash\n\n bgmi list\n bgmi mark "Re:CREATORS" 1\n\n\nManage download items:\n\n.. code-block:: bash\n\n bgmi download --list\n bgmi download --list --status 0\n bgmi download --mark 1 --status 2\n\nStatus code:\n\n+ 0 - Not downloaded items\n+ 1 - Downloading items\n+ 2 - Downloaded items\n\nShow BGmi configure and modify it:\n\n.. code-block:: bash\n\n bgmi config\n bgmi config ARIA2_RPC_TOKEN \'token:token233\'\n\nFields of configure file:\n\nBGmi configure:\n+ :code:`BANGUMI_MOE_URL`: url of bangumi.moe mirror\n+ :code:`BGMI_SAVE_PATH`: bangumi saving path\n+ :code:`DOWNLOAD_DELEGATE`: the ways of downloading bangumi (aria2-rpc, transmission-rpc, xunlei)\n+ :code:`MAX_PAGE`: max page for fetching bangumi information\n+ :code:`BGMI_TMP_PATH`: just a temporary path\n+ :code:`DANMAKU_API_URL`: url of danmaku api\n+ :code:`CONVER_URL`: url of bangumi\'s cover\n+ :code:`LANG`: language\n\nAria2-rpc configure:\n+ :code:`ARIA2_RPC_URL`: aria2c deamon RPC url\n+ :code:`ARIA2_RPC_TOKEN`: aria2c deamon RPC token("token:" for no token)\n\nXunlei configure:\n+ :code:`XUNLEI_LX_PATH`: path of xunlei-lixian binary\n\nTransmission-rpc configure:\n+ :code:`TRANSMISSION_RPC_URL`: transmission rpc host\n+ :code:`TRANSMISSION_RPC_PORT`: transmission rpc port\n\n\n==================\nUsage of bgmi_http\n==================\n\nStart BGmi HTTP Service bind on `0.0.0.0:8888`:\n\n.. code-block:: bash\n\n bgmi_http --port=8888 --address=0.0.0.0\n\nConfigure tornado with nginx:\n\n.. code-block:: bash\n\n server {\n listen 80;\n root /var/www/html/bangumi;\n autoindex on;\n charset utf8;\n server_name bangumi.example.com;\n\n location /bangumi {\n alias /var/www/html/bangumi;\n }\n\n location / {\n # reverse proxy to tornado listened port.\n proxy_pass http://127.0.0.1:8888;\n }\n }\n\nOf cause you can use `yaaw <https://github.com/binux/yaaw/>`_ to manage download items if you use aria2c to download bangumi.\n\n.. code-block:: bash\n\n ...\n location /bgmi_admin {\n auth_basic "BGmi admin (yaaw)";\n auth_basic_user_file /etc/nginx/htpasswd;\n alias /var/www/html/yaaw;\n }\n\n location /jsonrpc {\n # aria2c listened port\n proxy_pass http://127.0.0.1:6800;\n }\n ...\n\n===================\nDPlayer and Danmaku\n===================\n\nBGmi use `DPlayer <https://github.com/DIYgod/DPlayer>`_ to play bangumi.\n\nFirst, setup nginx to access bangumi files. Second, choose one danmaku backend at `DPlayer#related-projects <https://github.com/DIYgod/DPlayer#related-projects>`_.\n\nUse `bgmi config` to setup the url of danmaku api.\n\n.. code-block:: bash\n\n bgmi config DANMAKU_API_URL http://127.0.0.1:1207/\n\n... and enjoy :D\n\n=======\nLicense\n=======\nThe MIT License (MIT)\n\nCopyright (c) 2017 Ricter Zheng\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n.. |travis| image:: https://travis-ci.org/RicterZ/BGmi.svg?branch=master\n :target: https://travis-ci.org/RicterZ/BGmi\n\n.. |pypi| image:: https://img.shields.io/pypi/v/bgmi.svg\n :target: https://pypi.python.org/pypi/bgmi\n'

Project details


Release history Release notifications | RSS feed

This version

1.3.4

Download files

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

Source Distribution

bgmi-1.3.4.tar.gz (601.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page