> On Aug 4, 2019, at 23:53, Dave Allured - NOAA Affiliate via macports-users 
> <[email protected]> wrote:
> 
> On Sun, Aug 4, 2019 at 8:14 PM Christopher Chavez <[email protected] 
> <mailto:[email protected]>> wrote:
> 
> > On Aug 4, 2019, at 7:32 PM, Richard L. Hamilton <[email protected] 
> > <mailto:[email protected]>> wrote:
> > 
> > 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
> > install MacPorts, but wanted to see what its current versions of all its 
> > packages were (and perhaps even generate feedback on availability of newer
> > packages), that might be useful.
> > 
> > I can get that on https://www.macports.org/ports.php?by=all 
> > <https://www.macports.org/ports.php?by=all> but that's not all on one page, 
> > and it has a lot of other stuff that makes it more difficult
> > to consume as machine-readable.
> 
> 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.
> 
> 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.

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.
File size isn't that bad, about 1.4M. The output seems parseable enough, with 
three fields.

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.

Reply via email to