Concept "Ontology Management Script"

From SMW CindyKate - Main
Component1617319883
Jump to: navigation, search

Content

Notice:

Application Command "smw-cindykate content manage" makes the following variables available to ontology management scripts

@options
@profile

Example ontology management script

For an overview of all methods available to ontology management scripts, see Overview "Testing smw-cindykate".

# Define pages basket 1
  # Initiate a new pages basket
  my_pages_basket_1 = SMWCindyKate::Pages.new(@options)
  # Specify that this basket will be filled with pages selected from a Git repository
  my_git_repo_1 = SMWCindyKate::OntologyRepository.new('/home/user/smwck_repo1/')
  my_git_repo_1.must_be_a_git_repository!
  my_pages_basket_1.from_REPOSITORY(my_git_repo_1)

# Define pages basket 2
  # Initiate a new pages basket
  my_pages_basket_2 = SMWCindyKate::Pages.new(@options)
  # Specify that this basket will be filled with pages selected from a SMW identified by 'smwck_production', which refers to
  # that SMW's profile information provided by @profile, which parses the YAML file provided by "smw-cindykate --profile <smw-profiles.yaml>"
  my_pages_basket_2.from_SMW(@profile, 'smwck_production')

# Populate my_pages_basket_2 (selecting from 'smwck_production' through MediaWiki's api.php)

Examples