taylormitchell / ankify_roam

A command-line tool which brings flashcards created in Roam to Anki.
MIT License
36 stars 6 forks source link

Tags #.ankify cannot be recognized correctly #12

Closed ZuoAoyu closed 3 years ago

ZuoAoyu commented 3 years ago

hi, I encountered a bug,

aoyu@MacBook-Pro ~ % ankify_roam add --tag-ankify=.ankify --deck="2021教师::01教育的产生与发展" /Users/aoyu/Downloads/Roam-Export-1611588830344.zip
2021-01-25 23:30:47,728 - INFO - Setting up Ankifier
2021-01-25 23:31:13,962 - INFO - Loading Roam Graph
2021-01-25 23:32:05,484 - INFO - Fetching blocks to ankify
2021-01-25 23:32:05,487 - INFO - Ankifying 0 blocks
2021-01-25 23:32:05,487 - INFO - Added 0 new notes and updated 0 existing notes
aoyu@MacBook-Pro ~ % 

and if you add a pair of quotes, you still get the same error

aoyu@MacBook-Pro ~ % ankify_roam add --tag-ankify=“.ankify” --deck="2021教师::01教育的产生与发展" /Users/aoyu/Downloads/Roam-Export-1611588830344.zip
2021-01-25 23:35:14,321 - INFO - Setting up Ankifier
2021-01-25 23:35:54,511 - INFO - Loading Roam Graph
2021-01-25 23:36:54,685 - INFO - Fetching blocks to ankify
2021-01-25 23:36:54,687 - INFO - Ankifying 0 blocks
2021-01-25 23:36:54,687 - INFO - Added 0 new notes and updated 0 existing notes
aoyu@MacBook-Pro ~ % 
taylormitchell commented 3 years ago

Hey @ZuoAoyu. Sorry for taking a while to get to this

First off, thanks for pointing out this bug! It looks like ankify_roam wasn't parsing tags which include periods correctly. I just pushed the fix to master, so if you re-install, it should be resolved

pip install git+https://github.com/taylormitchell/ankify_roam.git

If you get a chance to re-try on your end, please let me know if it works!