Skip to content

Instantly share code, notes, and snippets.

View zeffii's full-sized avatar

Dealga McArdle zeffii

View GitHub Profile
@zeffii
zeffii / graphic_report_view_09_w_layers.html
Created November 9, 2011 17:56
Elaboration on visual progress report
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Apt Progress</title>
<link rel="stylesheet" href="../css/style2.css">
<script type="text/javascript" src="../../lib/paper.js"></script>
<script type="text/paperscript" canvas="canvas">
/*
@zeffii
zeffii / style2.css
Created November 9, 2011 17:58
simple style
body {
margin: 0;
overflow: auto;
overflow-y: scroll;
background-color:#FAFAFA;
}
@zeffii
zeffii / visual_progress_report_p4.html
Created November 10, 2011 13:13
Visual Progress Report
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Apt Progress</title>
<link rel="stylesheet" href="../css/style2.css">
<script type="text/javascript" src="../../lib/paper.js"></script>
<script type="text/paperscript" canvas="canvas">
/*
@zeffii
zeffii / graphic_report_view_012_w_sorting_004.html
Created November 11, 2011 20:23
Visual Progress Report sorting
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Apt Progress</title>
<link rel="stylesheet" href="../css/style2.css">
<script type="text/javascript" src="../../lib/paper.js"></script>
<script type="text/paperscript" canvas="canvas">
/*
@zeffii
zeffii / gen_graph.html
Created November 13, 2011 00:21
generative_graphics
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Apt Progress</title>
<link rel="stylesheet" href="../css/style2.css">
<script type="text/javascript" src="../../lib/paper.js"></script>
<script type="text/paperscript" canvas="canvas">
/*
@zeffii
zeffii / paperGen.html
Created November 13, 2011 12:45
paper.js generative
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Apt Progress</title>
<link rel="stylesheet" href="../css/style2.css">
<script type="text/javascript" src="../../lib/paper.js"></script>
<script type="text/paperscript" canvas="canvas_gen">
/*
@zeffii
zeffii / gen_abstract.html
Created November 15, 2011 17:10
generative_abstraction
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Generative Abstraction</title>
<link rel="stylesheet" href="../css/style2.css">
<script type="text/javascript" src="../../lib/paper.js"></script>
<script type="text/paperscript" canvas="canvas_gen">
/*
@zeffii
zeffii / psParser.py
Created November 20, 2011 17:00
Parses a PostScript type 2 file as output by Inkscape.
'''
20 Nov, Dealga McArdle. 2011
This script is released under the MIT license. With no waranty/support of any kind.
PostScript to javascript/paperjs converter written in Python. It should be
obvious to anyone with a brain that Adobe and PostScript are registered trademarks.
The Adobe PostScript References, PLRM.pdf, is available for free from their site.
Their TOC implies that it's OK to write programs that parse their .ps filetype.
I plan to support commands as i encounter them.
@zeffii
zeffii / PostScriptParsing_001.py
Created November 20, 2011 20:50
example of PostScript parsing
newPath = ['78.469 15.207 m', '78.469 7.086 l', '78.469 5.243 78.68 3.899 79.102 3.055 c', '79.676 1.864 80.77 1.153 82.383 0.922 c', '82.844 0.461 l', '82.613 0.059 l', '70.633 0.059 l', '70.402 0.461 l', '70.691 0.922 l', '72.188 1.153 73.227 1.883 73.801 3.11 c', '74.184 3.957 74.375 5.282 74.375 7.086 c', '74.375 31.739 l', '74.375 34.196 73.703 35.539 72.363 35.77 c', '71.383 35.946 l', '71.152 36.52 l', '71.324 36.75 l', '77.719 38.996 l', '78.238 38.996 l', '78.238 32.95 l', '81.039 37.133 84.574 39.227 88.836 39.227 c', '92.254 39.227 95.094 37.93 97.359 35.336 c', '99.625 32.746 100.758 29.723 100.758 26.266 c', '100.758 22.348 99.402 18.981 96.695 16.157 c', '93.988 13.336 90.68 11.922 86.762 11.922 c', '83.422 11.922 80.656 13.016 78.469 15.207 c', 'h', '78.469 21.715 m', '78.813 19.336 79.793 17.375 81.406 15.84 c', '83.016 14.305 84.996 13.536 87.336 13.536 c', '90.258 13.536 92.504 14.746 94.078 17.164 c', '95.422 19.2 96.094 21.754 96.094 24.825 c', '96.094 28.129 95.383 30.891 93.961 33.121 c'
@zeffii
zeffii / fileParsing_without_javascriptWriting.py
Created November 20, 2011 20:54
slightly elaborated and corrected version
'''
20 Nov, Dealga McArdle. 2011
This script is released under the MIT license. With no warranty/support of any kind.
PostScript to javascript/paperjs converter written in Python. It should be
obvious to anyone with a brain that Adobe and PostScript are registered trademarks.
The Adobe PostScript References, PLRM.pdf, is available for free from their site.
Their TOC implies that it's OK to write programs that parse their .ps filetype.
I plan to support commands as i encounter them.