<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 4, 2019, at 23:53, Dave Allured - NOAA Affiliate via macports-users <<a href="mailto:macports-users@lists.macports.org" class="">macports-users@lists.macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="">On Sun, Aug 4, 2019 at 8:14 PM Christopher Chavez <<a href="mailto:chrischavez@gmx.us" target="_blank" class="">chrischavez@gmx.us</a>> wrote:<br class=""></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br class="">
> On Aug 4, 2019, at 7:32 PM, Richard L. Hamilton <<a href="mailto:rlhamil@smart.net" target="_blank" class="">rlhamil@smart.net</a>> wrote:<br class="">
> <br class="">
> That got me to wondering if there's a way to get the equivalent of "port list all", all on one page, over the web; for someone that might not want to<br class="">
> install MacPorts, but wanted to see what its current versions of all its packages were (and perhaps even generate feedback on availability of newer<br class="">
> packages), that might be useful.<br class="">
> <br class="">
> I can get that on <a href="https://www.macports.org/ports.php?by=all" rel="noreferrer" target="_blank" class="">https://www.macports.org/ports.php?by=all</a> but that's not all on one page, and it has a lot of other stuff that makes it more difficult<br class="">
> to consume as machine-readable.<br class="">
<br class="">
I’m just another user, but such a page containing all 21000+ ports sounds like an easy way to hang or crash the user's browser, so whatever links to it should probably warn "huge page--might crash your browser". I don't quite see how the complete listing is useful to a human (except maybe someone who likes reading the dictionary or the phone book for fun), so maybe only a plaintext and/or machine-readable format is sufficient.<br class=""></blockquote><div class=""><br class=""></div><div class="">So will it be sufficient to simply run "port list all" on the current stable MacPorts package, as a frequent automatic process? Capture the text result and put it in a public downloadable location.<br class=""></div></div></div></div>
</div></blockquote></div><br class=""><div class="">Periodic, but perhaps not that frequent; for some reason, that command could take 25 minutes to run; so some small number of times a day should be a reasonable tradeoff between currency and low overhead, just swap 'em after the new file is done, so there's always a whole file there, not a partial one.</div><div class="">File size isn't that bad, about 1.4M. The output seems parseable enough, with three fields.</div><div class=""><br class=""></div><div class="">But no big deal; I'd just hoped that it was there already. I'm still thinking about the uses it might have. Some uses might require more info, and that could perhaps be best had by grabbing the tarball of Portfiles, reading and parsing them all for the desired info, all of which is presumably in them if it's anywhere. The parsing wouldn't be fun, but given the basic syntax (which is documented), one could ignore whatever one didn't need. I suppose there's some code (tcl?) for parsing them already, that wouldn't be hard to adapt to generate whatever sort of machine-readable summary would meet particular needs.</div><div class=""><br class=""></div></body></html>