goolabs/commands.py
def hiragana(ctx, app_id, sentence_file,
             json_flag, sentence, output_type, request_id):
    # type: (Context, unicode, Optional[IO], bool, unicode, unicode, unicode) -> None # NOQA
    """ Convert the Japanese to Hiragana or Katakana. """

    app_id = clean_app_id(app_id)
    sentence = clean_sentence(sentence, sentence_file)

    api = GoolabsAPI(app_id)
    ret = api.hiragana(
        sentence=sentence,
        output_type=output_type,
        request_id=request_id
    )

    if json_flag:
        click.echo(format_json(api.response.json()))
        return

    click.echo(ret['converted'])
def hiragana(ctx, app_id, sentence_file,
             json_flag, sentence, output_type, request_id):
    # type: (Context, unicode, Optional[IO], bool, unicode, unicode, unicode) -> None # NOQA
    app_id = clean_app_id(app_id)
    sentence = clean_sentence(sentence, sentence_file)

    api = GoolabsAPI(app_id)
    ret = api.hiragana(
        sentence=sentence,
        output_type=output_type,
        request_id=request_id
    )

    if json_flag:
        click.echo(format_json(api.response.json()))
        return

    click.echo(ret['converted'])
def hiragana ( ctx , app_id , sentence_file , json_flag , sentence , output_type , request_id ) : # type: (Context, unicode, Optional[IO], bool, unicode, unicode, unicode) -> None # NOQA app_id = clean_app_id ( app_id ) sentence = clean_sentence ( sentence , sentence_file ) api = GoolabsAPI ( app_id ) ret = api . hiragana ( sentence = sentence , output_type = output_type , request_id = request_id ) if json_flag : click . echo ( format_json ( api . response . json ( ) ) ) return click . echo ( ret [ 'converted' ] )
Convert the Japanese to Hiragana or Katakana.
Convert the Japanese to Hiragana or Katakana .