SSTorytime

Unified Graph Process For Mapping Knowledge

Declared in: projects/SSTorytime/default.nix

Try the service in a VM

  1. Install Nix
    Bash
    $ apt install --yes curl git jq nix
    Bash
    $ apt install --yes curl git jq nix
    Bash
    $ pacman --sync --refresh --noconfirm curl git jq nix
  2. Download a configuration file
    # default.nix
    {
      ngipkgs ? import (fetchTarball "https://github.com/ngi-nix/ngipkgs/tarball/main") { },
    }:
    ngipkgs.demo-vm (
      {
        pkgs,
        ...
      }:
    
      {
        # install tools (N4L, searchN4L, ...)
        programs.sstorytime.enable = true;
    
        services.sstorytime = {
          enable = true;
          port = 3030;
          openFirewall = true;
          createLocalDatabase = true;
        };
      }
    )
    
  3. Enable binary substituters
    Bash
    $ export NIX_CONFIG='substituters = https://cache.nixos.org/ https://ngi.cachix.org/
    trusted-public-keys = cache.nixos.org-1:6nchdd59x431o0gwypbmraurkbj16zpmqfgspcdshjy= ngi.cachix.org-1:n+cal72roc3qqulxihpv+tw5t42whxmmhpragkrsrow='
  4. Build and run a virtual machine
    Bash
    $ nix-build ./default.nix && ./result
    Bash
    $ nix-build ./default.nix && ./result
    Bash
    $ rev=$(nix-instantiate --eval --attr sources.nixpkgs.rev https://github.com/ngi-nix/ngipkgs/archive/master.tar.gz | jq --raw-output)
    $ nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/$rev.tar.gz --packages nix --run "nix-build ./default.nix && ./result"
    Bash
    $ nix-build ./default.nix && ./result
  5. Usage Instructions
    1. Download an n4l example file from the SSTorytime repository, like SSTorytime.n4l, and ingest it with the following command:

      $ wget https://raw.githubusercontent.com/markburgess/SSTorytime/refs/heads/main/examples/SSTorytime.n4l
      $ N4L -u SSTorytime.n4l
      

      This will transform the file to a graph and upload it to the database.

    2. Search for a term in the graph with the command line:

      searchN4L -v SSTorytime
      

    3. Or visit http://127.0.0.1:3030 in your browser for a visual search

    4. Check out the documentation for more usage examples.

Examples

Enable SSTorytime programs
{
  programs.sstorytime.enable = true;
}

Declared in: projects/SSTorytime/programs/sstorytime/examples/basic.nix

Enable SSTorytime server
{
  pkgs,
  ...
}:

{
  services.sstorytime = {
    enable = true;
    port = 3030;
    openFirewall = true;
    createLocalDatabase = true;
  };
}

Declared in: projects/SSTorytime/services/sstorytime/examples/basic.nix

This project is funded by NLnet through these subgrants:

Commons
SmartSemanticDataLookup

Related links: