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

Tags do not get transferred well when converting from inline to frontmatter (obsidian 1.4 properties update) #30

Open
kiithy opened this issue Sep 1, 2023 · 3 comments

Comments

@kiithy
Copy link

kiithy commented Sep 1, 2023

Description of problem

  • When using the code shown below, a new tags property is created but the tags are not transferred from inline to frontmatter(not seen in the new Obsidian properties feature)

Obsidian note before usage of code
image

Obsidian note after usage of code
image

Code used

from pathlib import Path
from pyomd import Notes, Note
from pyomd.metadata import MetadataType

path_dir = Path("/path/to/directory/file")
note = Note(path_dir)

note.metadata.move(fr=MetadataType.INLINE, to=MetadataType.FRONTMATTER)
note.update_content(inline_inplace=False , inline_position="top" , inline_tml="standard")  #type: ignore
note.write()

Extra Issue

  • Certain inline properties are not converted to text properties when the text properties include links
@Syavash-kazemi
Copy link

@kiithy , what about your links? Are they moved properly for you? I think we are missing double quotation to wrap the links.

@Syavash-kazemi
Copy link

If you only have issues on tags, and you only use them in properties, there is a workaround. You could find and replace (#tag_name to tag_name). Another alternative is using a community plugin called "Linter". It will fix it automatically.

@kiithy
Copy link
Author

kiithy commented Nov 11, 2023

@kiithy , what about your links? Are they moved properly for you? I think we are missing double quotation to wrap the links.

@Syavash-kazemi As of the day I tried, they do not work as they made a link that was originally [[this link]] become [["this link"]] which is causing the link to not work. I also have not tested the functionality such that when it has more than one comma separated link, the code is able to detect and transfer it as a List type instead of just a Text type.

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

No branches or pull requests

2 participants