Permalink
Browse files

updated doc re validation

  • Loading branch information...
1 parent d2496b3 commit 74ef03219804f111ad404dd593f00e14c97f948d mhausenblas committed Aug 1, 2011
Showing with 20 additions and 4 deletions.
  1. +16 −0 README.md
  2. +4 −4 web.instata.py
View
16 README.md
@@ -104,6 +104,22 @@ Example:
Note that in the configuration file you can specify one or more schema matchings (via `c:schema_matching`) as well as customise the output (`c:base_template` as well as `c:base_style_file`). The last block (metadata) is for completeness purposes and currently not used by web.instata - you may remove it if you want.
+### Validation of input
+
+In order to check if the input CSV file uses Schema.org terms:
+
+ python web.instata.py -v {path to CSV file} {base URI for publishing}
+
+Example:
+
+ python web.instata.py -v test/potd_0.csv http://example.org/instata/potd_0
+
+... and you should see the following on the command line:
+
+ [web.instata] validating schema ...
+ [web.instata] all column headings in the input file test/potd_0.csv seem to be valid Schema.org terms :)
+
+
### Data dump
In order to get a RDF/Turtle data dump from a CSV file:
View
8 web.instata.py
@@ -257,16 +257,16 @@ def usage():
print("[web.instata] result is now available at [%s]" %(r))
elif opt in ("-d", "--dump"):
(doc_url, base_uri) = (args[0], args[1])
- print("processing [%s] with base URI [%s] " %(doc_url, base_uri))
+ print("[web.instata] processing [%s] with base URI [%s] " %(doc_url, base_uri))
iwdp.parse(doc_url, base_uri)
print(iwdp.dump_data())
elif opt in ("-v", "--validate"):
(doc_url, base_uri) = (args[0], args[1])
- print("validating schema ...")
+ print("[web.instata] validating schema ...")
(summary, detailed_results) = iwdp.validate(doc_url, base_uri)
- if summary: print("All column headings in the input file %s seem to be valid Schema.org terms :)" %doc_url)
+ if summary: print("[web.instata] all column headings in the input file %s seem to be valid Schema.org terms :)" %doc_url)
else:
- print("During the validation at least one column heading in input file %s seems not to be a valid Schema.org term :(" %doc_url)
+ print("[web.instata] during the validation at least one column heading in input file %s seems not to be a valid Schema.org term :(" %doc_url)
print(detailed_results)
except getopt.GetoptError, err:
print str(err)

0 comments on commit 74ef032

Please sign in to comment.