stefanopagliari / bibnotes

359 stars 30 forks source link

Can I remove the brackets of the {{localLibraryLink}}? #116

Closed panwanke closed 2 years ago

panwanke commented 2 years ago

When I create a new literate note, the placeholder link: "{{localLibraryLink}}" get the results like this (zotero://select/library/items/AZCF7BSI).

Can I remove the bracket of the results like zotero://select/library/items/AZCF7BSI?

And If it provide an another style of the localLink like zotero://select/items/citekey)?

stefanopagliari commented 2 years ago

@Asynchro-Epool what version of the plugin are you using? I have revised this a couple of days ago. In the latest version the placeholder {{localLibraryLink}} returns something like this: zotero://select/library/items/Y4I22WMQ Instead {{localLibrary}} returns the md link "Zotero"

panwanke commented 2 years ago

Thanks for your reply.

I'm using the Obsidian 0.14.6 and bibnotes 0.9.201.
The place holder {{localLibraryLink}} returns (zotero://select/library/items/Y4I22WMQ), but what I want is zotero://select/library/items/Y4I22WMQ without brackets. I don't know why I have the link with brackets.

stefanopagliari commented 2 years ago

@Asynchro-Epool, could you please try to update to on the latest version?

panwanke commented 2 years ago

@Asynchro-Epool, could you please try to update to on the latest version?

I update to the latest version, but the version in "manifest.json" is still 0.9.203 other than 0.9.204.

And there is another problem:

Cannot read properties of undefined (reading 'replace')
lineElements.colourTemplateFormatted = lineElements.colourTemplate.replace("{{highlight}}", lineElements.highlightFormatted);
stefanopagliari commented 2 years ago

@Asynchro-Epool Thanks. I will look into that error. Does {{localLibraryLink}}work correctly in the latest version?

panwanke commented 2 years ago

Becuase this bug occur, I can not create new note anymore. Thank you for all the trouble you've taken.

stefanopagliari commented 2 years ago

@Asynchro-Epool would you be able to share a json with the single Zotero entry that is causing the problem? you will need to change the file extension to txt to be able to upload it here

panwanke commented 2 years ago
{
      "DOI": "10.1016/j.copsyc.2022.101375",
      "ISSN": "2352250X",
      "abstractNote": "Commentators say we have entered a “post-truth” era. As political lies and “fake news” flourish, citizens appear not only to believe misinformation, but also to condone misinformation they do not believe. The present article reviews recent research on three psychological factors that encourage people to condone misinformation: partisanship, imagination, and repetition. Each factor relates to a hallmark of “post-truth” society: political polarization, leaders who push “alterative facts,” and technology that amplifies disinformation. By lowering moral standards, convincing people that a lie’s “gist” is true, or dulling affective reactions, these factors not only reduce moral condemnation of misinformation, but can also amplify partisan disagreement. We discuss implications for reducing the spread of misinformation.",
      "accessDate": "2022-07-18T04:07:49Z",
      "attachments": [
        {
          "dateAdded": "2022-07-18T04:07:08Z",
          "dateModified": "2022-07-18T04:07:54Z",
          "itemType": "attachment",
          "path": "D:\\One Drive\\OneDrive - smail.shnu.edu.cn\\Documents_database\\zotero\\storage\\DSVTDW4Z\\Effron and Helgason - 2022 - The moral psychology of misinformation Why we exc.pdf",
          "relations": [],
          "tags": [],
          "title": "Effron and Helgason - 2022 - The moral psychology of misinformation Why we exc.pdf",
          "uri": "http://zotero.org/users/6784726/items/DSVTDW4Z"
        }
      ],
      "citationKey": "effron2022",
      "citekey": "effron2022",
      "creators": [
        {
          "creatorType": "author",
          "firstName": "Daniel A.",
          "lastName": "Effron"
        },
        {
          "creatorType": "author",
          "firstName": "Beth Anne",
          "lastName": "Helgason"
        }
      ],
      "date": "10/2022",
      "dateAdded": "2022-07-18T04:07:49Z",
      "dateModified": "2022-07-19T14:27:53Z",
      "itemID": 25431,
      "itemKey": "94QXKFT6",
      "itemType": "journalArticle",
      "journalAbbreviation": "Current Opinion in Psychology",
      "key": "94QXKFT6",
      "language": "en",
      "libraryCatalog": "DOI.org (Crossref)",
      "libraryID": 1,
      "notes": [
        {
          "dateAdded": "2022-07-18T07:54:56Z",
          "dateModified": "2022-07-19T07:25:12Z",
          "itemType": "note",
          "key": "98ZWQ8UI",
          "note": "<div data-citation-items=\"%5B%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22itemData%22%3A%7B%22id%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%2C%22type%22%3A%22article-journal%22%2C%22abstract%22%3A%22Commentators%20say%20we%20have%20entered%20a%20%E2%80%9Cpost-truth%E2%80%9D%20era.%20As%20political%20lies%20and%20%E2%80%9Cfake%20news%E2%80%9D%20flourish%2C%20citizens%20appear%20not%20only%20to%20believe%20misinformation%2C%20but%20also%20to%20condone%20misinformation%20they%20do%20not%20believe.%20The%20present%20article%20reviews%20recent%20research%20on%20three%20psychological%20factors%20that%20encourage%20people%20to%20condone%20misinformation%3A%20partisanship%2C%20imagination%2C%20and%20repetition.%20Each%20factor%20relates%20to%20a%20hallmark%20of%20%E2%80%9Cpost-truth%E2%80%9D%20society%3A%20political%20polarization%2C%20leaders%20who%20push%20%E2%80%9Calterative%20facts%2C%E2%80%9D%20and%20technology%20that%20amplifies%20disinformation.%20By%20lowering%20moral%20standards%2C%20convincing%20people%20that%20a%20lie%E2%80%99s%20%E2%80%9Cgist%E2%80%9D%20is%20true%2C%20or%20dulling%20affective%20reactions%2C%20these%20factors%20not%20only%20reduce%20moral%20condemnation%20of%20misinformation%2C%20but%20can%20also%20amplify%20partisan%20disagreement.%20We%20discuss%20implications%20for%20reducing%20the%20spread%20of%20misinformation.%22%2C%22container-title%22%3A%22Current%20Opinion%20in%20Psychology%22%2C%22DOI%22%3A%2210.1016%2Fj.copsyc.2022.101375%22%2C%22ISSN%22%3A%222352250X%22%2C%22journalAbbreviation%22%3A%22Current%20Opinion%20in%20Psychology%22%2C%22language%22%3A%22en%22%2C%22page%22%3A%22101375%22%2C%22source%22%3A%22DOI.org%20(Crossref)%22%2C%22title%22%3A%22The%20moral%20psychology%20of%20misinformation%3A%20Why%20we%20excuse%20dishonesty%20in%20a%20post-truth%20world%22%2C%22title-short%22%3A%22The%20moral%20psychology%20of%20misinformation%22%2C%22URL%22%3A%22https%3A%2F%2Flinkinghub.elsevier.com%2Fretrieve%2Fpii%2FS2352250X2200094X%22%2C%22volume%22%3A%2247%22%2C%22author%22%3A%5B%7B%22family%22%3A%22Effron%22%2C%22given%22%3A%22Daniel%20A.%22%7D%2C%7B%22family%22%3A%22Helgason%22%2C%22given%22%3A%22Beth%20Anne%22%7D%5D%2C%22accessed%22%3A%7B%22date-parts%22%3A%5B%5B%222022%22%2C7%2C18%5D%5D%7D%2C%22issued%22%3A%7B%22date-parts%22%3A%5B%5B%222022%22%2C10%5D%5D%7D%2C%22citation-key%22%3A%22effron2022%22%7D%7D%5D\" data-schema-version=\"8\"><p>mis reviews &nbsp; &nbsp;moral condemnation</p>\n<ul>\n<li>\n<p><span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%22BKQDZBCW%22%2C%22color%22%3A%22%23ffd400%22%2C%22pageLabel%22%3A%221%22%2C%22position%22%3A%7B%22pageIndex%22%3A0%2C%22rects%22%3A%5B%5B109.249%2C535.188%2C212.193%2C543.131%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%221%22%7D%7D\"><span style=\"background-color: #ffd40080\">“three psychological factors”</span></span> </p>\n<ul>\n<li>\n<span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%22GMYDK2BB%22%2C%22color%22%3A%22%235fb236%22%2C%22pageLabel%22%3A%221%22%2C%22position%22%3A%7B%22pageIndex%22%3A0%2C%22rects%22%3A%5B%5B169.457%2C523.68%2C218.89%2C531.623%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%221%22%7D%7D\"><span style=\"background-color: #5fb23680\">“partisanship,”</span></span> \n</li>\n<li>\n<span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%22XJ6ZZ5ND%22%2C%22color%22%3A%22%235fb236%22%2C%22pageLabel%22%3A%221%22%2C%22position%22%3A%7B%22pageIndex%22%3A0%2C%22rects%22%3A%5B%5B221.842%2C523.68%2C268.764%2C531.623%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%221%22%7D%7D\"><span style=\"background-color: #5fb23680\">“imagination,”</span></span> \n</li>\n<li>\n<span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%22KX45GXWM%22%2C%22color%22%3A%22%235fb236%22%2C%22pageLabel%22%3A%221%22%2C%22position%22%3A%7B%22pageIndex%22%3A0%2C%22rects%22%3A%5B%5B60.945%2C511.974%2C99.06%2C520.442%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%221%22%7D%7D\"><span style=\"background-color: #5fb23680\">“</span><strong><span style=\"background-color: #5fb23680\">repetition</span></strong><span style=\"background-color: #5fb23680\">.”</span></span> \n</li>\n</ul>\n</li>\n<li>\n<p>意义:</p>\n<ul>\n<li>\n<span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%223D8S39JR%22%2C%22color%22%3A%22%23ffd400%22%2C%22pageLabel%22%3A%221%22%2C%22position%22%3A%7B%22pageIndex%22%3A0%2C%22rects%22%3A%5B%5B163.96%2C466.422%2C301.162%2C474.365%5D%2C%5B60.947%2C454.97%2C115.777%2C462.914%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%221%22%7D%7D\"><span style=\"background-color: #ffd40080\">“these factors not only reduce moral condemnation”</span></span> \n</li>\n<li>\n<span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%22ZQP7NVM2%22%2C%22color%22%3A%22%23ffd400%22%2C%22pageLabel%22%3A%221%22%2C%22position%22%3A%7B%22pageIndex%22%3A0%2C%22rects%22%3A%5B%5B189.756%2C454.97%2C301.215%2C462.914%5D%2C%5B60.947%2C443.519%2C113.752%2C451.462%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%221%22%7D%7D\"><span style=\"background-color: #ffd40080\">“but can also amplify partisan disagreement”</span></span><span style=\"background-color: #ffd40080\"> </span>\n</li>\n</ul>\n</li>\n</ul>\n<p></p>\n<p><img alt=\"\" data-attachment-key=\"IGWIDPAA\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%22YINHM62X%22%2C%22color%22%3A%22%23ffd400%22%2C%22pageLabel%22%3A%222%22%2C%22position%22%3A%7B%22pageIndex%22%3A1%2C%22rects%22%3A%5B%5B73.676%2C414.0245267190372%2C531.7941149543313%2C692.672%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%222%22%7D%7D\" width=\"764\" height=\"465\"> </p>\n<p></p>\n<h2><span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%22RDH4IMV4%22%2C%22color%22%3A%22%23ffd400%22%2C%22pageLabel%22%3A%223%22%2C%22position%22%3A%7B%22pageIndex%22%3A2%2C%22rects%22%3A%5B%5B318.217%2C414.225%2C552.411%2C423.191%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%223%22%7D%7D\"><span style=\"background-color: #ffd40080\">“Mechanism for repetition’s effect on moral judgments”</span></span> </h2>\n<ul>\n<li>\n<p><span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%22U6DHSY93%22%2C%22color%22%3A%22%23ffd400%22%2C%22pageLabel%22%3A%223%22%2C%22position%22%3A%7B%22pageIndex%22%3A2%2C%22rects%22%3A%5B%5B353.642%2C345.552%2C451.972%2C354.738%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%223%22%7D%7D\"><span style=\"background-color: #ffd40080\">“flash of negative affect”</span></span> == <span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%22LKEICGHR%22%2C%22color%22%3A%22%23ffd400%22%2C%22pageLabel%22%3A%223%22%2C%22position%22%3A%7B%22pageIndex%22%3A2%2C%22rects%22%3A%5B%5B318.217%2C288.235%2C409.326%2C297.421%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%223%22%7D%7D\"><span style=\"background-color: #ffd40080\">“desensitization process”</span></span> </p>\n<ul>\n<li>\n即,对于传播fake news的source 感到 anger \n</li>\n<li>\n但 repeated之后,对他们的 unethical dull\n</li>\n<li>\n38. Haidt J: The emotional dog and its rational tail: a social intuitionist approach to moral judgment. Psychol Rev 2001, 108:814 – 834. \n</li>\n<li>\n39. Campbell T, O’Brien E, Van Boven L, Schwarz N, Ubel P: Too much experience: a desensitization bias in emotional perspective taking. J Pers Soc Psychol 2014, 106:272–285, https://doi.org/10.1037/a0035148. \n</li>\n<li>\n40. Hoffman AM, Kaire J: Comfortably numb: effects of prolonged media coverage. J Conflict Resolut 2020, 64:1666–1692.\n</li>\n</ul>\n</li>\n<li>\n<p><span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%22AU67J2KW%22%2C%22color%22%3A%22%23ffd400%22%2C%22pageLabel%22%3A%223%22%2C%22position%22%3A%7B%22pageIndex%22%3A2%2C%22rects%22%3A%5B%5B322.745%2C127.341%2C424.868%2C136.527%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%223%22%7D%7D\"><span style=\"background-color: #ffd40080\">“moral repetition effect”</span></span> </p>\n<ul>\n<li>\n<span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%22VVPF2JVX%22%2C%22color%22%3A%22%23ffd400%22%2C%22pageLabel%22%3A%223%22%2C%22position%22%3A%7B%22pageIndex%22%3A2%2C%22rects%22%3A%5B%5B401.385%2C184.658%2C558.306%2C193.844%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%223%22%7D%7D\"><span style=\"background-color: #ffd40080\">“repetition reduced condemnation”</span></span> \n</li>\n<li>\n<span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22annotationKey%22%3A%22IUBVQKFC%22%2C%22color%22%3A%22%235fb236%22%2C%22pageLabel%22%3A%223%22%2C%22position%22%3A%7B%22pageIndex%22%3A2%2C%22rects%22%3A%5B%5B318.217%2C173.149%2C558.383%2C182.335%5D%2C%5B318.217%2C161.697%2C407.792%2C170.883%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%223%22%7D%7D\"><span style=\"background-color: #5fb23680\">“regardless of whether the falsehood fit or conflicted with participants’ politics”</span></span> \n</li>\n<li>\n<span class=\"highlight\" data-annotation=\"%7B%22attachmentURI%22%3A%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2FDSVTDW4Z%22%2C%22pageLabel%22%3A%223%22%2C%22position%22%3A%7B%22pageIndex%22%3A2%2C%22rects%22%3A%5B%5B391.805%2C81.533%2C558.326%2C90.719%5D%2C%5B318.218%2C70.081%2C558.404%2C79.267%5D%2C%5B318.218%2C58.629%2C449.962%2C67.815%5D%5D%7D%2C%22citationItem%22%3A%7B%22uris%22%3A%5B%22http%3A%2F%2Fzotero.org%2Fusers%2F6784726%2Fitems%2F94QXKFT6%22%5D%2C%22locator%22%3A%223%22%7D%7D\">“politically concordant misinformation should become increasingly <strong>familiar</strong> over time, and thus seem increasingly permissible.”</span>\n</li>\n</ul>\n</li>\n</ul>\n<p></p>\n<p></p>\n</div>",
          "parentItem": "94QXKFT6",
          "relations": {},
          "tags": [],
          "uri": "http://zotero.org/users/6784726/items/98ZWQ8UI",
          "version": 23609
        }
      ],
      "pages": "101375",
      "publicationTitle": "Current Opinion in Psychology",
      "relations": [],
      "select": "zotero://select/library/items/94QXKFT6",
      "shortTitle": "The moral psychology of misinformation",
      "tags": [
        {
          "tag": "/baseline",
          "type": 1
        },
        {
          "tag": "ObsCite"
        }
      ],
      "title": "The moral psychology of misinformation: Why we excuse dishonesty in a post-truth world",
      "uri": "http://zotero.org/users/6784726/items/94QXKFT6",
      "url": "https://linkinghub.elsevier.com/retrieve/pii/S2352250X2200094X",
      "version": 23653,
      "volume": "47"
    },
stefanopagliari commented 2 years ago

Thank you. I was able to replicate the problem and I think I have fixed it. Could you please try 0.9.205 ?

panwanke commented 2 years ago

Thank you. I was able to replicate the problem and I think I have fixed it. Could you please try 0.9.205 ?

I have tried the 0.9.207, there is no problem temporarily. Thanks!