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

macro detection #27

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

macro detection #27

wants to merge 4 commits into from

Conversation

asamwow
Copy link

@asamwow asamwow commented Nov 17, 2021

No description provided.

@asamwow asamwow changed the title macros initial WIP macro detection Nov 21, 2021
@asamwow
Copy link
Author

asamwow commented Nov 21, 2021

my config file

@ideasman42 ideasman42 force-pushed the master branch 8 times, most recently from 569fdae to 4a922ad Compare January 9, 2022 09:28
@ecotechie
Copy link

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:

return macro_process_fn(text)

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...

@asamwow
Copy link
Author

asamwow commented Mar 16, 2022

@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.

@ecotechie
Copy link

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

@asamwow
Copy link
Author

asamwow commented Mar 18, 2022

macro_process_fn = getattr(user_config, macro_fn_name)

@ecotechie
Copy link

Ohh, I didn't know that was a way to define functions in python. 🤯 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 😄 If I can get something updated with the newer code to work, I'll do a pull request. Thanks for your patience...

@ideasman42 ideasman42 force-pushed the master branch 6 times, most recently from d56e61e to 67eec6c Compare May 16, 2022 12:51
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

Successfully merging this pull request may close these issues.

2 participants