Skip to content

Instantly share code, notes, and snippets.

@splorp
Last active December 28, 2015 12:49
Show Gist options
  • Save splorp/7503402 to your computer and use it in GitHub Desktop.
Save splorp/7503402 to your computer and use it in GitHub Desktop.
View information about all packages installed on an Apple Newton. This script is based on code supplied by Paul Guyot and modified by yours truly. The original packages script was based on code by Paul Filmer.
func(NullVar)
begin
local theOut := "<table class=\"list\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\n<tr class=\"listrow\"><td><b>Name</b>'</td><td align=\"right\"><b>Size</b> (Bytes)</td><!--<td align=\"right\"><b>ID</b></td>--><!-- <td align=\"right\"><b>Version</b></td>--><td align=\"right\"><b>Created</b></td><td align=\"right\"><b>Installed</b></td><td><b>Copyright</b></td></tr>\n";
foreach pkgFrame in GetPackages() do
begin
// Skip packages built-in in the ROM.
if pkgFrame.store then
theOut := StrConcat(theOut,"<tr class=\"listrow\"><td>" & pkgFrame.title & "</td><td align=\"right\">" & pkgFrame.size & "</td><!--<td align=\"right\">" & pkgFrame.id & "</td>--><!--<td align=\"right\">" &GetPkgRefInfo(PidToPkgRef(pkgFrame.id)).version & "</td>--><td align=\"right\">" & DateNTime(GetPkgRefInfo(PidToPkgRef(pkgFrame.id)).creationdate) & "</td><td align=\"right\">" & DateNTime(pkgFrame.timestamp) & "</td><td>" & GetPkgRefInfo(PidToPkgRef(pkgFrame.id)).copyright & "</td></tr>\n");
end;
theOut := StrConcat(theOut,"</table>");
return theOut;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment