#!/usr/bin/perl # # Look for 3D files and create a web page about them. #$url = "https://svn.so-much-stuff.com/svn/trunk/3D"; $url = "/pdp8/trunk/3D"; $head = <<'EOM';
EOM print $head; $status = 0; print "Here are some 3D design files mostly relevant to the PDP-8.\n"; print "These should mostly be printable with common 3D printing services\n"; print "like Shapeways, etc. Because .stl is no longer the prefered format,\n"; print "be advised that all of the STL files are now in mm, not inches.\n"; print "Use the link in the page footer to let me know if there are issues\n"; print "with these files.\n"; print "
In no particular order:
\n"; print "
| ";
if (-f $txt) {
open(INPUT, $txt) || die "$txt: $!";
$dsc = || ($dsc = "");
print "$dsc \n"; $dsc = ""; while () { $dsc .= $_; } close(INPUT); } else { $dsc = ""; } print " \n"; $dir = "$stl"; $dir =~ s:/[^/]*::; print "Directory \n"; $src = "$stl.scad"; if (-f $src) { print "OpenSCAD file \n"; } $skp = $stl; $skp =~ s/.stl$/.skp/; if (-f $skp) { print "Sketchup file \n"; } $stl = "$stl.stl"; print "STL file (Metric) \n" if -f $stl; $mf = $stl; $mf =~ s/.stl$/.3mf/; if (-f $mf) { print "Print profile \n"; } print $dsc; print " | \n";
$thisrow++;
if ($thisrow > 1) {
print "