SkepticMystic / advanced-cursors

Apache License 2.0
100 stars 2 forks source link

[Feature Request] Save Search Query for future usage #3

Closed FelipeRearden closed 3 years ago

FelipeRearden commented 3 years ago

Hello @SkepticMystic !!!!

This FR is simple to explain: would be amazing to have a feature to save (store) some regex query to be invoked again.

If possible 🙏:

If you don't mind, I have a user case to share with you:

User Case: Organize DEVONthink references

I use an app called DEVONthink to store, read and highlight web articles. After doing this, I copy the highlight content to Obsidian to start my note taking process.

Here is a image if the "raw" text pasted in Obsidian. As you can see, it has this DEVONthink URLs ([L5](x-devonthink-item://C5A952D4-8CB9-4CA9-9B3A-BC397B08C1F6?line=4)) that are the links/references of the highlights in the original text.

34954AF3-055F-44C1-9CB3-2ECE02888799

What I want to do for every note is transfer this DEVONthink URLs under a specific header in the end of the note and clean the text to get rid of the urls while reading. - Now with your plug-in I can do this!!!! (that why I'm so excited)

The final result is something like this (I cut the text to fit in the image)

93B9B9DF-CFF3-4CB9-88D9-3FAA3984D255

⚠️ To do this: 01- I use this regex in search Query: \[L\d*\]\(x-devonthink-item:\/\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\?line=\d{1,2}\) 02- Copy the content to the clipboard 03- Clean the URL hitting delete to let only [L#] 04- Paste the clipboard under the header ## DT Links

If we could save my regex search query \[L\d*\]\(x-devonthink-item:\/\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\?line=\d{1,2}\) I could just hit a hotkey to start this workflow :)

I hope you like my FR . Let me know if you need more information.

I have more workflows like this one (select a regex query in the text to apply some transformation) and I'm very happy that I can finally automate this :)

Have a great day!

SkepticMystic commented 3 years ago

Thank you for the detailed FR, it really helps me understand what you're looking for and ground it in a specific use-case 😄

I can definitely do this! It will take some work to set up the logistics, and I'll want to make the ui look nicer. But I will work on this :)

FelipeRearden commented 3 years ago

Thank you for the detailed FR, it really helps me understand what you're looking for and ground it in a specific use-case 😄

I'm pretty happy to know it @SkepticMystic !!!! Thank you.

In my opinion, the users/testers always have to make the most effort to present FR/Bugs with maximum details possible.

It's 100% important to have everybody in the same page for every FR/Bug :)

I can definitely do this! It will take some work to set up the logistics, and I'll want to make the ui look nicer. But I will work on this :)

I have no words in earth to say how grateful I'm for this !!!!!!!!!!!!!!!!!

This feature will be a game changer for my workflow :)

It will take some work to set up the logistics

Sure! No problem. I know that you will make an amazing UI for this plugin :)


Just to let you know that I am not an native english speaker. Forgive me if I made some grammar/vocabulary mistake. And let me know you I don't understood anything that I write :)


Let's keep talking!

Have a great day!

SkepticMystic commented 3 years ago

I totally agree! That communication is very important :)

Haha I will let you know if I don't understand you! But you're doing great so far :)

FelipeRearden commented 3 years ago

Haha I will let you know if I don't understand you! But you're doing great so far :)

hahahaha great! I'm glad to know! Thanks 😃

SkepticMystic commented 3 years ago

@FelipeRearden I have implemented working functionality for saved queries! So you can now go to Settings > Add Query to add a new one. Then when you open the searchy query modal, you should see a list of saved queries which you can click to run! I will work on making each saved query into its own command, as well :)

Imgur

SkepticMystic commented 3 years ago

@FelipeRearden in 0.0.12 each saved query now gets its own command 😄

FelipeRearden commented 3 years ago

@SkepticMystic !!!!!!!

SPECTACULAR!!!!! FANTASTIC !!!!!!!

There is no words in any language to express how grateful I am for this @SkepticMystic

Thank you very much for making this happen !!!!!!!

I already test 0.0.12 is working perfect on Obsidian 0.12.15

Today is a great day for me -> thanks to you:)

SkepticMystic commented 3 years ago

Haha I am very glad you find this useful! :D I have enjoyed coding this plugin, it is a very interesting problem to solve :)

FelipeRearden commented 3 years ago

I will start to implementing my real workflow with a bunch of regex query. I let you know if I found some bug.

In my opinion this FR is closed:)

FelipeRearden commented 3 years ago

I have enjoyed coding this plugin,

It's the best feeling on earth: doing something that gives you a good feeling.

it is a very interesting problem to solve :)

And this is ground-breaking because we can do things with multiple cursors that wasn't possible

This is Disneyland for keyboard lovers like me 😀