jss
jss copied to clipboard
port to argparse, support reading from stdin
fixes #1, #8
Nice! Can you check that this doesn't break the tests (now that I added the .spec
files)?
thanks, will do
cool. I killed the .
no-operator, which seemed not useful or no longer useful. lmk if i missed something of significance there
The .
no-op selectors was based on jq
, where it's mandatory. I believe the issue is that jss foo
is ambiguous: do you want to apply the selector foo
to stdin
, or do you want to apply no selectors to the file foo
. How does this change handle that situation?
gotcha, i'll add it back in
FYI, the test failed because of some issue relating to pandoc
. That dependency isn't needed for testing, so you might be able to fix it with something like:
pip install -r <(grep -v pandoc requirements.txt)
would be helpful to have a test for stdin
input, too
nm about the test, I fixed it on master
, you should just be able to rebase.
ok, going back to .
-semantics, what if the decision tree is:
- only 1 arg total (and no
-k
or-v
) --> it must be a selector and input must come from stdin - if there is a
-k
or-v
, then there should be zero "unparsed" args (read from stdin) xor one "unparsed" arg (filename).
?
That sounds reasonable. What would you do with this?
jss .foo .bar .baz
is that something that's accepted now? Where does it fall in your decision tree? Is it illegal?
Hey Ryan -- want to get this merged in? I don't think there are any fundamental issues.
sure, I'll take a pass on this as soon as I get my spark post out
On Wed Feb 25 2015 at 12:35:02 PM Dan Vanderkam [email protected] wrote:
Hey Ryan -- want to get this merged in? I don't think there are any fundamental issues.
— Reply to this email directly or view it on GitHub https://github.com/danvk/jss/pull/7#issuecomment-76012976.