/user/nix/acre/simpletemplate rename

author:

contributor:

published:

updated:

source uri:

Acre Doc /freebase/acre_doc

Handler:

Default Configuration:

Acre Doc /freebase/acre_doc

Handler:

Default Configuration:

Summary

var id = acre.environ.path_info;

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);

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 »
Explore the Data
View all the data we have for /user/nix/acre/simpletemplate
Flag this Document
Why do you want to flag this document?