argdown icon indicating copy to clipboard operation
argdown copied to clipboard

Small bug in pip install version

Open liliblu opened this issue 6 years ago • 3 comments

Hello, great package! Just wanted to let you know that there is a missing ":" at line 272 in the version I installed through pip.

liliblu avatar Aug 02 '19 19:08 liliblu

Honestly I wasn't going to fix this at all. See issue #1; I don't really think this project is a "good idea" any more. I'll accept a PR if you want to put one together but this isn't high on my priority list.

In general, I think it's fine to only have your tool's usage as part of the tool / not have it in your general docs at all. There's some notable exceptions but... eh.

9999years avatar Aug 03 '19 22:08 9999years

Its funny, I agree with the issues of eval and how sensitive this approach is. However, argdown is still the best tool out there for converting package-args to markdown documentation. I am still using it in our CI to generate that part of the documentation. I've checked the Sphinx addon sphinx-argparse gh and they use a different approach to process the argparse object.. but I don't want to use Sphinx atm.

Sieboldianus avatar Jan 22 '20 09:01 Sieboldianus

Its funny, I agree with the issues of eval and how sensitive this approach is. However, argdown is still the best tool out there for converting package-args to markdown documentation. I am still using it in our CI to generate that part of the documentation. I've checked the Sphinx addon sphinx-argparse gh and they use a different approach to process the argparse object.. but I don't want to use Sphinx atm.

Hey @Sieboldianus , thank you for suggesting to use sphinx but, How do you use this library? I can't make use of it. It gives me a syntax error On dev branch

  File "../argdown/argdown/argdown.py", line 213
    <<<<<<< HEAD
     ^
SyntaxError: invalid syntax

On master branch

  File "../argdown/argdown/argdown.py", line 311, in gen_help
    exec('\n'.join(lines))
  File "<string>", line 5, in <module>
NameError: name 'ArgumentParser' is not defined

Could you explain with an example?, how you were able to run it? using this example

import argparse
import argdown

parser = argparse.ArgumentParser(description='Process some integers.')

parser.add_argument('integers', metavar='N', type=int, nargs='+',
help='an integer for the accumulator')
parser.add_argument('--sum', dest='accumulate', action='store_const',
const=sum, default=max,
help='sum the integers (default: find the max)')

args = parser.parse_args()

@9999years

anubhav0fnu avatar Jul 29 '20 03:07 anubhav0fnu