Subversion Repositories SvarDOS

Rev

Rev 631 | Rev 732 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 631 Rev 719
1
<h1>SvarDOS repository</h1>
1
<h1>SvarDOS repository</h1>
2
<p class="copyr">"the world of packages"</p>
2
<p class="copyr">"the world of packages"</p>
3
 
3
 
4
<p>This page lists all packages that are available in the SvarDOS repository. These packages can be downloaded from within SvarDOS using the pkgnet tool, or you can download them from here.</p>
4
<p>This page lists all packages that are available in the SvarDOS repository. These packages can be downloaded from within SvarDOS using the pkgnet tool, or you can download them from here.</p>
5
 
5
 
6
<?php
6
<?php
7
 
7
 
8
$handle = fopen('../packages/index.tsv', "rb");
8
$db = json_decode(file_get_contents('../packages/_index.json'), true);
9
if ($handle === FALSE) {
-
 
10
  echo "<p>ERROR: INDEX FILE NOT FOUND</p>\n";
-
 
11
  exit(0);
-
 
12
}
-
 
13
 
9
 
14
echo "<table>\n";
10
echo "<table>\n";
15
 
11
 
16
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
12
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
17
 
13
 
18
while (($arr = fgetcsv($handle, 1024, "\t")) !== FALSE) {
14
foreach ($db as $pkg => $meta) {
-
 
15
 
-
 
16
  $desc = $meta['desc'];
19
  // format: pkgname | version | desc | bsdsum
17
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
-
 
18
  $ver = $pref['ver'];
-
 
19
  $bsum = $pref['bsum'];
-
 
20
 
20
  echo "<tr><td><a href=\"repo/?a=pull&amp;p={$arr[0]}\">{$arr[0]}</a></td><td>{$arr[1]}</td><td>{$arr[2]}</td></tr>\n";
21
  echo "<tr><td><a href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
21
}
22
}
22
echo "</table>\n";
23
echo "</table>\n";
23
 
24
 
24
fclose($handle);
-
 
25
 
-
 
26
?>
25
?>
27
 
26