Closed richford closed 6 years ago
@arokem and @jyeatman, please take a look and see if this meets your desires for expected behavior. Later, I'll add some content to the documentation about how to change these settings after-the-fact.
You're probably already on it, and I haven't looked at this in detail, but: all reads from stdin need to be done through the CLI, and input into the function needs to be given as function inputs.
Yep. Just pushed a change for that. This is better anyway b/c now the user can supply the title, subtitle, etc. as CLI args instead of waiting to be prompted. If they don't supply the args, then afqbrowser-assemble
will fallback to prompting them for input.
This doesn't work for me, if I just run:
./bin/afqbrowser-assemble ~/tmp/ ./afqbrowser/site/client/data/afq.mat
from the source directory, I get the following:
usage: afqbrowser-assemble [-h] [-t target] [-m metadata] [--page-title title]
[--page-subtitle subtitle] [--page-title-link link]
[--page-subtitle-link sublink]
source
afqbrowser-assemble: error: unrecognized arguments: ./afqbrowser/site/client/data/afq.mat
And running it with minimal inputs:
./bin/afqbrowser-assemble ./afqbrowser/site/client/data/afq.mat
I get:
Traceback (most recent call last):
File "./bin/afqbrowser-assemble", line 47, in <module>
title=args.title, subtitle=args.subtitle,
AttributeError: 'Namespace' object has no attribute 'title'
How would you run this with minimal inputs?
Oops. I fixed the AttributeErrors. Should work now with minimal inputs. As for the first question, I believe that all the arguments except for source
require some sort of flag, e.g. -t
or --page-title
. Thanks for catching the AttributeError.
Yes - works now! And it makes sense that it wouldn't work with positional arguments.
I made a small PR against your branch, with some edits to the documentation. When that lands, I think that we can merge this.
Thanks. Merged.
Addresses #232.
afqbrowser-assemble
now prompts the user for their desired title, subtitle, and hrefs.