niklasl / rdfa-lab Goto Github PK
View Code? Open in Web Editor NEWRDFa application laboratory
Home Page: http://niklasl.github.com/rdfa-lab/
License: MIT License
RDFa application laboratory
Home Page: http://niklasl.github.com/rdfa-lab/
License: MIT License
On example 1 of http://schema.org/CreativeWork, <body itemscope itemtype="http://schema.org/WebPage"> is removed entirely when the conversion bookmarklet is clicked, leaving a dangling property="breadcrumb" assertion outside of any type.
Feature request: Add some instructions to the README that allow a total idiot who knows nothing about JS but is a wizard at CSS to improve on the RDFa CSS
So, I tried to get this working from node, using the following code:
var http = require('http');
var jsdom = require('jsdom');
http.createServer(function (req, res) {
var urlElements = require('url').parse(req.url, true);
console.log(urlElements.query);
if (urlElements.query && urlElements.query["url"]) {
var url = urlElements.query.url;
console.log('load ' + url);
jsdom.env(url, ["http://niklasl.github.com/rdfa-lab/js/rdfa-json.js"],
function(errors, window) {
console.log('loaded ' + window)
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(window.RDFaJSON.extract().data);
});
} else {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end("RDFa Distiller, call with url parameter");
}
}).listen(9393, '127.0.0.1');
console.log('Server running at http://127.0.0.1:9393/');
For some reason, jsdom doesn't get the document, as it bugs out when called. I'm a node neophyte, but it would be good to have a simple node example running which can take a document URL and return the JSON-LD for it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.