hoarder-app / hoarder

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
https://hoarder.app
GNU Affero General Public License v3.0
2.28k stars 77 forks source link

Text that contains single and double quotes produces invalid YAML #190

Closed skirmess closed 3 weeks ago

skirmess commented 4 weeks ago

I am using the hoarder server version 0.14.0.

Paste the following text in the the new item field

"hello world, how's it going"

This produces invalid YAML:

$ hoarder bookmarks list --list-id njk89ftpg0643vy5626wimxt
[
  {
    id: 'rxjf0qniaqfiusgqaroc7v8g',
    createdAt: 2024-06-01T13:18:07.000Z,
    title: null,
    archived: false,
    favourited: false,
    taggingStatus: 'success',
    note: null,
    tags: [],
    content: { type: 'text', text: `"hello world, how's it going"` }
  }
]

If you check it with https://www.yamllint.com/ you get:

Plain value cannot start with reserved character at line 11, column 36`

MohamedBassem commented 3 weeks ago

As mentioned in another issue, the output of the CLI is not meant to be a YAML. @kamtschatka added JSON support in https://github.com/hoarder-app/hoarder/commit/cde97267a90802c6a367aa61ff157983506deead. So if you want to get a parsable output, use --json.