nerd-dictation icon indicating copy to clipboard operation
nerd-dictation copied to clipboard

macro detection

Open asamwow opened this issue 4 years ago • 6 comments

asamwow avatar Nov 17 '21 21:11 asamwow

my config file

asamwow avatar Nov 21 '21 13:11 asamwow

Hi, I like the idea of being able to use macros! But could not get your code to work. I was trying to update it to the newest version as well, but ran into an issue. Likely because I'm not a Python pro. Can't seem to find where the macro_process_fn() is declared: https://github.com/ideasman42/nerd-dictation/blob/7b880d6ed0af9d5de8fd6ad1b8b5a293016103a2/nerd-dictation#L465 I was hoping to be able to merge @asamwow code with the latest from @ideasman42. Is there still hope for this to move forward, I'd be happy to lend as much of a hand as I can...

ecotechie avatar Mar 15 '22 01:03 ecotechie

@ecotechie hi, so glad for the interest! so you read the lines immediatly proceeding that error of yours, you can see it is getting that function from your user config file. I added it to the example config file

I figured macros would be pretty user specific, so I left the function mostly empty except for test code.

asamwow avatar Mar 16 '22 21:03 asamwow

Thanks @asamwow, I do see where the nerd_dictation_macro_process() function is being defined. What I don't see anywhere in the code is a def macro_process_fn(), not in the main nerd-dictation file, nor in the settings one...

I'm not sure what error you are referring to though, there is none, the function just isn't called, since it's not defined. Or, I'm a space cadet and am missing something very basic.

https://github.com/asamwow/.dotfiles/blob/master/nerd-dictation/.config/nerd-dictation/nerd-dictation.py#L291

ecotechie avatar Mar 17 '22 19:03 ecotechie

https://github.com/ideasman42/nerd-dictation/blob/7b880d6ed0af9d5de8fd6ad1b8b5a293016103a2/nerd-dictation#L461

asamwow avatar Mar 18 '22 19:03 asamwow

Ohh, I didn't know that was a way to define functions in python. :exploding_head: I'm going to try a bit more, but will likely step aside and let more python oriented devs sort this one out. I'm more of a PHP kinda guy :smile: If I can get something updated with the newer code to work, I'll do a pull request. Thanks for your patience...

ecotechie avatar Mar 18 '22 20:03 ecotechie