<div dir="ltr"><div dir="ltr">On Fri, 5 Jul 2019 at 03:47, Taylor, P <<a href="mailto:P.Taylor@rhul.ac.uk">P.Taylor@rhul.ac.uk</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div bgcolor="#FFFFFF">
<div class="gmail-m_-3242795005656758576moz-cite-prefix">As I wrote off-list to Peter :<br></div>
<br>
<blockquote type="cite"><br>
Sometimes I just want to weep.  There can be no doubt, based even on just the evidence above, that the Unix operating system is a very powerful tool, and the simple fact that one can identify all packages that do not have the string "LaTeX" (presumably case-insensitive)
 in their CTAN path is a clear demonstration of that fact.  And yet the entire thing is gibberish.  It could be Mayan, for all I know.  I could stare at it for the rest of my life and still not have the slightest idea how it works.  Why oh why oh why does someone
 not come up with a command-line interpreter (or as I fear you would call it, "a shell") that uses English verbs as its commands and Enqlish nouns/adjective/adverbs/etc as its qualifiers ?  How on earth is anyone expected to know what "-i -o" implies, especially
 as what it implies is almost certainly a function of the command to which it is applied ?  And why can one not apply 2>/dev/null distributively, such that it applies to
<i>all</i><i> </i>commands in the sequence rather than having to be spelled out in full for each.</blockquote></div></blockquote><div>Most of these are a matter of style and cultural preference I guess. After all, the Mayans did manage to communicate with each other. :-)</div><div>For instance, "wget -O -" could be written as "wget --output-document=-" or even "wget --output-document=/dev/stdin".<br></div><div>Similarly, "tidy -n -i" could be written as "tidy -numeric -indent".</div><div>And "grep -v" as "grep --invert-match".</div><div>I think very few people prefer to write the longer versions though.</div><div>Given that wget, tidy, lxprintf etc are all separate programs written by unrelated programmers with their own conventions for specifying options, I think one is not expected to know what a specific option to a specific command/program means by simply reading it; it must be looked up in the corresponding program's manual. (For instance even with "-numeric" in place of "-n" I wouldn't have guessed that it means "output numeric rather than named entities".)</div><div>Also, "2>/dev/null" could be applied distributively, by enclosing the whole thing in parentheses and appending "2>/dev/null" to that.<br></div><div><br></div><div>Anyway, here is a python3 script that I guess (because I couldn't install lxprintf either) is the equivalent of the above; hopefully it is slightly easier to understand:</div><div><br></div><div><font face="courier new, monospace">import requests<br>from bs4 import BeautifulSoup<br><br>chemistry_response = requests.get('<a href="https://ctan.org/topic/chemistry">https://ctan.org/topic/chemistry</a>')<br>chemistry_soup = BeautifulSoup(chemistry_response.text, 'html.parser')<br>for link in chemistry_soup.find_all('a'):<br>    href = link.get('href')<br>    if href.startswith('/pkg/'):<br>        uri = '<a href="https://ctan.org">https://ctan.org</a>' + href<br>        package = BeautifulSoup(requests.get(uri).text, 'html.parser')<br>        for td in package.find_all('td'):<br>            if td.text == 'Sources':<br>                path = td.next_sibling.a.code.text<br>                if 'latex' not in path:<br>                    print(path)<br></font></div><div><br></div><div>Of course all this does is replace Unix programs written by different people with Python packages (libraries) written by different people; so it may not be any better.</div></div></div>