after register hanlder for lfp, we need to construct the scheme url corresponding to local file path, the path consist on 2 key part, formated date in YYYY-MM-DD and bgm japanese name(jpn), this the user script the construct the path based existing info on the page
This only works for mac. create href to local file. so you can redirect to a file by click a link in browser. This is only the browser side of the work, you will need a url scheme defined to handle the href to local file path conversion as well as file opening.
My solution:
your chrome might need to start with an extra parameter for this process to work:
-user-data-dir="/Users/$(whoami)/Library/Application Support/Google/Chrome" --enable-logging --v=2 --disable-features=StandardCompliantNonSpecialSchemeURLParsing