Skip to content

crystal-pool/GrayWing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gray Wing

Queries facts in SPARQL.

A rudimentary Crystal Pool Query service. This is the successor of GrayWing-Prolog, which allows you to query for entities & relations about Warriors, a fiction series authored by Erin Hunter. With SPARQL query language, performing more complex query is possible.

The live site is https://q.crystalpool.cxuesong.com/. You may query for what we have on Crystal Pool with SPAQL query language.

If you are new to this, note that Crystal Pool uses Wikibase, the same MediaWiki extension as in Wikidata. You may found their SPARQL language guide on Wikibooks. Basically the query syntax and even the namespace prefixes are the same with Wikidata. (I haven't figure out how to change the prefixes in a easy fashion for now. Oops. Later wd: might be replaced with cp:)

Crystal Pool is a structured knowledge-base for Warriors. The site is still constructing in progress; thus most of the relations are not available for query. For now it just include most of the kinship & allegiances. If you would like to improve Crystal Pool Wiki, consider requesting for an account. Thank you.

See also

SPARQL query examples

The following query will show you all the cats who belongs or used to belong to ThunderClan, as well as their English labels (aka. names) and genders.

SELECT ?cat ?name ?gender WHERE {
  ?cat    wdt:P3      wd:Q622;       # should be fictional cat character
          wdt:P76     wd:Q627.       # should belong to ThunderClan
  OPTIONAL {
    ?cat    rdfs:label  ?name.
    FILTER(lang(?name) = "en")
  }
  OPTIONAL {
    ?cat    wdt:P78     ?gender.
  }
}

Build & deploy

  1. git clone the whole repository

  2. Navigate to graywing-client directory. Ensure you have installed npm & Angular CLI. Use the following command to restore the packages and build the client site webpages

    npm install
    ng build --prod
  3. Navigate to GrayWing project directory. Configure the configurations. You need to create a appsettings._private.json file, with the following content

    {
      "UseReverseProxy": true,		// Whether the site is behind a reverse proxy. Set to true to prevent unnecessary redirects.
      "ApplicationInsights": {
        "InstrumentationKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"	// AI instrumentation key.
      },
      "ApplicationInsightsStorageFolder": "/tmp/aistorage"	// AI storage folder on non-Windows OS
    }
  4. Build / publish the project using

    dotnet build -c Release
    # or
    dotnet publish -c Release