From 43fff7b04b46891d7705fef7389562c97bb523a0 Mon Sep 17 00:00:00 2001 From: Gabriel Horner Date: Mon, 7 Oct 2024 15:18:01 -0400 Subject: [PATCH] Update docs fixtures --- bb.edn | 2 +- test/fixtures/docs-with-labels.ttl | 104 ++++++++++++++++++++++++-- test/fixtures/docs.ttl | 115 +++++++++++++++++++++++++++-- 3 files changed, 209 insertions(+), 12 deletions(-) diff --git a/bb.edn b/bb.edn index 206e46f..c741f04 100644 --- a/bb.edn +++ b/bb.edn @@ -4,7 +4,7 @@ :task (do (shell "node rdf_export.mjs docs.ttl -d ../docs") - ;; Fixtures are from 4f90db4f371c1ecf750f16ec614f54154d36575c of https://github.com/logseq/docs + ;; Fixtures are from 16a5f81178a0f2d79113aa5f525c768a51fc0972 of https://github.com/logseq/docs (shell "diff test/fixtures/docs.ttl docs.ttl") (shell "ttl docs.ttl") (shell "node rdf_export.mjs docs-with-labels.ttl -d ../docs --add-labels -c '{:exclude-properties [:initial-version :description]}'") diff --git a/test/fixtures/docs-with-labels.ttl b/test/fixtures/docs-with-labels.ttl index b5fa78a..7ffcd34 100644 --- a/test/fixtures/docs-with-labels.ttl +++ b/test/fixtures/docs-with-labels.ttl @@ -24,6 +24,14 @@ d:Android a d:Platform; "Block Reference"; ; d:platforms . + a d:Feature; + "Block embed"; + ; + d:platforms . +d:Boolean a d:Class; + "Boolean"; + s:url s:Boolean; + d:DataType. d:Calculator a d:Command; "Calculator". d:Canvas "Whiteboard/Canvas". @@ -38,6 +46,9 @@ d:Class a d:Class; d:platforms , . d:Cloze a d:Command; "Cloze". + a d:Feature; + "Code block"; + d:platforms . d:Command a d:Class; "Command"; s:url d:Command; @@ -53,6 +64,10 @@ d:Connector "Whiteboard/Tool/Connec a d:Feature; "Custom theme"; d:platforms , . +d:DataType a d:Class; + "DataType"; + s:url s:DataType; + d:Class. d:Desktop a d:Platform; "Desktop". d:Draw a d:Command; @@ -90,6 +105,9 @@ d:Flashcards a d:Feature; d:platforms d:Desktop. "Whiteboard/Tool/Global scale select". "Knowledge Graph". +d:Handbook a d:Feature; + "Handbook"; + d:platforms , . d:Headings a d:Feature; "Headings"; d:platforms . @@ -119,9 +137,15 @@ d:Import a d:Feature; a d:Feature; "Logseq Sync"; d:platforms , , d:Web. + a d:Feature; + "Logseq Sync Encryption"; + d:platforms . d:Macros a d:Feature; "Macros"; d:platforms . + a d:Feature; + "Math Block"; + d:platforms . d:Namespaces a d:Feature; "Namespaces"; d:platforms . @@ -129,12 +153,17 @@ d:Namespaces a d:Feature; "Numbered List"; d:platforms . "Whiteboard/Action Bar". +d:PDF "Whiteboard/Object/PDF". a d:Feature; "PDF highlights"; d:platforms d:Desktop. a d:Feature; "Page and block references"; d:platforms . + a d:Feature; + "Page embed"; + ; + d:platforms . a d:Feature; "Page graph"; d:platforms . @@ -185,6 +214,18 @@ d:Settings a ; "Settings". d:Shape "Whiteboard/Tool/Shape". d:Shapes "Whiteboard/Tool/Shape". + a d:Feature; + "Snap to grid"; + d:platforms . +d:String a d:Class; + "String"; + d:meta "Prefer the name string over text as it maps with xsd:string"; + s:url s:Text; + d:DataType. +d:StringWithRefs a d:Class; + "StringWithRefs"; + s:url d:StringWithRefs; + d:DataType. d:Tables a ; "Tables". d:Tags a d:Feature; @@ -215,6 +256,11 @@ d:Tweets "Whiteboard/Object/Tweet". a d:Feature; "Unlinked References"; d:platforms . +d:Uri a d:Class; + "Uri"; + d:meta "Couldn't use URL since we're case insensitive and url is already taken"; + s:url s:URL; + d:DataType. a d:Feature; "User configuration"; d:platforms . @@ -225,7 +271,6 @@ d:Whiteboard a d:Feature; d:Whiteboards; d:platforms . "Whiteboard/Dashboard". - "Whiteboard/Property/Links". "Whiteboard/Embed". "Whiteboard/Object". "Whiteboard/Object". @@ -258,6 +303,10 @@ d:Whiteboard a d:Feature; "Whiteboard/Object/Image"; d:Image; d:supports "Link to page/block, Mobile context menu". + a ; + "Whiteboard/Object/PDF"; + d:PDF; + d:supports "Edit PDF, Link to page/block". a ; "Whiteboard/Object/Tweet"; d:Tweet, d:Tweets; @@ -270,9 +319,6 @@ d:Whiteboard a d:Feature; "Whiteboard/Object/iFrame"; d:iFrame; d:supports "Reload, Url, Open, Link to page/block, Mobile context menu". - a d:Property; - "Whiteboard/Property/Links"; - . a ; "Whiteboard/Quick Add"; . @@ -338,7 +384,14 @@ d:Zotero a d:Feature; d:platforms . d:description a d:Property; "description"; + d:rangeIncludes d:StringWithRefs; s:url s:description. +d:domainincludes a d:Property; + "domainincludes"; + d:domainIncludes d:Property; + d:rangeIncludes d:Class; + d:sameas s:domainIncludes; + s:url d:domainIncludes. a d:Feature; "export.css"; d:platforms . @@ -346,23 +399,52 @@ d:iFrame "Whiteboard/Object/iFrame" d:iOS a d:Platform; "iOS". d:initial-version a d:Property; - "initial-version". + "initial-version"; + d:domainIncludes d:Feature, d:Tool; + d:rangeIncludes d:String; + s:url d:initial-version. +d:meta a d:Property; + "meta"; + d:rangeIncludes d:String; + s:url d:meta. +d:name a d:Property; + "name"; + d:rangeIncludes d:String; + d:unique true; + s:url s:name. "term/alias". d:parent a d:Property; "parent"; + d:domainIncludes d:Class; + d:rangeIncludes d:Class; s:url . d:platforms a d:Property; - "platforms". + "platforms"; + d:domainIncludes d:Feature, d:Tool; + d:rangeIncludes d:Platform; + s:url d:platforms. a d:Feature; "plugins.edn"; d:platforms d:Desktop. +d:rangeincludes a d:Property; + "rangeincludes"; + d:domainIncludes d:Property; + d:rangeIncludes d:Class; + d:sameas s:rangeIncludes; + s:url d:rangeIncludes. d:sameAs a d:Property; "sameAs"; + d:rangeIncludes d:Uri; s:url . d:slide a d:Feature; "slide"; d:Presentation; d:platforms . +d:supports a d:Property; + "supports"; + d:domainIncludes d:Tool, ; + d:rangeIncludes d:String; + s:url d:supports. d:templates a d:Feature; "templates"; d:platforms , . @@ -371,9 +453,19 @@ d:templates a d:Feature; ; d:platforms . "Block Reference". + "Block embed". + "Page embed". d:type a d:Property; "type"; + d:rangeIncludes d:Class; s:url . +d:unique a d:Property; + "unique"; + d:domainIncludes d:Property; + d:rangeIncludes d:Boolean; + s:url d:unique. d:url a d:Property; "url"; + d:rangeIncludes d:Uri; + d:unique true; s:url s:url. diff --git a/test/fixtures/docs.ttl b/test/fixtures/docs.ttl index 65da06f..29548ff 100644 --- a/test/fixtures/docs.ttl +++ b/test/fixtures/docs.ttl @@ -28,6 +28,15 @@ d:Android a d:Platform; s:description "Clickable link to a particular Logseq block e.g. `((123e4567-e89b-12d3-a456-426614174000))`. Produced by putting a unique [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) inside parenthesis `(())`"; s:name "Block Reference"; s:sameAs . + a d:Feature; + d:platforms ; + s:description "Also known as block embedding, this allows a portion of a page to be displayed within another. Edits made to the embedded content are also made in the referenced content."; + s:name "Block embed"; + s:sameAs . +d:Boolean a d:Class; + s:name "Boolean"; + s:url s:Boolean; + d:DataType. d:Calculator a d:Command; s:description "The calculator supports basic operations like `+ - / * ^` and advanced operations (factorial, modular division, and scientific functions)."; s:name "Calculator". @@ -44,6 +53,10 @@ d:Class a d:Class; d:Cloze a d:Command; s:description d:Flashcards; s:name "Cloze". + a d:Feature; + d:platforms ; + s:description d:Codemirror; + s:name "Code block". d:Command a d:Class; s:description , ; s:name "Command"; @@ -60,6 +73,11 @@ d:Commands a d:Feature; a d:Feature; d:platforms , ; s:name "Custom theme". +d:DataType a d:Class; + s:description "Provides basic data types such as integers, strings, etc. See https://www.w3.org/TR/rdf12-concepts/#section-Datatypes for additional datatypes that could be possible"; + s:name "DataType"; + s:url s:DataType; + d:Class. d:Desktop a d:Platform; s:description "Desktop environments we support are osx, linux and windows. We use [Electron](https://www.electronjs.org/) for desktop."; s:name "Desktop". @@ -92,6 +110,7 @@ d:FeatureTag a d:Class; s:name "Find in page". d:Flashcards a d:Feature; d:platforms ; + s:description "Cards are blocks that are intended to be used as an aid in memorization"; s:name "Flashcards". a d:Feature; d:platforms d:Desktop; @@ -107,6 +126,11 @@ d:Flashcards a d:Feature; d:platforms d:Desktop; s:description , ; s:name "Global configuration". +d:Handbook a d:Feature; + d:initial-version "0.9.20"; + d:platforms , ; + s:description "Provides in app documentation in the form of short tutorials"; + s:name "Handbook". d:Headings a d:Feature; d:platforms ; s:description "Creating headings on a page"; @@ -140,10 +164,17 @@ d:Import a d:Feature; d:platforms , , d:Web; s:description "Paid feature that provides encrypted synchronization of graphs between devices."; s:name "Logseq Sync". + a d:Feature; + d:platforms ; + s:name "Logseq Sync Encryption". d:Macros a d:Feature; d:platforms ; s:description "Provides a way to write and maintain reusable text. This text can render as html and can invoke some other features"; s:name "Macros". + a d:Feature; + d:platforms ; + s:description "Write and render math using https://katex.org/ syntax"; + s:name "Math Block". d:Namespaces a d:Feature; d:platforms ; s:description "Used to group a set of related pages"; @@ -159,6 +190,11 @@ d:Namespaces a d:Feature; a d:Feature; d:platforms ; s:name "Page and block references". + a d:Feature; + d:platforms ; + s:description ; + s:name "Page embed"; + s:sameAs . a d:Feature; d:platforms ; s:description ; @@ -215,6 +251,21 @@ d:Search a d:Feature; s:name "Search". d:Settings a ; s:name "Settings". + a d:Feature; + d:initial-version "0.9.10"; + d:platforms ; + s:description "Snap shapes to canvas grid"; + s:name "Snap to grid". +d:String a d:Class; + d:meta "Prefer the name string over text as it maps with xsd:string"; + s:name "String"; + s:url s:Text; + d:DataType. +d:StringWithRefs a d:Class; + s:description "String that can have page references"; + s:name "StringWithRefs"; + s:url d:StringWithRefs; + d:DataType. d:Tables a ; s:description "Tables are our first versioned component, accepting props to control the output."; s:name "Tables". @@ -242,6 +293,11 @@ d:Thing a d:Class; a d:Feature; d:platforms ; s:name "Unlinked References". +d:Uri a d:Class; + d:meta "Couldn't use URL since we're case insensitive and url is already taken"; + s:name "Uri"; + s:url s:URL; + d:DataType. a d:Feature; d:platforms ; s:description "Users can configure logseq with a number of files."; @@ -288,6 +344,11 @@ d:Whiteboard a d:Feature; d:supports "Link to page/block, Mobile context menu"; s:name "Whiteboard/Object/Image"; s:sameAs d:Image. + a ; + d:supports "Edit PDF, Link to page/block"; + s:description "Embedded PDF"; + s:name "Whiteboard/Object/PDF"; + s:sameAs d:PDF. a ; d:supports "Url, Link to page/block, Mobile context menu"; s:description "Embedded tweets"; @@ -302,9 +363,6 @@ d:Whiteboard a d:Feature; d:supports "Reload, Url, Open, Link to page/block, Mobile context menu"; s:name "Whiteboard/Object/iFrame"; s:sameAs d:iFrame. - a d:Property; - s:name "Whiteboard/Property/Links"; - s:sameAs . a ; s:description d:Block, d:Canvas, , d:Page, d:Whiteboard; s:name "Whiteboard/Quick Add"; @@ -383,8 +441,16 @@ d:Zotero a d:Feature; s:description "Local config file, logseq/custom.js, loads custom js for a graph on startup"; s:name "custom.js". d:description a d:Property; + d:rangeIncludes d:StringWithRefs; s:name "description"; s:url s:description. +d:domainincludes a d:Property; + d:domainIncludes d:Property; + d:rangeIncludes d:Class; + d:sameas s:domainIncludes; + s:description "A more useful version of rdfs:domain as it can be one of multiple values"; + s:name "domainincludes"; + s:url d:domainIncludes. a d:Feature; d:platforms ; s:description "Local config file, logseq/export.css, loads custom css for a published graph"; @@ -393,19 +459,45 @@ d:iOS a d:Platform; s:description "This refers to iOS on mobile. Only versions 14 and greater are supported."; s:name "iOS". d:initial-version a d:Property; - s:name "initial-version". + d:domainIncludes d:Feature, d:Tool; + d:rangeIncludes d:String; + s:name "initial-version"; + s:url d:initial-version. +d:meta a d:Property; + d:rangeIncludes d:String; + s:description "Meta description field which usually discusses organizing thing instead of thing itself"; + s:name "meta"; + s:url d:meta. +d:name a d:Property; + d:rangeIncludes d:String; + d:unique true; + s:name "name"; + s:url s:name. d:parent a d:Property; + d:domainIncludes d:Class; + d:rangeIncludes d:Class; s:description "Used to connect a class with its parent class"; s:name "parent"; s:url . d:platforms a d:Property; - s:name "platforms". + d:domainIncludes d:Feature, d:Tool; + d:rangeIncludes d:Platform; + s:name "platforms"; + s:url d:platforms. a d:Feature; d:initial-version "0.8.9"; d:platforms d:Desktop; s:description d:Plugins; s:name "plugins.edn". +d:rangeincludes a d:Property; + d:domainIncludes d:Property; + d:rangeIncludes d:Class; + d:sameas s:rangeIncludes; + s:description "List of values a property can have"; + s:name "rangeincludes"; + s:url d:rangeIncludes. d:sameAs a d:Property; + d:rangeIncludes d:Uri; s:description "Indicates that two URIs are equivalent"; s:name "sameAs"; s:url . @@ -413,6 +505,11 @@ d:slide a d:Feature; d:platforms ; s:name "slide"; s:sameAs d:Presentation. +d:supports a d:Property; + d:domainIncludes d:Tool, ; + d:rangeIncludes d:String; + s:name "supports"; + s:url d:supports. d:templates a d:Feature; d:platforms , ; s:name "templates". @@ -422,8 +519,16 @@ d:templates a d:Feature; s:name "term/alias"; s:sameAs . d:type a d:Property; + d:rangeIncludes d:Class; s:name "type"; s:url . +d:unique a d:Property; + d:domainIncludes d:Property; + d:rangeIncludes d:Boolean; + s:name "unique"; + s:url d:unique. d:url a d:Property; + d:rangeIncludes d:Uri; + d:unique true; s:name "url"; s:url s:url.