gRegorLove / indiebookclub

indiebookclub is a simple app for tracking books you are reading https://indiebookclub.biz
24 stars 1 forks source link

Feature: notes/comments field #16

Open gRegorLove opened 4 years ago

gRegorLove commented 4 years ago

Add a notes/comments field which would be set as the e-content of the post and micropub request.

@manton I wanted to check in with you to make sure this wouldn't unexpectedly break anything for micro.blog users.

manton commented 4 years ago

Would the content only include the notes, or would it also include the book name? If it's just the notes, it probably would break Micro.blog slightly, but I can work around it. Micro.blog takes the current summary + metadata and adds it to the blog post content.

Might be worth discussing, though. I feel like this would be confusing for any Micropub endpoint that wasn't set up to understand read-of posts, because the content would change from having the book name, to potentially only having the notes without the book name.

gRegorLove commented 4 years ago

My initial thought is the notes would only be in the content. Here's an example of what that request would look like. content is the only new key; others would remain the same.

{
  "type": [
    "h-entry"
  ],
  "properties": {
    "summary": [
      "Want to read: Title by Author, ISBN: ISBN"
    ],
    "content": [
      "I am really enjoying this book"
    ],
    "read-status": [
      "to-read"
    ],
    "read-of": [
      {
        "type": [
          "h-cite"
        ],
        "properties": {
          "name": [
            "Title"
          ],
          "author": [
            "Author"
          ],
          "uid": [
            "isbn:ISBN"
          ]
        }
      }
    ]
  }
}

The read-of doesn't change and I expect most micropub servers don't handle them currently. Is micro.blog using any of the read-of properties, e.g. to build a link to the title? I found a friend's example, though I'm now thinking they posted it manually since it has rating stars and links to indiebound (indiebookclub doesn't have those).

I can see this causing problems if a micropub server uses only content and ignores the summary. Putting the generated "want to read..." as the start of the content feels incorrect. I'll check in #dev to see what servers currently do and recommended best practice. I can't think of a good workaround offhand.

manton commented 4 years ago

Micro.blog looks for book name and ISBN in read-of, but it also assumes the name is in the summary. It basically uses the metadata to link the book in the blog post, and also appends a 📚 at the end.

Unless I'm missing something, the problem is that most Micropub endpoints are going to discard summary if content is present. So you'll end up with published blog posts like "This is a great book" without any reference to what the book actually is.

manton commented 4 years ago

I was thinking about this again and realized that https://github.com/indieweb/micropub-extensions/issues/8 could help. IndieBookClub could query a Micropub server for whether it supported the read-of property. If it didn't, IndieBookClub could always send the simplest format (probably making sure all the information and even notes are in summary). If it did support the property, then IndieBookClub would be more free to split out the notes into content and include other details.