Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI #6

Merged
merged 10 commits into from
Nov 24, 2021
Merged

CLI #6

merged 10 commits into from
Nov 24, 2021

Conversation

eggplants
Copy link
Contributor

@eggplants eggplants commented Nov 19, 2021

I have implemented CLI.

$ pip install -e .
Obtaining file:///home/eggplants/prog/budoux
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Installing collected packages: budoux
  Running setup.py develop for budoux
Successfully installed budoux-0.0.1
$ budoux -h
usage: budoux [-h] [-H] [-m JSON] [-d STR] [-V] [TXT]

BudouX is the successor to Budou,
the machine learning powered line break organizer tool.

positional arguments:
  TXT                    text

optional arguments:
  -h, --help             show this help message and exit
  -H, --html             HTML mode
  -m JSON, --model JSON  custom model file path (default: models/ja-knbc.json)
  -d STR, --delim STR    output delimiter in TEXT mode (default: '---')
  -V, --version          show program's version number and exit
$ budoux -V
budoux 0.0.1
$ budoux 今日は天気です。
今日は
天気です。
$ budoux -H "今日は<b>とても天気</b>です。"
<span style="word-break: keep-all; overflow-wrap: break-word;">今日は<b ><wbr>とても<wbr>天気</b>です。</span>
$ echo 今日は天気です。 | budoux
$ echo -e "今日は天気です。\n昨日は曇りでした。" | budoux
今日は
天気です。
---
昨日は
曇りでした。
$ budoux # interactive input
test
こんにちは
おはよう
[^d]
test
---
こんにちは
---
おはよう
$

@tushuhei
Copy link
Member

Thank you for your proposal. The request generally looks good to me.
I would like to align all Python codes with the Google open source code style (--style yapf), so I made a change to align the existing code with the style guide and added a GitHub workflow to check the integrity.
Could you rebase your branch onto the main branch and update this request? Thank you so much!

@tushuhei tushuhei self-requested a review November 24, 2021 00:41
@eggplants
Copy link
Contributor Author

Style Check

@tushuhei tushuhei merged commit 9e30272 into google:main Nov 24, 2021
@eggplants eggplants deleted the cli branch November 24, 2021 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants