Coder Social home page Coder Social logo

bananas-frontend-cli's Introduction

BaNaNaS CLI frontend

GitHub License GitHub Tag GitHub commits since latest release

GitHub Workflow Status (Testing)

This is a CLI frontend for the OpenTTD's content service, called BaNaNaS. It works together with bananas-api, which serves the HTTP API.

See introduction.md for more documentation about the different BaNaNaS components and how they work together.

Development

This CLI tool is written in Python 3.8 with aiohttp, and makes strong use of asyncio.

Usage

To start it, you are advised to first create a virtualenv:

python3 -m venv .env
.env/bin/pip install -r requirements.txt

Next, check out the help.

.env/bin/python -m bananas_cli --help

bananas-frontend-cli's People

Contributors

dependabot[bot] avatar pyup-bot avatar truebrain avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bananas-frontend-cli's Issues

Improve reporting on user errors

When the user specifies incorrect/insufficient options, the CLI usually prints a long backtrace.
Maybe add --verbose option to print backtraces, and hide them by default.

Examples:

When --api-url is wrong/missing:

  • about 60 lines of python backtrace
  • aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.bananas.openttd.org:443 ssl:default [Name or service not known]

When uploading zero files:
.env/bin/python -m bananas_cli --api-url https://api.bananas.staging.openttd.org upload --version "foobar"

  • 25 lines of python backtrace
  • File ".../bananas_cli/commands/upload.py", line 31, in upload
    parts = files[0].split("/")[:-1]
    IndexError: tuple index out of range
    

Prompt for TOS acceptance

Musa asked the important part

are you one of the authors of this content, if so answer 'yes I am':

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.