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

Generate workspace summary per category #1086

Closed
1 task done
theherk opened this issue Sep 16, 2023 · 2 comments · Fixed by #1156
Closed
1 task done

Generate workspace summary per category #1086

theherk opened this issue Sep 16, 2023 · 2 comments · Fixed by #1156
Labels
feature Issues related to feature proposals. Please attach a module.

Comments

@theherk
Copy link

theherk commented Sep 16, 2023

Issues

  • I have checked existing issues and there are no existing ones with the same request.

Feature description

It would be pretty slick if the command took an argument. For example, :Neorg generate-workspace-summary some-category, then populate the files where metadata is found to match. I wonder if this could be done somehow in relation to #967, where you could set up ranges per category, and populate with the applicable summary data.

Help

Yes

Implementation help

I'm confident the work to be done is within core/summary/module.lua, but I'm unclear how the invocation of add_commands_from_table sets up the command to accept an additional argument in the command. I would need a lot of direction to be of much help.

@theherk theherk added the feature Issues related to feature proposals. Please attach a module. label Sep 16, 2023
@github-project-automation github-project-automation bot moved this to added-updated-reopened in sorting neorg issue tracker Sep 16, 2023
@Dynge
Copy link
Contributor

Dynge commented Nov 9, 2023

I think this feature would be really neat.

I've taking a look at how one could implement it. I found that it seems to be rather simple to get it working with a few tweaks (see screenshot for git diff in my test)
image

However sadly the method to call generate-workspace-summary is not public and I am not sure how to tweak and edit Neorg commands. So I unsure how to complete the final step as you (@theherk) mentioned as well :)

I think it would be neat if the lua function is made public in the module such that one could send a list of categories to summarize (as suggested in my screenshot). I thought about making the Neorg command also accept a list of strings, however since categories are split by newline and NOT by space, then I dont see how the Neorg command would know how to differentiate categories:

eg. Neorg generate-workspace-summary awesome tiger - is this a single category (awesome tiger) or is it two categories (awesome and tiger)?

@Dynge
Copy link
Contributor

Dynge commented Nov 9, 2023

Added a pull request for a suggestion to a potential solution: see #1156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issues related to feature proposals. Please attach a module.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants