Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Parameterising specific synchronization rules #1162

Closed
1 task done
DesmetQuentin opened this issue Oct 15, 2024 · 3 comments
Closed
1 task done

[Feature] Parameterising specific synchronization rules #1162

DesmetQuentin opened this issue Oct 15, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@DesmetQuentin
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Environment

  • OS: Linux Ubuntu 22.04.4 LTS
  • Zotero Version: 7.0.7 (64-bit)
  • Plugin Version: 2.0.16

Describe the feature request

The problem

I am using the plugin with synchronization with my Obsidian vault (in Markdown) and there are several things that do not work well when synchronizing. For instance, when using Wikilinks (with the syntax [[link]]) in Obsidian, synchronization in Zotero transforms the first double brackets into \[\[, which breaks the link on the Obsidian side. Another example is just about esthetics: the bullet points are rendered with * (three spaces) in md, when I'd rather put - (a dash and one space).

The feature

A natural solution would be to have somewhere in the settings of Zotero Better Notes, a section with the possibility to change the defaults conversion behaviors, for the several exporting type you propose (md in my case). For the two examples I provide, I think there could be in the md section a bullet point setting where one could enter in a form the string to use (in my case: - , while the default would be * ), and for specific character patterns like with the Wikilinks, the user could add as many as needed in a list of patterns to keep unchanged (in my case, I'd put: [[, ]]).

I hope this makes sense. And if there is already a way to do that, I'd be happy to hear about it.

Describe the solution you'd like

No response

Anything else?

No response

@DesmetQuentin DesmetQuentin added the enhancement New feature or request label Oct 15, 2024
@windingwind
Copy link
Owner

You can use the ExportMDFileContent template to customize the note2markdown parsing. I believe there are some similar ones available in the discussions.

@windingwind
Copy link
Owner

#646

#768

@DesmetQuentin
Copy link
Author

DesmetQuentin commented Oct 16, 2024

Ok, it's very great now! Thank you very much! I am now using the following:

# This template is specifically for importing/sharing, using better 
# notes 'import from clipboard': copy the content and
# goto Zotero menu bar, click Edit->New Template from Clipboard.  
# Do not copy-paste this to better notes template editor directly.
name: "[ExportMDFileContent]"
content: |-
  ${{
    return mdContent.replaceAll("\\[\\[", "[[").replaceAll("*   ", "- ").replaceAll("--", "–").replaceAll("->", "→").replaceAll("“", '"').replaceAll("”", '"');
  }}$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants