Ny0n / Nys_ToDoList

WoW addon that creates a simple in-game To-Do list
https://legacy.curseforge.com/wow/addons/nys-todolist
7 stars 5 forks source link

Slash command adding items? #16

Closed johnnygtech closed 1 year ago

johnnygtech commented 1 year ago

Hey there! I love your addon and use it on all my characters.

Ive recently wanted a way to add to a list by using a slash command.

I liked through your docs and even some source but was unable to determine how this might be doable.

Is this possible now? And if not what is the possibility to add it?

Thank you!

Ny0n commented 1 year ago

Hi there!

It is possible, but the problem resides mainly in the slash command, because it would look something like this: /tdl add tab name|category name|new item name (with the '|' or any character to split the names)

The thing is that tab names, category names, and item names can all have spaces in them, which makes it more difficult to do it in a command line.

If that's still okay for you, I can give you what you need to add the feature in the addon ;)

johnnygtech commented 1 year ago

Yes! That would be fine. I am sure I can sort out my specific nonsense in a way to work around any strangeness with character delimination. Anything you got I'll take input in 👍

Ny0n commented 1 year ago

Good! you'll be my beta tester :D Here is a version of the addon that adds this feature (yes, I've been working on it for the last 2 hours, don't judge me)

Nys_ToDoList-6.3-6-g68d7481.zip

The feature works just like I said earlier, and the delimitation character is '+':

/tdl add tab name+category name+new item name

I also took the liberty to upgrade the command a bit, meaning that it can not only create new items, but also create new categories, and even create new tabs.

The way it works is simply that it will first try to find the given tab/category, and if not found, it will create them.

Have fun with it, and please tell me if anything doesn't work as intended! going to sleep now ~

johnnygtech commented 1 year ago

Your amazing! And no judgement at all, I'll test it tonight and report back! Thank you so much!

johnnygtech commented 1 year ago

It worked like a charm for me! I have some testing to do but i'll show you what my goal was in a couple days! Long story short, I'm tracking player level up events to get split times for a speed run. Should be pretty neat and your Addon makes it all possible (for me since I have limited experience with Addons).

Thank you Again!