Fsnotes: [Question] Is there migration Tags from older version to current

Created on 29 Sep 2020  路  9Comments  路  Source: glushchenko/fsnotes

I used Tags feature on older version which has a UI to input tag name.
Today I updated latest FSNotes for macOS and then all tags are gone.
Is there a way to salvage all tags?

request

Most helpful comment

Migration ideas...

using macOS buit-in tools

  1. list all tags
    /usr/bin/mdfind -0 "(kMDItemUserTags == '*')" |xargs -0 mdls -name kMDItemUserTags |grep '^ ' |cut -c5- |cut -d , -f 1 |sort -u
  2. find notes with tag
    mdfind 'kMDItemUserTags=Music' -onlyin /path/to/folder
  3. append text tag to end of file
    echo "#Music" >> $file
  4. (optional) remove tags from files
    sudo xattr -d com.apple.metadata:_kMDItemUserTags "$file"; sudo xattr -d com.apple.FinderInfo "$file";

or using an external tool

All 9 comments

Are the tags on the files in Finder?

Do they reappear if you downgrade FSNotes?

I downgraded v3.9.1 FSNotes then all tags are reappeared.

@griffin-stewie that's great and gives us something to go on.

I think there will need to be a command, perhaps manual/user-invoked rather than automatic, to migrate all tags (macOS Finder) from the old way to the new way (as markup).

Oh I see. I was wondering how FSNotes handles tags without any database or any metadata block. That was Finder tags.
Personally I prefer Finder tags rather than markup because I can copy and paste to other services.

I look forward you to make solution to migrate all tags. Thank you!

Hi, @griffin-stewie!

Old style tags removed completely from FSNotes 4+. Metadata is not reliable data storage. iCloud can miss it on sync etc.

I am not planning to do a migration for 1 user. Better spend time on something more worthwhile.

Hi, @glushchenko
I understand what you said. I would write a migration tool for me when I have a spare time.
@gingerbeardman, you helped me a lot thank you.

Migration ideas...

using macOS buit-in tools

  1. list all tags
    /usr/bin/mdfind -0 "(kMDItemUserTags == '*')" |xargs -0 mdls -name kMDItemUserTags |grep '^ ' |cut -c5- |cut -d , -f 1 |sort -u
  2. find notes with tag
    mdfind 'kMDItemUserTags=Music' -onlyin /path/to/folder
  3. append text tag to end of file
    echo "#Music" >> $file
  4. (optional) remove tags from files
    sudo xattr -d com.apple.metadata:_kMDItemUserTags "$file"; sudo xattr -d com.apple.FinderInfo "$file";

or using an external tool

@gingerbeardman
Thank you. I'll give it a try.

Let us know how you get on!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

floodfish picture floodfish  路  4Comments

yene picture yene  路  3Comments

peanutputter picture peanutputter  路  4Comments

shurain picture shurain  路  3Comments

jakemkc picture jakemkc  路  4Comments