Changeset 30

Show
Ignore:
Timestamp:
03/13/09 02:32:13 (3 years ago)
Author:
sven
Message:

Added new documentation as well as a great new layout and some new
features for the documentation system like syntax higlighting (using
geshi).
Furthermore much directory clean up and movements accross directories.

Files:
10 added
1 removed
5 modified
3 moved

Legend:

Unmodified
Added
Removed
  • README.SVN.txt

    r6 r30  
    11 
    2  The Paper Tape Project -- Subversion access 
    3  =========================================== 
     2 The Punched Paper Project -- Subversion access 
     3 ============================================== 
    44 
    5  The Paper Tape Project sources are stored on the technikum29.de servers. 
     5 The Punched Paper Project sources are stored on the technikum29.de servers. 
    66 They are reachable at 
    77 
     
    99    Web SVN: http://dev.technikum29.de/websvn 
    1010 
    11  You can access the subversion reposity anonymous. So simply checkout 
     11 until the svn repository moved to 
     12 
     13             svn://technikum29.de/punched-paper-project 
     14 
     15 You can access the subversion reposity anonymously. So simply checkout 
    1216 the sources at your unix box using the svn terminal client: 
    1317 
     
    1923 team at development@[this domain] and ask for a subversion account. 
    2024 
    21  --Sven, 19.07.08 
     25 --Sven, 19.07.08, 13.03.09 
  • documentation/index.php

    r23 r30  
    1212 **/ 
    1313 
     14  // the web site root path, taken relatively to the 
     15  // global project path 
     16  $doc = 'documentation'; 
     17 
    1418  // where to get the file to display: Can be simply 
    1519  // $filename = $_SERVER['QUERY_STRING']; 
     
    1822 
    1923  // redirect to default page if no one is given: 
    20   $default_page = 'documentation/start.htm'; 
     24  $default_page = $doc.'/start.htm'; 
    2125  if(empty($filename)) { header("Location: $_SERVER[PHP_SELF]/$default_page"); exit; } 
    2226 
     
    2428  $jail_dir = realpath('../'); # don't display files higher than parental dir 
    2529  $file_path = realpath('../'.$filename); 
    26   #var_dump(substr($file_path, -3, 3), $filename, $file_path, $jail_dir); 
    27   if(0 !== strncmp($file_path, $jail_dir, strlen($jail_dir)) || 
    28      substr($file_path, -3, 3) != 'htm') { 
     30  $extension = substr(strrchr($file_path, '.'),1); 
     31  $good_extensions = array('c', 'cpp', 'pl', 'htm', 'txt'); 
     32 
     33  #var_dump($extension, $filename, $file_path, $jail_dir, $good_extensions, in_array($extension, $good_extensions)); exit(); 
     34  if(0 !== strncmp($file_path, $jail_dir, strlen($jail_dir)) 
     35     || !in_array($extension, $good_extensions) 
     36     || !is_readable('../'.$filename) ) { 
    2937      // user want's display file higher than parental dir 
    30       // or file is not a *.htm file 
    31       // then Redirect to file! Apache will handle error ;-) 
     38      // or file is not a nice file (like *.htm) or file is not 
     39      // readable, then Redirect to file! Apache will handle error ;-) 
    3240      header("Location: $_SERVER[SCRIPT_NAME]/../../$filename"); 
    3341      echo "Won't make file $filename beautiful\nRefering to that file...\n"; 
     
    3543  } 
    3644 
    37   // parse file until <body> start.. 
    38   $handle = @fopen("../$filename", 'r'); 
    39   if(!$handle) { header("HTTP/1.0 403 Forbidden"); print "Must not open $filename\n."; exit; } 
    40   while(!feof($handle)) { 
    41       if(strpos(fgets($handle), "<body") !== false) 
    42           break; 
     45  // since PHP cannot initialize global variables on an intelligent way: 
     46  $exec_action = $extension=='htm' ? 'display_file' : 'syntax_highlight_file'; 
     47 
     48  function display_file($filename) { 
     49      // display HTML file. 
     50      // parse file until <body> starts... 
     51      $handle = fopen("../$filename", 'r'); 
     52      if(!$handle) { print "Error at opening $filename\n"; exit; } 
     53      while(!feof($handle)) { 
     54          if(strpos(fgets($handle), "<body") !== false) 
     55              break; 
     56      } 
     57      fpassthru($handle); 
     58  } 
     59 
     60  function syntax_highlight_file($filename) { 
     61      // syntax highlight some file 
     62      include_once('geshi.php'); 
     63      $geshi = new GeSHi(); 
     64      $geshi->load_from_file("../$filename"); 
     65      $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS); 
     66      echo "<h2>Contents of <code>$filename</code></h2>"; 
     67      echo $geshi->parse_code(); 
    4368  } 
    4469?> 
    4570<html> 
    4671<head> 
    47   <title>The Paper Tape Project</title> 
    48   <link rel="stylesheet" href="../documentation/style.css" type="text/css"> 
     72  <title>The Punched Paper Project / <?=$filename; ?></title> 
     73  <link rel="stylesheet" href="<?=$_SERVER['SCRIPT_NAME'].'/'.$doc; ?>/style.css" type="text/css"> 
    4974  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> 
    5075</head> 
    5176<body> 
    52 <h1> 
    53   <a href="http://dev.technikum29.de/projekte/"><span>technikum29 Coding projects: </span></a> 
    54   <strong>The Paper Tape Project</strong> 
    55 </h1> 
     77<div id="header"> 
     78  <h1>The Punched Paper Project</h1> 
     79  <p class="subtitle">/<?=$filename; ?></p> 
     80  <a href="http://dev.technikum29.de/" class="powered-by"><img src="<?=$_SERVER['SCRIPT_NAME'].'/'.$doc; ?>/src/powered-by-icon.png" alt="technikum29 development zone"></a> 
     81</div> 
    5682<div id="navigation"> 
    5783<?php 
    5884 
    5985 $nav = array( 
    60    # all URLs are taken relative to one subdir (e.g. documentation/). 
    61    'Start' => $default_page, 
    62    'Data' => 'daten/README.htm', 
    63    'Perl tools' => 'perl-tools/README.htm', 
    64    'Labeling and Fonts' => array( 
    65       'Generating Labels' => 'schriften/README.htm', 
    66       'Paper Tape Font Files' => 'schriften/font_files.htm' 
    67    ), 
    68    'Visualisation' => 'visualisator/README.htm', 
    69    'Generating Paper Tapes online!' => 'web-frontend/' 
     86        #all URLs are taken relative to one subdir (e.g. documentation/). 
     87        'Start' => $default_page, 
     88        'The Paper Tape Project' => array( 
     89                'Start' => $doc.'/paper-tape-project.htm', 
     90                'Data' => 'paper-tape/daten/README.htm', 
     91                'Perl tools' => 'paper-tape/perl-tools/README.htm', 
     92                'Labeling and Fonts' => array( 
     93                        'Generating Labels' => 'paper-tape/schriften/README.htm', 
     94                        'Paper Tape Font Files' => 'paper-tape/schriften/font_files.htm' 
     95                ), 
     96                'Visualisation' => 'paper-tape/visualisator/README.htm', 
     97                'Generating Paper Tapes online!' => 'paper-tape/web-frontend/' 
     98        ), 
     99        'The Punch Card Project' => array( 
     100                'Start' => $doc.'/punch-card.htm' 
     101        ), 
     102        //'About' => $doc.'/about.htm' 
    70103 ); 
    71104 
     
    77110           print "<em>$name</em>\n"; print_nav($url); 
    78111        } else 
    79            print $url == $filename ? "<strong>$name</strong>" : "<a href=\"../$url\">$name</a>"; 
     112           print $url == $filename ? "<strong>$name</strong>" : "<a href=\"$_SERVER[SCRIPT_NAME]/$url\">$name</a>"; 
    80113        echo "</li>\n"; 
    81114    } 
     
    87120<div id="content"> 
    88121<?php 
    89  fpassthru($handle); 
     122  call_user_func($exec_action, $filename);#, $exec_array); 
    90123?> 
    91124</div> 
    92 <hr/> 
    93 <center> 
     125<div id="footer"> 
     126  Further reading: 
    94127  <a href="http://dev.technikum29.de">dev.technikum29.de</a> | 
    95128  <a href="http://dev.technikum29.de/websvn/listing.php?repname=paper-tape-project&path=%2F&sc=0">Paper-Tape-Project WebSVN</a> | 
    96129  <a href="http://koeppel.homeunix.org">koeppel.homeunix.org</a> 
    97 </center> 
     130</div> 
  • documentation/start.htm

    r23 r30  
    22<body> 
    33 
    4 <h2>The Paper Tape Project</h2> 
     4<a href="http://www.flickr.com/photos/flickrsven/2385929362/" 
     5   title="Some Flickr link to paper tape art ;-)"> 
     6<img src="../paper-tape/web-frontend/design/logo.png" 
     7   style="float:right; margin:0 0 20px 20px;" alt="Flying paper tape"> 
     8</a> 
    59 
    6 <h3>What is this project about?</h3> 
    7 <p>Welcome to the Paper Tape Project. The goal of this project is to handle paper tapes handy 
    8    with today's computers. Therefore we have written drivers for punching and reading with 
    9    external devices, as well as a complete specialized hex editor for paper tape binary files. 
    10    This project has produced a lot of tools, partly high quality, partly quick &amp; dirty. 
    11    It's an open source project &ndash; you can get the complete results, every single source 
    12    file, as well as compiled binaries for Microsoft Windows and Linux. The development 
    13    proceeds mainly at linux workstations, thanks to their great and powerful Unix shells.</p> 
     10<p>Welcome to the <b>Punched Paper Project</b>. This is a small website 
     11   that informs you about the goals and progress of that project</p> 
    1412 
    15 <h3>Progress/status</h3> 
    16 <p>I'm about to switch to HTML files for documentation, but there still some README.txt 
    17    files flying around:</p> 
    18 <ul> 
    19   <li><a href="../README.txt">General README about the project and subprojects</a></li> 
    20   <li><a href="../reader/README.txt">Reader subsystem readme</a></li> 
    21   <li><a href="../usersprace-driver/README.txt">Userspace driver (puncher) subsystem readme</a></li> 
    22   <li><a href="../web-frontend/README.txt">Webfrontend readme</a></li> 
    23 </ul> 
     13<h2>In a nutshell</h2> 
     14<p>The goal of this project is to handle various antiquated storage 
     15   media with today's computers. Such media are especially paper tapes 
     16   and punch cards. 
     17   <br/>This project started as <b>Paper Tape Project</b> with drivers 
     18   that make PCs capable to 
     19   communicate with paper tape readers and writers, so we can now read 
     20   and write paper tapes under various operating systems (GNU/Linux, 
     21   Micrsoft Windows). Then we got visualizing and operating tools for 
     22   paper tape data, as well as font/label generators for paper tapes. 
     23   <br/>In 2009, we got the idea to make punch card devices run at 
     24   computers, too. So I've renamed the whole project to <b>Punched 
     25   Paper Project</b>. 
     26</p> 
    2427 
    25 <p>See this progress README files:</p> 
    26 <ul> 
    27   <li><a href="../puncher/README.txt">Puncher subsystem readme</a></li> 
    28 </ul> 
    29  
    30 <p>The this shallabe README files:</p> 
    31 <ul> 
    32   <li><a href="../driver/README.txt">General driver subsystem</a></li> 
    33 </ul> 
    34  
    35 <h3>Targeted structure</h3> 
    36 <p>Something about the goal</p> 
     28<h2>Who's running the project</h2> 
     29<p>The Punched Paper Project is an <b>Open Source</b> project by a 
     30   german student. It's hosted on the servers of the german computer 
     31   museum <a href="http://www.technikum29.de">technikum29</a>.</p> 
  • documentation/style.css

    r23 r30  
    11/* 
    2  * PaperTape Project: Documentation design 
     2 * PaperTape Project: Documentation design. 
     3 *  
     4 * This is a small design I've made up from mind at Do. 12.03.2009 
     5 * while moving from "Paper Tape Project" to "Punched Paper Project". 
     6 *  
     7 * Use it as in the public domain. 
    38 * 
    49 */ 
    5 @import url(http://dev.technikum29.de/src/private.design/style.css); 
     10/* @import url(http://dev.technikum29.de/src/private.design/style.css); */ 
     11 
     12body { 
     13        /*padding: 15px;*/ 
     14        margin: 0; 
     15        font: 12px Verdana,Arial,sans-serif; 
     16} 
     17 
     18img { 
     19        border: none; 
     20} 
     21 
     22#header { 
     23        background-color: black; 
     24        height: 80px; 
     25        position: relative; 
     26        padding-top: 25px; 
     27        padding-left: 20px; 
     28} 
     29 
     30#header h1 { 
     31        color: white; 
     32        font: 30px monospace; 
     33        margin: 0; padding: 0; 
     34} 
     35 
     36#header p.subtitle { 
     37        color: #ce5c00; 
     38        font-family: monospace; 
     39        margin: 0; padding: 0; 
     40} 
     41 
     42#header a.powered-by { 
     43        position: absolute; 
     44        top: 26px; right: 25px; 
     45} 
     46 
     47#navigation { 
     48        width: 185px; 
     49        padding-top: 20px; 
     50        float: left; 
     51        background-color: #EEEEEE; 
     52        border-right: 2px solid black; 
     53        height: 1000px; 
     54} 
     55 
     56#navigation ul { 
     57        margin: 0; padding: 0; 
     58        background-color: #eee; 
     59        padding-left: 10px; 
     60} 
     61 
     62#navigation li { 
     63        margin: 0; padding: 0; 
     64        list-style-type: circle; 
     65        margin-left: 10px; 
     66        color: #3465A4; /* bullets same color as links */ 
     67} 
     68 
     69#navigation a, #navigation strong, #navigation em { 
     70        display: block; 
     71        line-height: 20px; 
     72        font-weight: bold; 
     73        text-decoration: none; 
     74} 
     75 
     76#navigation em { 
     77        font-style: normal; 
     78        color: black; 
     79} 
     80 
     81#navigation strong { 
     82        background-color: black; 
     83        color: white; 
     84} 
     85 
     86#navigation a:link, #navigation a:visited { 
     87        color: #3465a4; 
     88} 
     89 
     90#navigation a:hover { 
     91        background-color: #fff; 
     92        color: #f57900; 
     93} 
     94 
     95 
     96#content { 
     97        margin-left: 195px; 
     98        padding: 15px; 
     99 
     100        text-align: justify; 
     101        line-height: 135%; 
     102} 
     103 
     104#content a:link { 
     105        color: #3465a4; /* from #navigation */ 
     106} 
     107 
     108#footer { 
     109        clear: both; 
     110        margin-top: 15px; 
     111        background-color: #000; 
     112        padding: 20px; 
     113        text-align: center; 
     114        color: white; 
     115} 
     116 
     117#footer a { 
     118        color: #eaeaea; 
     119} 
    6120 
    7121pre { 
  • paper-tape/perl-tools/README.htm

    r23 r30  
    1111   CPAN modules, etc. -- so they'll run on almost every platform. 
    1212 
     13<h3>The files in detail</h3> 
     14 
     15<p>This is an overview over the perl tools: 
     16 
     17<ul> 
     18<li><a href="byte-tester">byte-tester</a>: Will simply output 
     19  a byte with the value you gave the program via argv[1]. Nice 
     20  for sending special bytes via shell scripts to the puncher 
     21<li><a href="hex-meter">hex-meter</a>: Generates a quite long 
     22  byte pattern that contains all possible byte values from 0x00 
     23  up to 0xFF. Nice for debugging and espacially practical for 
     24  counting rapidly the position on another paper tape. 
     25<li><a href="how-long-is-this-papertape">how-long-is-this-papertape</a>: 
     26  This is a kind of <tt>du</tt> shell utility for paper tapes &ndash; 
     27  it won't count the size some files take on your hard disk but 
     28  the length of paper tape they would produce if punched out ;-) 
     29<li><a href="label-it">label-it</a>: A very simple implementation of 
     30  a paper tape font: You input the label via command line arguments 
     31  and this script will produce some bytes that will look like text 
     32  when punched out on a paper tape ;-) 
     33  <br>This was the very first implementation of a paper tape font. 
     34<li><a href="punch-simulator">punch-simulator</a>: A very simple 
     35  program to print out how bytes (reading from STDIN) would look 
     36  on a paper tape. ASCII art :-) 
     37<li><a href="read-file">read-file</a>: This is a simple program that 
     38  reads in numbers from a text file and packs them together to bytes. 
     39  So this behaves a bit like byte-tester, only more complex. 
     40<li><a href="strip-null-bytes.c">strip-null-bytes (C program)</a>: 
     41  This is a quite simple program that strips all null bytes at the 
     42  start and end of a file/stdin and outputs that to stdout. Since 
     43  that s a quite low-level task, it's implemented in C. 
     44<li><a href="alter-udo-parser">udo-parser 0</a>, 
     45    <a href="udo-parser">udo-parser 1</a>: Some simple Perl ASCII 
     46  file parsers that generate byte data to stdout. 
     47</ul> 
     48 
     49 
     50<h3>Copyright for the complete directory</h3> 
    1351<p>Copyright 2008 Sven Köppel, all tools in this directory are 
    1452   released under the GPL. 
© 2008 - 2010 Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License