chrisbra / wikipedia2text

A commandline tool for querying the Wikipedia
Other
32 stars 4 forks source link

Summary is broken #5

Closed elig0n closed 6 years ago

elig0n commented 6 years ago

title

chrisbra commented 6 years ago

which summary?

elig0n commented 6 years ago

the summary (short) option : -s returns incomplete or out of bounds output

chrisbra commented 6 years ago

I suppose you mean the help/usage output? I shortened it a bit to fit into a 80 character wide terminal. (note -s usually shows only the output from the wikiepedia. The script does not reformat the output from the browser, so you might be able to tweak that from your browser options).

elig0n commented 6 years ago

I mean the "-s display only a summary" option which I understand to show only the summary top part of a wikipedia article. Using supposedly 'lynx -dump' with |grep -v copyright | head -n 22 | tail -n 17.

chrisbra commented 6 years ago

Now you know, why should be precise when creating an issue. So is it using lynx? Can you check with a different browser? For me, it is using w3m, which looks okay

chrisbra commented 6 years ago

is this still a problem?

elig0n commented 6 years ago

Yes. Summary is not appearing correctly, see this: https://imgur.com/a/fRWTnLK

chrisbra commented 6 years ago

looks like the decision to drop lines after the first initial 17 lines is a bit arbitrary. How about we make this configurable?

elig0n commented 6 years ago

sure, lacking a better option...

elig0n commented 6 years ago

I've sent an alternative solution as a PR

chrisbra commented 6 years ago

thanks, I have included that. So closing.