LoLei / LoLei/razer-cli

Improve help facility: `razer-cli help TOPIC`.

Open
#95 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Python
Stars
160
Forks
19
Avg merge
1m
Merged PRs (30d)
1

Description

There's razer-cli -man TOPIC but that's not immediately intuitive and gets lost easily in the parser-generated -h output.

To start, add an alias to have razer-cli -man TOPIC be the same as:

razer-cli help TOPIC

Also, there's need of systematic review of whether Python and OS packaging are picking up the package data declared in setup.py.

> razer-cli -man device
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.13/razer-cli", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/lib/python3.13/site-packages/razer_cli/razer_cli/main.py", line 24, in main
    return util.print_manual(args.manual)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/razer_cli/razer_cli/util.py", line 261, in print_manual
    ', '.join(sorted(os.listdir(d_path))))
                     ~~~~~~~~~~^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.13/site-packages/razer_cli/razer_cli/man_pages'

That's from gentoo (w/emerge up to date), and I suspect others.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading razer_cli/main.py and razer_cli/util.py to trace the existing -man handling, then inspect setup.py for how man_pages package data is declared. Reproduce the installed-package failure if possible and check the Gentoo-style installation path. Done means help TOPIC works as the documented alias and the manual files are available in packaged installations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.