/user/nix/acre/simpletemplate rename
author:
contributor:
published:
updated:
source uri:
Summary
var id = acre.environ.path_info;
var response = acre.urlopen('GET', acre.environ.freebase_service...
var response = acre.urlopen('GET', acre.environ.freebase_service...
Content
var id = acre.environ.path_info;
var response = acre.urlopen('GET', acre.environ.freebase_service_url + '/api/trans/raw' + id);
acre.start_response(200, {
'content-type': 'text/html; charset="UTF-8"'
});
var body = response.body.replace(/\$([a-z_]+)/, function (vname) {
acre.log('substituting variable reference ' + vname + ' from acre.environ');
return acre.environ[vname.substr(1)];
});
acre.write(body);
var response = acre.urlopen('GET', acre.environ.freebase_service_url + '/api/trans/raw' + id);
acre.start_response(200, {
'content-type': 'text/html; charset="UTF-8"'
});
var body = response.body.replace(/\$([a-z_]+)/, function (vname) {
acre.log('substituting variable reference ' + vname + ' from acre.environ');
return acre.environ[vname.substr(1)];
});
acre.write(body);
Created by:
nix
Feb 28, 2008
Last edited by:
Constant Gardener Process
Aug 18, 2009
Recent Discussions about None
There is no discussion about this document.
Start the Discussion »