Menu

Tree [e46781] master 0.2.0 /
 History

HTTPS access


File Date Author Commit
 CHANGES.txt 2016-12-13 Nutchanon Wetchasit Nutchanon Wetchasit [946285] working around symbolic link issue on code import
 COPYING.txt 2015-11-22 Nutchanon Wetchasit Nutchanon Wetchasit [c4c55f] adding GPL license text
 GRDSHEET.txt 2016-12-13 Nutchanon Wetchasit Nutchanon Wetchasit [ffe31f] noting options order precedence in manual page
 GRIDWEB.txt 2016-12-12 Nutchanon Wetchasit Nutchanon Wetchasit [dd1b66] improving CGI form editing instruction in CGI d...
 LICENSE.txt 2016-06-21 Nutchanon Wetchasit Nutchanon Wetchasit [4f3077] updating copyright date in LICENSE file
 Makefile 2015-12-29 Nutchanon Wetchasit Nutchanon Wetchasit [98c876] making Makefile to use relative-path symbolic l...
 README.txt 2016-12-13 Nutchanon Wetchasit Nutchanon Wetchasit [e46781] removing unnecessary dependency from CGI front end
 autogen.pl 2015-12-04 Nutchanon Wetchasit Nutchanon Wetchasit [0643ac] setting executable bit to program files
 grdsheet.1 2016-12-13 Nutchanon Wetchasit Nutchanon Wetchasit [ffe31f] noting options order precedence in manual page
 grdsheet.pl 2016-12-13 Nutchanon Wetchasit Nutchanon Wetchasit [946285] working around symbolic link issue on code import
 griddraw.pl 2016-12-13 Nutchanon Wetchasit Nutchanon Wetchasit [946285] working around symbolic link issue on code import
 gridweb.htm 2016-12-09 Nutchanon Wetchasit Nutchanon Wetchasit [f3bbc1] adding "None" value support for page-color= CGI...
 gridweb.pl 2016-12-13 Nutchanon Wetchasit Nutchanon Wetchasit [e46781] removing unnecessary dependency from CGI front end
 nodepgen.pl 2015-12-04 Nutchanon Wetchasit Nutchanon Wetchasit [0643ac] setting executable bit to program files
 pdfwrite.pl 2016-06-19 Nutchanon Wetchasit Nutchanon Wetchasit [3f3434] optimizing --copies option by using single set ...

Read Me

GridSheet
Simple printable graph paper generator

GridSheet is a simple, command-line based graphing paper (quadrille paper)
generator, capable of generating colored square grid line of user-selected
size, on customizable paper size, margin or background color; it also supports
two level of grid thickness and color in the same page.

Generated graphing paper pages are uncompressed PDF version 1.3, which can be
viewed and printed using Adobe Acrobat 4.x (or above) or other free software
PDF viewers. On Unix-like environment with CUPS print system, you can also send
them to printer directly via 'lpr' or 'lp' program without a need for viewer.

Other than command line based generator, it also comes with CGI front end,
that allowed it to be used as a web application.

GridSheet is written in Perl, with no dependency on third party module,
thus available on any platform with Perl interpreter.

Project website: http://gridsheet.sourceforge.net/

Contents
--------
1. Background
2. Limitation
3. Installation
   3.1 System Requirement
   3.2 Before Installing
   3.3 Installing on Unix-like System
   3.4 Uninstalling on Unix-like System
   3.5 Installing on Microsoft Windows
   3.6 Installing on DOS
   3.7 Installing on Other System
   3.8 Installing as CGI Program
4. Running
5. Hacking
6. Author


1. BACKGROUND
=============

One day, I have to do some map-related geometry calculation which required
few sheets of quadrille graph paper; it happened that I didn't have any
in stock, since I didn't really use it on regular basis. So I turned to online
tool for printing it out myself, turned out that Kevin Macleod's graph paper
generator <http://www.incompetech.com/graphpaper/> worked well enough.

But when it comes to *offline* graph paper generator program, it was
surprisingly hard to find one that is free software and works cross-platform,
even what I want is a simple user-customizable quadrille generator; all I found
were proprietary and work only on Microsoft Windows or Mac OS X.

So I decided to write one.


2. LIMITATION
=============

GridSheet is currently capable to generate only a quadrille paper (graphing
paper with square grid), not logarithmic, axonometric, triangle, hexagonal,
circular, polar, or other specialized grid lines. And it supports only solid
lines, not dotted lines.


3. INSTALLATION
===============

3.1 System Requirement
----------------------

GridSheet should run on any operating system with Perl interpreter version
5.6.x or above installed:

- In zero-dependency mode, no modules needed.
  (See section '3.7 Installing on Other System' for how to generate
  zero-dependency version of GridSheet)
- In normal mode, core modules ('strict', 'File::Basename', and 'File::Spec')
  are needed.

3.2 Before Installing
---------------------

If you just checked out GridSheet from git repository, you would need to run
following command in source code directory before proceeding to the next step
(assuming your system already have Perl installed):

  perl autogen.pl

Otherwise, just proceed to the next step.

3.3 Installing on Unix-like System
----------------------------------

1. Check whether your system have Perl installed (it's probably installed).
   Try running 'perl -h' on command line. If it works, skip to step 3.

2. Install Perl on your system.
   
   - If you're using GNU/Linux with DEB/APT package system (e.g. Debian,
     Ubuntu), run following command as root:
     
       # apt-get install perl
   
   - If you're using GNU/Linux with RPM/YUM package system (e.g. Redhat,
     Fedora, CentOS), run following command as root:
     
       # yum install perl
   
   - If you're using other Unix-like (or commercial UNIX) system, consult your
     system manual, and see https://www.perl.org/get.html#unix_like

