Closed timbck2 closed 1 year ago
Hi Tim, sorry you are having this issue! It is frustrating for sure.
I was able to replicate your issue in Powershell. Can you try specifying the file argument (-f
or --file
) without the equals sign? So instead of
PS C:\Downloads\Application Groups\com.apple.notes> apple-notes-liberator -j -f=Notes.sqlite
try
PS C:\Downloads\Application Groups\com.apple.notes> apple-notes-liberator -j -f Notes.sqlite
I don't know much about powershell but it seems that the equals sign is tripping up the command-line argument parsing. Let me know if this works for you. In any case, I'll take a closer look at the library I'm using to parse command-line arguments and make sure I'm doing it properly and look into whether or not it is possible to support accepting command-line arguments with an equals sign in powershell with that library.
Passing the argument with or without an equals sign works in zsh or terminal, but seems to only work without an equals sign in Powershell. This does make the usage snippet about the file
argument confusing if you are using powershell. Perhaps the usage output can be updated.
After poking around the powershell documentation, I found this page which contains this snippet:
The name of the parameter is preceded by a hyphen (-), which signals to PowerShell that the word following the hyphen is a parameter name. The parameter name and value can be separated by a space or a colon character. Some parameters do not require or accept a parameter value. Other parameters require a value, but do not require the parameter name in the command.
So I guess in powershell command line arguments cannot be separated by an equals sign, only be a space or a colon?
Hi @timbck2! Just following up - were you able to try without the equals sign? I also released a bugfix that caused the default notestore path to always be used, so now with version 2.2.4 you should be good to go.
No, I ended up going through my Apple Notes one by one and exporting each one that I wanted to keep individually, then importing them into SimpleNote
“Life is not fair, but we can choose to be fair humans even if life or other humans choose to be unfair to us.” - Najwa Zebian, The Nectar of Pain
On Mon, Jul 3, 2023 at 4:36 PM Alex Olson @.***> wrote:
Hi @timbck2 https://github.com/timbck2! Just following up - were you able to try without the equals sign? I also released a bugfix that caused the default notestore path to always be used, so now with version 2.2.4 https://github.com/HamburgChimps/apple-notes-liberator/releases/tag/v2.2.4 you should be good to go.
— Reply to this email directly, view it on GitHub https://github.com/HamburgChimps/apple-notes-liberator/issues/48#issuecomment-1619222642, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVVYSHWEJQWOBGLV2OPNDXONCQVANCNFSM6AAAAAAZNRUGWY . You are receiving this because you were mentioned.Message ID: @.***>
Ah okay cool! Glad you were able to get it done either way!
I feel very defeated - it seems as if I should be able to figure it out, but I can't seem to get the command line right to pass the necessary arguments to either the JBang or the plain .jar file installation.
With the JBang installation, I've tried several different permutations of the following as the command line (Windows PowerShell v7.3.4.0):
Which gives me an error: "Unmatched argument at index 2: '.sqlite'", followed by the usage statement.
With the .jar file installation, I've tried several different variations on:
Which results in the error: "Cannot automatically find notes database, you will have to manually provide the file path via the -f (--file) option.", NOT followed by the usage statement.
What am I doing wrong?