pdsinterop / conventions

Conventions around how apps and services store data on your personal data store
https://pdsinterop.org/conventions/
4 stars 2 forks source link

Add Dokieli bookmarks format #28

Open michielbdejong opened 7 months ago

michielbdejong commented 7 months ago

See Sarven's message in solid/specification on 31 Jan 2024: https://matrix.to/#/!QxZtVBYQfMeMTnespj:gitter.im/$6pNdQaTDnyvoMKhqsv68zwyoXyAFnW9oEJkegM5Forc?via=gitter.im&via=matrix.org&via=envs.net

curl -H'Accept: application/ld+json' https://linkedresearch.org/annotation/csarven.ca/%23i/9b041688-2491-4b41-98b5-e06caf091cda.jsonld | jq
{
  "@id": "",
  "@type": [
    "http://www.w3.org/ns/oa#Annotation"
  ],
  "http://schema.org/name": {
    "@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",
    "@value": "Sarven Capadisli bookmarks"
  },
  "http://www.w3.org/ns/oa#motivatedBy": {
    "@id": "http://www.w3.org/ns/oa#bookmarking"
  },
  "http://schema.org/creator": {
    "@id": "https://csarven.ca/#i",
    "@type": [
      "http://schema.org/Person"
    ],
    "http://schema.org/image": {
      "@id": "https://csarven.ca/media/images/sarven-capadisli.jpg"
    },
    "http://schema.org/name": {
      "@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",
      "@value": "Sarven Capadisli"
    }
  },
  "http://schema.org/datePublished": {
    "@type": "http://www.w3.org/2001/XMLSchema#dateTime",
    "@value": "2024-01-31T10:36:18.984Z"
  },
  "http://www.w3.org/ns/oa#canonical": {
    "@id": "urn:uuid:9b041688-2491-4b41-98b5-e06caf091cda"
  },
  "http://www.w3.org/ns/oa#hasTarget": {
    "@id": "https://pdsinterop.org/conventions/bookmark/#main-content",
    "@type": [
      "http://www.w3.org/ns/oa#SpecificResource"
    ],
    "http://www.w3.org/ns/oa#hasSource": {
      "@id": "https://pdsinterop.org/conventions/bookmark/"
    },
    "http://purl.org/dc/terms/language": {
      "@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",
      "@value": "en-US"
    },
    "http://www.w3.org/ns/oa#hasSelector": {
      "@id": "#fragment-selector",
      "@type": [
        "http://www.w3.org/ns/oa#FragmentSelector"
      ],
      "http://purl.org/dc/terms/conformsTo": {
        "@id": "https://tools.ietf.org/html/rfc3987"
      },
      "http://www.w3.org/1999/02/22-rdf-syntax-ns#value": {
        "@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",
        "@value": "main-content"
      },
      "http://www.w3.org/ns/oa#refinedBy": {
        "@id": "#text-quote-selector",
        "@type": [
          "http://www.w3.org/ns/oa#TextQuoteSelector"
        ],
        "http://www.w3.org/ns/oa#prefix": {
          "@language": "en-us",
          "@value": ""
        },
        "http://www.w3.org/ns/oa#exact": {
          "@language": "en-us",
          "@value": "There are several formats for bookmarks."
        },
        "http://www.w3.org/ns/oa#suffix": {
          "@language": "en-us",
          "@value": " All of them (so far) use http:/"
        }
      }
    },
    "http://www.w3.org/ns/oa#renderedVia": {
      "@id": "https://dokie.li/"
    }
  },
  "http://www.w3.org/ns/oa#hasBody": [
    {
      "@id": "#note-9b041688-2491-4b41-98b5-e06caf091cda",
      "http://www.w3.org/ns/oa#hasPurpose": {
        "@id": "http://www.w3.org/ns/oa#describing"
      },
      "http://schema.org/name": {
        "@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",
        "@value": "Note"
      },
      "http://purl.org/dc/terms/language": {
        "@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",
        "@value": "en"
      },
      "@type": [
        "http://www.w3.org/ns/oa#TextualBody"
      ],
      "http://www.w3.org/1999/02/22-rdf-syntax-ns#value": {
        "@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML",
        "@value": "How about W3C Web Annotation's bookmarking at this specificity?"
      },
      "http://schema.org/description": {
        "@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML",
        "@value": "How about W3C Web Annotation's bookmarking at this specificity?"
      }
    },
    {
      "@id": "#tag-annotations",
      "@type": [
        "http://www.w3.org/ns/oa#TextualBody"
      ],
      "http://www.w3.org/ns/oa#hasPurpose": {
        "@id": "http://www.w3.org/ns/oa#tagging"
      },
      "http://www.w3.org/1999/02/22-rdf-syntax-ns#value": {
        "@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML",
        "@value": "annotations"
      }
    }
  ]
}
michielbdejong commented 7 months ago
michielbdejong commented 7 months ago

These seem to be annotations on a part of a webpage, no bookmarks of a URL, but you could use them as bookmarks if they're saved to your pod

michielbdejong commented 7 months ago

@csarven can you show how to use https://dokie.li/new as a Solid app that saves a bookmark to your pod?

csarven commented 7 months ago

BTW, have a look at this https://matrix.to/#/!QxZtVBYQfMeMTnespj:gitter.im/$nh_rsYTJwNwRRRD_vs__Qx4hR9zRaYikYNXv7G-CDCc?via=gitter.im&via=matrix.org

https://linkedresearch.org/annotation/csarven.ca/%23i/880005d3-659b-457d-bad2-955c61e746a3

instead of the 9b041688-2491-4b41-98b5-e06caf091cda.jsonld from earlier example.

csarven commented 7 months ago

Steps in https://github.com/pdsinterop/conventions/issues/28#issuecomment-1937061754 are right. (Putting aside the fact that "new" is under developed IMO). What you need to do after having some text is disable Edit from the dokieli menu. That changes the UI mode from Author to Social. And then when you select text again, you'll see different options from the popup.