mirror of
https://github.com/Emersont1/itchio.git
synced 2026-03-11 08:54:39 +00:00
Various improvements to --help (#84)
* Update `--help` Description Update the output of `--help` so it returns `itch-download` as the program name, and returns an accurate description of what the program does. * Make it clear `https://` needs to exist to download a specific game * Fix `pylint` errors Add missing docstring to the two CLI tools. Limit the length of strings. * Keep consistent style when listing platform types * Make `--human-folders` a proper on/off flag The `ArgumentParser.add_argument()` call has been updated to show up as an 'on/off' argument. * Conform to Code Style Guide * Add CLI tools to the linting workflow
This commit is contained in:
parent
be67f4e42d
commit
41d48038e3
3 changed files with 18 additions and 9 deletions
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
|
|
@ -22,4 +22,4 @@ jobs:
|
|||
pip install poetry
|
||||
poetry install
|
||||
- name: Analysing the code with pylint
|
||||
run: poetry run pylint --rcfile=.pylintrc itchiodl/
|
||||
run: poetry run pylint --rcfile=.pylintrc itchiodl/ itchiodl/downloader/ itchiodl/bundle_tool/
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import itchiodl
|
|||
|
||||
|
||||
def main():
|
||||
"""CLI tool to at all games in a bundle to your library."""
|
||||
|
||||
user = input("Username: ")
|
||||
password = getpass("Password: ")
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,11 @@ import itchiodl
|
|||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(prog="python -m hstp", description="Build an ")
|
||||
"""CLI tool to download all games in your library."""
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
prog="itch-download", description="Download / archive your itch.io library."
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-k", "--api-key", help="Use API key instead of username/password"
|
||||
|
|
@ -15,16 +19,19 @@ def main():
|
|||
parser.add_argument(
|
||||
"-p",
|
||||
"--platform",
|
||||
help="Platform to download for (default: all), will accept values like 'windows', 'linux', 'osx' and android",
|
||||
help=(
|
||||
"Platform to download for (default: all), will accept values like 'windows', 'linux', "
|
||||
"'osx' and 'android'"
|
||||
),
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--human-folders",
|
||||
type=bool,
|
||||
default=False,
|
||||
const=True,
|
||||
nargs="?",
|
||||
help="Download Folders are named based on the full text version of the title instead of the trimmed URL title",
|
||||
action="store_true",
|
||||
help=(
|
||||
"Download Folders are named based on the full text version of the title instead of "
|
||||
"the trimmed URL title"
|
||||
),
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
|
|
@ -44,7 +51,7 @@ def main():
|
|||
parser.add_argument(
|
||||
"--download-game",
|
||||
type=str,
|
||||
help="Download a specific game, should be in the format publisher.itch.io/game",
|
||||
help="Download a specific game, should be in the format 'https://publisher.itch.io/game'",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
|
|
|||
Loading…
Reference in a new issue