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

Tried to parse my 13,000 line private.xml config and got an error #5

Open
nikitavoloboev opened this issue May 19, 2018 · 5 comments
Open

Comments

@nikitavoloboev
Copy link

I installed karaconv and tried to run it on my private.xml config file.

I got this error:

❯ karaconv -i private.xml -o private.json
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: missing field `appendix`', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Would really love to use this tool to translate my config to Elements. Thank you for any help.

@nikitavoloboev
Copy link
Author

Hi @durka, would it be possible to take a look at this?

Would really appreciate it if this parser worked on that file. Thank you.

@durka
Copy link
Owner

durka commented Jun 6, 2018

Oh, I missed this. Will try to take a look.

@nikitavoloboev
Copy link
Author

Hi @durka, did you get any time to look at yet? I would really appreciate it.

@durka
Copy link
Owner

durka commented Jun 27, 2018

Wow, you've got a lot of stuff in there! I don't even know if the new Karabiner-Elements supports all of these features. First step is to parse the file, I guess. Some of this isn't even in the documentation of the private.xml schema. Is this an error? If not, what does it mean to nest like that?

https://github.com/nikitavoloboev/dotfiles/blob/1c3acfbe2c30d52bf19cf548d0eb77f2bf91ffaf/karabiner/private.xml#L7506-L7509

@nikitavoloboev
Copy link
Author

nikitavoloboev commented Jun 27, 2018

If not, what does it mean to nest like that?

That was actually an error and I just fixed it. However Karabiner parsed that XML with no errors for me and worked.

The most important part for me to translate and I am not sure if it is even possible in Karabiner is this block.

I was shown how to define this by @tekezo in old Karabiner issue and what it essentially does is make a key a custom launcher key and the nested there represent what happens when I press those keys when I hold the Launcher key.

It would be incredibly nice if @tekezo himself proposed a solution to how one could translate that XML block to JSON in Elements as I am not sure myself.

Also this is very important to as that defines variables. It creates a variable that contains calling of some AppleScript and then I call these variables inside most definitions in the launcher definitions.

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