3. Check whether your system have Make installed. (If you wish not to use
   'make', skip to '3.7 Installing on Other System' topic)
   Try running 'make' on command line. If it works, skip to step 5.

4. Install Make on your system.
   
   - If you're using GNU/Linux with DEB/APT package system (e.g. Debian,
     Ubuntu), run following command as root:
     
       # apt-get install make
   
   - If you're using GNU/Linux with RPM/YUM package system (e.g. Redhat,
     Fedora, CentOS), run following command as root:
     
       # yum install make
   
   - If you're using other Unix-like (or commercial UNIX) system, consult your
     system manual.

5. Install GridSheet on your system.
   
   - Unpack the GridSheet's source code to some random directory.
   - Go into GridSheet's source code directory.
   - Run following command in that directory, as root:
     
       # make install
     
     Note 1: if you wish to install just for yourself, run this command instead
     (root privilege is not needed):
     
       $ make PREFIX=${HOME} install
     
     'PREFIX=...' part is the installation location prefix (default is
     'PREFIX=/usr/local', which is for system-wide installation)
     
     Note 2: GridSheet can also be installed in zero-dependency mode (works
     without any of perl's support modules). It can be installed by changing
     'install' word in commands above to 'install-nodepends'.

3.4 Uninstalling on Unix-like System
------------------------------------

To uninstall (on Unix-like system), you just need to do the same step as
installation, but change 'install' word to 'uninstall'.

3.5 Installing on Microsoft Windows
-----------------------------------

1. Check whether your system have Perl installed, by looking in system's
   Control Panel > Add or Remove Programs (or Programs and Features).
   If some version of Perl is installed, skip to step 3.

2. Download and install Perl from Strawberry Perl distribution:
   http://strawberryperl.com/

3. Make sure that Perl's executable is included in system path
   (PATH environment variable), so that running 'perl' on command line works.

4. Proceed to '3.7 Installing on Other System' topic.

3.6 Installing on DOS
---------------------

1. Install Perl on your system:
   
   - Download 'perl588b.zip' binary from
     http://www.cpan.org/ports/archive-2011-03-26.html#msdos
   - Unpack 'perl588b.zip' to a dedicated folder.
   - Include the extracted 'bin' subdirectory in system path (PATH environment
     variable).
   
   Note: Perl requires a functioning DPMI service e.g. HIMEM.SYS or CWSDPMI.
   If you didn't have either of them, download 'csdpmi7b.zip' from
   http://homer.rice.edu/~sandmann/cwsdpmi/index.html
   unpack it, and make sure that 'cwsdpmi.exe' run at system startup.

2. Proceed to '3.7 Installing on Other System' topic.

3.7 Installing on Other System
------------------------------

Note: this assumes that you already have Perl installed on your system.

GridSheet's installation step is optional, you could simply extract the
source code to desired location and run:

  perl grdsheet.pl

to use GridSheet directly. (Note that the file is called 'grdsheet.pl'
not 'gridsheet.pl')

You may also generate a zero-dependency version of GridSheet as well,
by running following command in source directory:

  perl nodepgen.pl pdfwrite.pl griddraw.pl version.pl grdsheet.pl gsheetnd.pl

and use 'gsheetnd.pl' as if it was 'grdsheet.pl'. Also, 'gsheetnd.pl' can be
moved and used in other places too (it was self-contained).

3.8 Installing as CGI Program
-----------------------------

To install GridSheet on your server as a CGI program (web application),
see GRIDWEB.txt.


4. RUNNING
==========

Note: If you run GridSheet directly without installing it, change 'gridsheet'
command below to 'perl grdsheet.pl' or 'perl gsheetnd.pl' accordingly.

To generate a graph paper using default options (A4 portrait, 2 mm grid size,
1 cm major grid size, 1 cm margin):

  gridsheet page.pdf

To generate graph paper with non-default paper size, e.g. B5:

  gridsheet -p B5 page.pdf

To display basic supported options:

  gridsheet -h

See GRDSHEET.txt for detailed description of all available options. If you
installed GridSheet on Unix-like system, this document is also available in
man page format, viewable via 'man gridsheet' command.

For information about running GridSheet as a CGI program, see GRIDWEB.txt.


5. HACKING
==========

There are five main source files in GridSheet, each of them have following
roles:

- grdsheet.pl - Deals with command line based invocation: command line
                parameter parsing, help screen, and unit conversion;
                depends on 'griddraw.pl' and 'version.pl'.
- gridweb.pl  - Deals with CGI-based invocation: CGI parameter parsing,
                and unit conversion; depends on 'griddraw.pl'.
- griddraw.pl - Deals with with grid generation, depends on 'pdfwrite.pl'.
- pdfwrite.pl - Deals with PDF file format, file writing, and drawing commands.
- version.pl  - Contains just version number, no code. In case of git
                repository checkout, it will have to be generated by
                'autogen.pl'.

There is also a separate utility (not installed with GridSheet):

- nodepgen.pl - Generates zero-dependency version of GridSheet.

If you checked out GridSheet from git repository, you'll see an additional
file:

- autogen.pl  - Fetches version number from 'git describe --always' command
                and generate 'version.pl'. Run this every time you make commits
                to GridSheet repository or version number would be out-of-sync.


6. AUTHOR
=========

GridSheet is written by Nutchanon Wetchasit,
released as Free software under GNU General Public License.
For legal information, see LICENSE.txt.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.