Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2485023cee | |||
| a3cc75c3ec | |||
| 2cf8123025 | |||
| 56806a0bef | |||
| 3b1bca9c41 | |||
| 474b259cef | |||
| 53848f1a11 | |||
| 8148dbbf36 | |||
| b9d5e43d96 | |||
| 420f1735ea | |||
| 5962f7dea3 | |||
| 34f8945d76 | |||
| c1e5a6c226 | |||
| c2ff166f61 | |||
| 57bdc1eb33 | |||
| 1737a2d2e3 | |||
| 37177e3927 | |||
| 759cd645d4 | |||
| a02dde35d9 | |||
| 4c9f26a09b | |||
| cfbc836815 | |||
| 6b5d4f551f | |||
| 275bd069c4 | |||
| ddbce4b4d8 | |||
| 96e409a72f | |||
| e6b9d81618 | |||
| 5151310092 | |||
| 59b9924d46 | |||
| a7b02f434e | |||
| ca9b21e46a | |||
| 5114955252 | |||
| 171d96db63 | |||
| 730c25b9be | |||
| e8e60e82c7 | |||
| e1bd1f73d3 | |||
| 971ee4a2c2 | |||
| eccf0492f0 | |||
| 35e5543075 | |||
| c3d457ec50 | |||
| b89560b0cd |
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 231 KiB |
|
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 182 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 190 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 804 KiB |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 506 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
@@ -0,0 +1,69 @@
|
||||
var fs = require('fs')
|
||||
var gs = require('ghostscript')
|
||||
var path = require('path')
|
||||
|
||||
var reckon_path = "."
|
||||
var export_path = "export"
|
||||
var index_name = "index.json"
|
||||
|
||||
if(!fs.existsSync(export_path))
|
||||
fs.mkdirSync(export_path);
|
||||
|
||||
var index = [];
|
||||
var index_path = path.join(export_path, index_name);
|
||||
if(fs.existsSync(index_path))
|
||||
index = JSON.parse(fs.readFileSync(index_path, 'utf8'));
|
||||
|
||||
|
||||
fs.readdir(reckon_path, function(err, files) {
|
||||
if(err)
|
||||
throw err;
|
||||
files.map(function (f) {
|
||||
return {"name" : f, "path" : path.join(reckon_path, f)};
|
||||
}).filter(function (f) {
|
||||
return (fs.statSync(f.path).isFile() && path.extname(f.path) === '.pdf' && !exists(f.name));
|
||||
}).forEach(function (f) {
|
||||
var img_fname = extract_img(f.path);
|
||||
var entry = {}
|
||||
entry.name = f.name;
|
||||
entry.imgs = [];
|
||||
entry.imgs.push(img_fname);
|
||||
index.push(entry);
|
||||
})
|
||||
|
||||
var index_content = JSON.stringify(index, null, 2);
|
||||
fs.writeFile(index_path, index_content, function(err) {
|
||||
if(err) return console.log(err);
|
||||
console.log(index_path + '>' + index_content);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
function extract_img(file) {
|
||||
|
||||
var out_name = path.basename(file) + ".png"
|
||||
var out = path.join(export_path, out_name);
|
||||
|
||||
gs()
|
||||
.batch()
|
||||
.quiet()
|
||||
.nopause()
|
||||
.device('pngalpha')
|
||||
.input(file)
|
||||
.output(out)
|
||||
.r(72)
|
||||
.spawn();
|
||||
|
||||
return out_name;
|
||||
|
||||
}
|
||||
|
||||
function exists(fname) {
|
||||
for (var e in index) {
|
||||
if(index[e].name === fname)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.3 MiB |
|
After Width: | Height: | Size: 1015 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 699 KiB |
|
After Width: | Height: | Size: 773 KiB |
|
After Width: | Height: | Size: 850 KiB |
|
After Width: | Height: | Size: 150 KiB |
|
After Width: | Height: | Size: 7.4 MiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 28 MiB |
|
After Width: | Height: | Size: 646 KiB |
|
After Width: | Height: | Size: 423 KiB |
|
After Width: | Height: | Size: 591 KiB |
|
After Width: | Height: | Size: 634 KiB |
|
After Width: | Height: | Size: 787 KiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 586 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 165 KiB |
@@ -0,0 +1,146 @@
|
||||
[
|
||||
{
|
||||
"name": "A Spreadsheet Way of Knowledge — Backchannel — Medium.pdf",
|
||||
"imgs": [
|
||||
"A Spreadsheet Way of Knowledge — Backchannel — Medium.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Adding Machines.pdf",
|
||||
"imgs": [
|
||||
"Adding Machines.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Barnes_Alan Kay-Transforming the Computer into a Communication Medium_2007.pdf",
|
||||
"imgs": [
|
||||
"Barnes_Alan Kay-Transforming the Computer into a Communication Medium_2007.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Capurro_Past present and future of the concept of information_2009.pdf",
|
||||
"imgs": [
|
||||
"Capurro_Past present and future of the concept of information_2009.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Copeland_Computation_2004.pdf",
|
||||
"imgs": [
|
||||
"Copeland_Computation_2004.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Gilles Deleuze - The Exhausted.pdf",
|
||||
"imgs": [
|
||||
"Gilles Deleuze - The Exhausted.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Grier-CarpetForcomputingRoom.pdf",
|
||||
"imgs": [
|
||||
"Grier-CarpetForcomputingRoom.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "History of Computation - 16-19th Century Work.pdf",
|
||||
"imgs": [
|
||||
"History of Computation - 16-19th Century Work.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Leibniz_ArithmetiqueBinaire.pdf",
|
||||
"imgs": [
|
||||
"Leibniz_ArithmetiqueBinaire.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MR1418.deviates.pdf",
|
||||
"imgs": [
|
||||
"MR1418.deviates.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "National Research Counil bibliography of mathematical tables and other aids to computation_1939.pdf",
|
||||
"imgs": [
|
||||
"National Research Counil bibliography of mathematical tables and other aids to computation_1939.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Pickering_The Cybernetic Brain Sketches of Another Future_2010 copy.pdf",
|
||||
"imgs": [
|
||||
"Pickering_The Cybernetic Brain Sketches of Another Future_2010 copy.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Prentice_Calculating machines calculating women-redesigning astronomical and scientific computation in Britian 1915-1946_2000.pdf",
|
||||
"imgs": [
|
||||
"Prentice_Calculating machines calculating women-redesigning astronomical and scientific computation in Britian 1915-1946_2000.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "RCA_Tables of Trigonometric Functions and Non-sexagesimal arguements_1943.pdf",
|
||||
"imgs": [
|
||||
"RCA_Tables of Trigonometric Functions and Non-sexagesimal arguements_1943.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Skinner_The age of the female computers_2006.pdf",
|
||||
"imgs": [
|
||||
"Skinner_The age of the female computers_2006.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Turing_Computing machinery and intelligence_1950_ORIGINAL.pdf",
|
||||
"imgs": [
|
||||
"Turing_Computing machinery and intelligence_1950_ORIGINAL.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Turing_On Computable Numbers_1936.pdf",
|
||||
"imgs": [
|
||||
"Turing_On Computable Numbers_1936.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VonNeumann-EDVAC-2003-08-TheFirstDraft.pdf",
|
||||
"imgs": [
|
||||
"VonNeumann-EDVAC-2003-08-TheFirstDraft.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VonNeumann56-LOGIC-AUTOMATA-ERROR-REDUNDANCY.pdf",
|
||||
"imgs": [
|
||||
"VonNeumann56-LOGIC-AUTOMATA-ERROR-REDUNDANCY.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VonNeumann_PlanningCoding.pdf",
|
||||
"imgs": [
|
||||
"VonNeumann_PlanningCoding.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Wikipedia_Computational Logic.pdf",
|
||||
"imgs": [
|
||||
"Wikipedia_Computational Logic.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Women Computers in World War II - GHN: IEEE Global History Network.pdf",
|
||||
"imgs": [
|
||||
"Women Computers in World War II - GHN: IEEE Global History Network.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "computation-OED.pdf",
|
||||
"imgs": [
|
||||
"computation-OED.pdf.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "reckon, v. : Oxford English Dictionary.pdf",
|
||||
"imgs": [
|
||||
"reckon, v. : Oxford English Dictionary.pdf.png"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
After Width: | Height: | Size: 1.6 MiB |
@@ -0,0 +1,141 @@
|
||||
var nodegit = require('nodegit')
|
||||
var path = require('path')
|
||||
var fs = require('fs')
|
||||
|
||||
var all = []
|
||||
|
||||
var git_data = []
|
||||
|
||||
var cnt = 0;
|
||||
|
||||
var export_path = 'export';
|
||||
//var export_path = '/Users/gauthiier/Desktop/vbox/reckon_export/export';
|
||||
var export_index_fname = 'index.json';
|
||||
var export_index = null;
|
||||
|
||||
var template = '';
|
||||
|
||||
var imgs_list_ext_valid = ['.png', '.jpeg', '.jpg', '.gif']
|
||||
|
||||
fs.readFile('template.html', 'utf8', function(err, data) {
|
||||
if(err) console.log(err);
|
||||
template = data;
|
||||
});
|
||||
|
||||
// hmm...
|
||||
var export_index_path = path.join(export_path, export_index_fname);
|
||||
if(fs.existsSync(export_index_path))
|
||||
export_index = JSON.parse(fs.readFileSync(export_index_path, 'utf8'));
|
||||
|
||||
nodegit.Repository.open(path.resolve(__dirname, './.git'))
|
||||
.then(function(repo) {
|
||||
return repo.getBranchCommit('prototype');
|
||||
})
|
||||
.then(function(first_commit) {
|
||||
var history = first_commit.history(nodegit.Revwalk.SORT.REVERSE);
|
||||
//var history = first_commit.history(nodegit.Revwalk.SORT.TIME);
|
||||
|
||||
history.on("commit", function(commit) {
|
||||
|
||||
var entry = {};
|
||||
|
||||
entry.commit = commit.sha();
|
||||
entry.author = commit.author().name();
|
||||
entry.date = commit.date();
|
||||
entry.raw = commit.rawHeader();
|
||||
entry.message = commit.message().replace('\n', ' — ');
|
||||
entry.files = [];
|
||||
|
||||
|
||||
commit.getTree()
|
||||
.then(function (tree) {
|
||||
var entries = tree.entries();
|
||||
|
||||
for(e in entries) {
|
||||
var ep = entries[e].path();
|
||||
if(all.indexOf(ep) != -1) continue;
|
||||
all.push(ep);
|
||||
entry.files.push(ep);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
git_data.push(entry);
|
||||
|
||||
});
|
||||
|
||||
history.on("end", function() {
|
||||
var body = '';
|
||||
git_data.reverse();
|
||||
for(var i in git_data)
|
||||
body += emit_git_entry(git_data[i]);
|
||||
console.log(template.replace('[[_export_]]', body));
|
||||
});
|
||||
|
||||
history.start();
|
||||
|
||||
})
|
||||
.done();
|
||||
|
||||
function emit_git_entry(entry) {
|
||||
|
||||
var html = '<!-- entry #' + cnt++ + ' -->\n';
|
||||
|
||||
html += '<entry>\n'
|
||||
|
||||
html += ' <commit><h1>Commit: ' + entry.commit + '</h1></commit>\n';
|
||||
|
||||
html += ' <commit>' + entry.date + '</commit>\n';
|
||||
|
||||
html += ' <message><h2>' + entry.message + '</h2></message>\n';
|
||||
|
||||
html += ' <content>\n';
|
||||
|
||||
for(var q in entry.files) {
|
||||
html += ' ' + emit_git_content(entry.files[q]);
|
||||
}
|
||||
|
||||
html += ' </content>\n';
|
||||
|
||||
return html + '</entry>\n'
|
||||
}
|
||||
|
||||
function emit_git_content(c) {
|
||||
|
||||
|
||||
if(!fs.existsSync(path.join('.', c))) return '';
|
||||
if(!fs.statSync(path.join('.', c)).isFile()) return '';
|
||||
|
||||
var ext = path.extname(c);
|
||||
|
||||
if(imgs_list_ext_valid.indexOf(ext) != -1)
|
||||
return '<a href="' + c + '"><img src="' + c + '"/></a>\n';
|
||||
else if(ext === '.pdf') {
|
||||
return '<a href="' + c + '">' + emit_git_content_pdf(c) + '</a>';
|
||||
} else {
|
||||
return '<a href="' + c + '">' + c + '</a>\n';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function emit_git_content_pdf(c) {
|
||||
|
||||
var index = exists(c);
|
||||
if(!index) return '';
|
||||
|
||||
return '<img src="' + path.join(export_path, index.imgs[0]) + '"/>\n';
|
||||
|
||||
}
|
||||
|
||||
/// hmmm....
|
||||
function exists(fname) {
|
||||
|
||||
if(!export_index) return null;
|
||||
for (var e in export_index) {
|
||||
if(export_index[e].name === fname)
|
||||
return export_index[e];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 2.3 MiB |
|
After Width: | Height: | Size: 391 KiB |
|
Before Width: | Height: | Size: 408 KiB After Width: | Height: | Size: 408 KiB |
|
After Width: | Height: | Size: 105 KiB |
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "reckon",
|
||||
"version": "0.0.0",
|
||||
"description": "Reckoning Histories of Computation",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/gauthiier/reckon.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Arcades",
|
||||
"Project"
|
||||
],
|
||||
"author": "gauthiier",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/gauthiier/reckon/issues"
|
||||
},
|
||||
"homepage": "https://github.com/gauthiier/reckon",
|
||||
"dependencies": {
|
||||
"ghostscript": "https://github.com/gauthiier/node-ghostscript/tarball/master",
|
||||
"nodegit": "^0.4.0"
|
||||
},
|
||||
"scripts" : {
|
||||
"export": "node export.js",
|
||||
"index": "node index.js > index.html"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 488 KiB |
@@ -0,0 +1,43 @@
|
||||
body {
|
||||
font-family: "Times New Roman", Times, Georgia, serif;
|
||||
background-color: #ffff99;
|
||||
bbackground-color: #e9d6a8;
|
||||
bbackground-color: #eeeeee;
|
||||
}
|
||||
|
||||
#listing {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#title {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: center;
|
||||
margin: 3em;
|
||||
}
|
||||
|
||||
entry {
|
||||
display: block;
|
||||
width: 75%;
|
||||
border: 1px solid grey;
|
||||
min-width: 650px;
|
||||
margin-top: 0.6em;
|
||||
padding: 0.6em;
|
||||
background-color: #ffffcc;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
commit {
|
||||
display: block;
|
||||
}
|
||||
|
||||
content {
|
||||
display: block;
|
||||
}
|
||||
|
||||
content img {
|
||||
max-width: 300px;
|
||||
border: 1px solid grey;
|
||||
background-color: white;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 171 KiB After Width: | Height: | Size: 171 KiB |
@@ -0,0 +1,13 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="reckon.css"/>
|
||||
<title>Performing Histories of Computation</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="listing">
|
||||
<div id="title"><h1>Performing Histories of Computation</h1></div>
|
||||
[[_export_]]
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||