Difference between revisions of "C181015155810"

From Dataspects
C181015155810
Jump to: navigation, search
(Example: extract pages from a MediaWiki)
 
Line 9: Line 9:
 
=== Example: extract pages from a MediaWiki ===
 
=== Example: extract pages from a MediaWiki ===
  
<syntaxhighlight lang="ruby">
+
<syntaxhighlight lang="ruby" line>
 
require 'dataspects'
 
require 'dataspects'
  

Latest revision as of 14:55, 8 February 2019





Requirements[edit | edit source]

Example: extract pages from a MediaWiki[edit | edit source]

 1 require 'dataspects'
 2 
 3 repo = OntologyRepository.new()
 4 repo.create_new_at_URL("/tmp/ontology_repository")
 5 mediawiki = MediaWiki.new(
 6   url: "https://cookbook.findandlearn.net/w",
 7   user: "",
 8   password: "",
 9   log_in: :must_log_in
10 )
11 mediawiki.resources_from_ASK_QUERY("[[HasElasticConceptType::QueryType]]") do |mediawiki_page|
12   repo.store_RESOURCE(mediawiki_page)
13 end