Git Product home page Git Product logo

rdf-distiller's People

Contributors

dependabot[bot] avatar gkellogg avatar janpot avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rdf-distiller's Issues

NoMethodError when trying to transform

Unable to transform https://dokie.li/ . When I select RDFa->JSON-LD and raw:

http://rdf.greggkellogg.net/distiller?command=serialize&format=rdfa&output_format=jsonld&url=https:%2F%2Fdokie.li%2F&raw

There is a NoMethodError: undefined method `end_with?' for nil:NilClass

Did I miss an option somewhere? I've tried different formats but no go. RDFa is well-formed and valid as far as I can tell.

I get the same issue with other URLs eg http://csarven.ca/dokieli-rww

Preserve form options on form submit

When checking options such as Show Parser debug information and submitting the form, the option is not kept on form reload. I think it should remain checked for the next form submission (other values like URI or markup do carry over to the form after submission).

Add support for IRIs in JSON-LD @context

Following up on the recent CSVW issue w3c/csvw#872 - I ran into a similar issue with your RDF distiller, where, e.g.

{
	"@context": "https://pod-test.mvcr.gov.cz/otevřené-formální-normy/témata-dizertačních-prací/draft/kontexty/téma-dizertační-práce.jsonld",
	"typ": "Téma dizertační práce",
	"název": {
		"cs": "2D nanomateriály pro detekci polutantů v životním prostředí"
	},
	"popis": {
		"cs": "Práce se soustředí na přípravu 2D materiálů, které budou sloužit k odstraňování škodlivin ze životního prostředí. Cílem je vyvinout účinný materiál/katalyzátor k odstranění nitroaromatických a pesticidních látek v podzemních vodách pomocí elektrochemických a fotoelektrochemických metod. Více na www.nanorobots.cz"
	}
}

yields

Failed to parse input document: loading remote context failed: https://pod-test.mvcr.gov.cz/otevřené-formální-normy/témata-dizertačních-prací/draft/kontexty/téma-dizertační-práce.jsonld: URI must be ascii only "https://pod-test.mvcr.gov.cz/otev\u0159en\u00E9-form\u00E1ln\u00ED-normy/t\u00E9mata-dizerta\u010Dn\u00EDch-prac\u00ED/draft/kontexty/t\u00E9ma-dizerta\u010Dn\u00ED-pr\u00E1ce.jsonld"

Any chance of update here?

document web form and command-line options

Some of the options on the web form are non-obvious, and I can't find them in the documentation http://rdf.greggkellogg.net/yard/RDF/Distiller/Application.html (probably because the search is not full-text search but only class/method names). Some of the options have an informative tooltip, but it's not always enough, and others don't have it.

The following come from https://www.w3.org/TR/json-ld11-framing/#framing-keywords. But it'd be very useful if you describe them and link to motivating examples in the spec

  • explicit "Only include explicitly declared properties in output"
  • omitDefault "Omit missing properties from output": what else could you do with missing properties, output them as null?
  • requireAll "Require all properties to match": (the further mention of --no-compact-to-relative is wrong)
  • embed: please explain this

If this is already documented, please excuse me and point me to the doc. Cheers!

curl example

I am working on ceurws/lod#22 and your great tool is mentioned there with an example:

http://rdf.greggkellogg.net/distiller?command=serialize&url=http:%2F%2Fceur-ws.org%2FVol-2549%2F

how would i get the pure result via curl? I didn't find anything about this in the documentation.

curl "http://rdf.greggkellogg.net/distiller?command=serialize&url=http:%2F%2Fceur-ws.org%2FVol-2549%2F"

returns a html page. The accept header topic is mentioned in two other issues e.g. #11 but i did't find an example

see also https://stackoverflow.com/questions/73385469/how-to-use-rdfdistiller-via-curl

OrganizationRole

This structure correctly validates:

{
"@context": {
"@vocab": "http://schema.org/"
},
"@type": "Person",
"name": "Delia Derbyshire",
"sameAs": "http://en.wikipedia.org/wiki/Delia_Derbyshire",
"alumniOf": {
"@type": "OrganizationRole",
"alumniOf": {
"@type": "CollegeOrUniversity",
"name": "University of Cambridge",
"sameAs": "http://en.wikipedia.org/wiki/University_of_Cambridge"
},
"startDate": "1959"
}
}

But when I select:

Raw Output

Distiller throws this error:

XML Parsing Error: not well-formed
Location: http://rdf.greggkellogg.net/distiller
Line Number 5, Column 34:
<ns5:OrganizationRole http://www.w3.org/1999/02/22-rdf-syntax-ns#nodeID='b1'>
---------------------------------^

Source:
https://schema.org/OrganizationRole

/jay

add a "share permalink" feature

I realized almost by chance that the distiller accepts input as a URL parameter.

It seems a low hanging fruit, then, to add a button to generate a permalink allowing people to share the result of the distiller, on a given example, into a single URL...

Internal Server Error with N-Triples output

STR in http://rdf.greggkellogg.net/distiller:

  • Paste this as input:
<ol vocab="http://schema.org/" typeof="ItemList">
  <li property="itemListElement" typeof="ListItem">
      <a property="item" typeof="WebPage" href="http://www.example.com/dresses">
        <span property="title">Dresses</span>
      </a>
      <meta property="position" content="1">
  </li>
›  <li property="itemListElement" typeof="ListItem">
      <a property="item" typeof="WebPage" href="http://www.example.com/dresses/real">
        <span property="title">Real Dresses</span>
      </a>
      <meta property="position" content="2">
  </li>
</ol>
  • choose Input: RDFa
  • choose Output: ntriples
  • submit

This url works though as ntriples: https://dvcs.w3.org/hg/webschema/raw-file/a4761ed99160/schema.org/drafts/examples/site/testcases/rdfa/sdo_eg_rdfa_1.html

Internal server error on invalid input (circular itemrefs)

<div itemscope>
  <div id="ref">
    <div itemprop="name">friend1</div>
    <div itemprop="friend" itemscope>
      <div itemprop="name">friend2</div>
      <div itemprop="friend" itemscope itemref="ref"></div>
    </div>
  </div>
</div>

This is invalid but crashes the server

JSON-LD parser differences from JSON-LD Playground

Hi Greg,

Not sure where the problem is, here. It maybe with the RDF::Writer? I checked on the Distiller page to make sure that it behaved the same as my code. Here's the problem:

this JSON-LD:
{ "@context": "https://rawcdn.githack.com/ResearchObject/ro-crate/8c85e590155d0e81d47786628838ab25a1035359/docs/1.1-DRAFT/context.jsonld", "@graph": [ { "@id": "ro-crate-metadata.jsonld", "@type": "CreativeWork", "about": { "@id": "./" } }, { "@id": "ro-crate-preview.html", "@type": "CreativeWork", "about": { "@id": "./" } }, { "@id": "./", "@type": "Dataset", "name": [ "Situación de COVID-19 en España" ], "publisher": { "@id": "https://ror.org/00ca2c886" }, "creator": [ { "@id": "https://ror.org/00ca2c886" } ], "url": [ "https://covid19.isciii.es/resources/serie_historica_acumulados.csv" ] } ] }

uses relative paths as its identifiers. the @context does not have a @base (which is good, because the content of these files will move around). However, when I read/write from JSON-LD to Turtle (RDF::Turtle::Writer) it doesn't write anything. Putting the same JSON-LD into the https://json-ld.org/playground/ yields valid RDF, by assuming the base is the local base URI and all relative IDs become relative to that. I have attempted to set base_uri: in the Writer, but it didn't seem to make a difference.

I've run out of troubleshooting ideas. Can you suggest a path forward?

Cheers!

Handle UI input format and server Content-Type mismatch

Under "Form URL", user inputs:
URI: http://csarven.ca/.ttl
Input format: rdfa, Output format: turtle

The Accept header is sent as application/n-triples, text/plain;q=0.2, application/n-quads, text/x-nquads;q=0.2, application/ld+json, application/x-ld+json, application/rdf+json, text/html;q=0.5, application/xhtml+xml;q=0.7, image/svg+xml;q=0.4, text/n3, text/rdf+n3;q=0.2, application/rdf+n3;q=0.2, text/turtle, text/rdf+turtle, application/turtle;q=0.2, application/x-turtle;q=0.2, application/rdf+xml, text/csv;q=0.4, text/tab-separated-values;q=0.4, application/csvm+json, application/trig, application/x-trig;q=0.2, application/trix, */*;q=0.1

If the server returns Content-Type: text/turtle, distiller behind the scenes still tries to parse the response body as RDFa. Returns Error:

Errors found during processing
<http://csarven.ca/.ttl>: error parsing attribute name
Tag http: invalid
Tag https: invalid
Tag irc: invalid
Namespace prefix mailto is not defined
Tag mailto:info invalid

There should be an alert to the user that the response was in a serialization format that's different than the input format that was selected in the UI, and maybe suggest that something along the lines of "Expected RDFa but parsing as Turtle". Same goes for any input format and actual Content-Type value.

'incompatible character encodings' on some form input

Trying to use the distiller with the form input method on the website http://www.burny-shop.de/. (view-source in chrome and copy+paste in the markup field). It always returns with

incompatible character encodings: ASCII-8BIT and UTF-8

I have this issue on a lot of sites and it was introduced in 1.1.11 o2 1.1.12. I didn't have this before. It seems to be the following line that makes this happen:

<a  href="?ObjectPath=/Shops/62542650/Categories/Zubeh%C3%B6r">Zubehör</a>

You can just copy+paste this line in the markup box to see the problem in action

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.