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

specify topic on command line? #4

Closed
StephenMcConnel opened this issue Jun 25, 2019 · 5 comments
Closed

specify topic on command line? #4

StephenMcConnel opened this issue Jun 25, 2019 · 5 comments
Assignees

Comments

@StephenMcConnel
Copy link

Is it possible to specify the topic as well as the help file on the command line? I can't see any way to do that and a program I work on needs that functionality. We have been using chmsee for years, but that's no longer viable at all. xchm looks like it would work well, but always opening to the first page of the file doesn't really work for our user base.

@rzvncj
Copy link
Owner

rzvncj commented Jun 26, 2019

There's this:

$ xchm --help
Usage: xchm [-c <num>] [-t] [-i] [-h] [file]
  -c, --contextid=<num>	context-Id to open in file, requires that a file be specified
  -t, --notopics       	don't load the topics tree
  -i, --noindex        	don't load the index
  -h, --help           	displays this message.

if you know your contextid. And you can always use the special virtual filesystem syntax that xCHM uses internally:

xchm file:jdk150.chm#xchm:/jdk150/api/java/applet/package-summary.html

So, yes, I'd say what you're after is already perfectly possible.

@rzvncj rzvncj self-assigned this Jun 26, 2019
@StephenMcConnel
Copy link
Author

Thanks. The information about the "special virtual filesystem syntax" was exactly what I needed to get my program's context sensitive help working. (I don't know anything about the context ids, and the code is full of references to topic locations in the path notation.) It might be helpful to others to document the special syntax in the --help output.

@rzvncj
Copy link
Owner

rzvncj commented Jun 26, 2019

@rzvncj
Copy link
Owner

rzvncj commented Jun 26, 2019

Context IDs are really the proper way to go about this. The special syntax might change in the future.

@rzvncj rzvncj closed this as completed Jun 26, 2019
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

No branches or pull requests

2 participants