Jump to content

Recommended Posts

  • 2 weeks later...

Hey everyone. I released a rather big update to the workflow. It has many more filters.

 

You can jump to any stack exchange website super quickly, it has more subreddits, courses and books and many more. It heavily leverages the curated lists by Learn Anything found here so if you wish to contribute to them, that would be amazing.

 

Here  you can find the download of it. I hope you like it. Also most useful lists have an external trigger too or you can add a hotkey trigger too if you wish.

 

The auto update is still broken as I still have to rewrite it to not use the dependencies. But this update is quite awesome imo.

 

Big thanks to @deanishe once again as that trick with using cat on pure JSON is really really awesome. ?

Edited by nikivi
Link to comment

I also think it goes quite well with ask, create, share workflow I shared earlier. Will try my hand at web searches though. If I make it, my life would be complete.  The cool thing with that one, aside from of course allowing me to fuzzy search through all the options. I can not only have static searches but link to other workflows too that leverage autosuggestions like Searchio. 

Edited by nikivi
Link to comment

Released a small update to the workflow. Can get it from GitHub or wait a few days to get notified of it if you already installed it.

 

There is a new object with reddit multis I use and a lot of modifiers attached to most objects where appropriate. 

 

I really dislike how Alfred can't handle such a large number of objects and is acting quite slow because of it but there is not much I can do. I can't split it up into two workflows as I really want to keep everything in one place.

 

Perhaps @Andrew will improve Alfred performance in the future. 

Edited by nikivi
Link to comment
1 hour ago, deanishe said:

You could structure the workflow properly instead. You've already been shown how to do this. Twice.

 

Yeah I know, but that structure does not work in my case. I need many external triggers, each attached to read a single JSON object. And I have a hotkey set for each one. 

 

Your solution was for a different thing and a different problem. I don't really see how that fits with what I want to achieve (an external trigger for reading a single JSON object) with modifiers attached where necessary. I also aready use your solution for passing the actual files to read as argument in the big list filter but I have no idea how to mitigate the mass number of single purpose script filters.

 

I can probably write out the entire thing in code and have one powerful script filter that can cover all these cases and I can just have different external triggers passing in various arguments. I might do that in the future but for now this works kind of.

Edited by nikivi
Link to comment

Actually now I see what you mean, I can do this : 

 

Sst0p1F.png 

 

And have blogs external pass in the path. That's actually really smart.

 

I can't use the same trick for the externals where I use modifiers though, those will still need to be isolated. Or I am again stupid and don't see something obvious. 

 

In any way, thanks @deanishe, that does simplify things a bit.

Edited by nikivi
Link to comment

Actually I thought of a way I can simplify it even further, with filters. 

 

Here is what I came up with.

 

My idea was that I filter by the paths passed in. So if a certain path passed in, needs my custom modifiers, I filter it.

 

However I don't know how I can make the above filter so that it will run when none of the below filters matched. This one :

 

EBb67fY.png 

 

The only way I see how to do it is by putting in the regex there but that regex will be really ugly (it will need to exclude all the paths below).

 

Maybe there is a better way to do this. 

Edited by nikivi
Link to comment

Your external triggers are all basically identical. Every single one passes {query} through to the Script Filter. You can delete all of them but one. Similarly, you have loads of completely identical Open URL actions. Use a junction and remove all but one of the Open URLs.

 

14 minutes ago, nikivi said:

This one :

 

I have no idea what you're trying to achieve. Both branches point to Open URL actions. What's the difference?

 

Regarding the generally excessive number of mostly-identical Script Filters you have, why don't you include the other stuff you need (e.g. the URL suffixes for Reddit queries) as workflow variables in the JSON?

 

Link to comment
22 minutes ago, deanishe said:

You can delete all of them but one.

 

Oh wow, you are right. Didn't think of it like that.

22 minutes ago, deanishe said:

I have no idea what you're trying to achieve. Both branches point to Open URL actions. What's the difference?

 

What I am trying to do is bring these script filters : 

 

O1waigA.png 

 

That have various modifiers that modify the url and have that work from the external trigger here : 

 

4gN4od8.png 

 

So I will call this external trigger 'open' with the path passed in like I do here from Karabiner. Then it will go to the script filter, script filter will read that path and show results. 

 

But what I wish now though is so that my modifiers work in this scenario too. So for example if the path passed in is 'lists/books.json', then I can only press return to open the url and that's it.

 

But if the path passed in is 'lists/reddit.json', I can also press return but I can also use my specified modifiers I set up for this path. I don't really know how I can make this work and if I can.

 

22 minutes ago, deanishe said:

why don't you include the other stuff you need (e.g. the URL suffixes for Reddit queries) as workflow variables in the JSON?

I don't get what you mean by that. Currently the JSON's that are being placed in the lists folder are downloaded from MyMindNode. Here is JSON of the books mind map for example and here is how the mind map looks actually.

 

I then have a script that will CURL those JSON's and then parse them into appropriate Alfred JSON. Currently that process requires dependencies thus users like you can't run that update script. In future I hope to rewrite that so that all this JSON gets updated periodically without any user interaction.

 

Not fully sure what you mean though with workflow variables and how that will apply with my URL prefixes and modifiers.

 

Here is the updated workflow, given the advice you gave.

 

All I wish is to move those script filters with custom modifiers options and have that somehow work from main outgoing script filter on the top. This way even if you are coming from the inside list filter here : 

 

xY8P9QE.png

 

You will still be able to use custom modifiers for paths that have these modifiers set up. That would be amazing.

Link to comment
17 minutes ago, nikivi said:

Not fully sure what you mean though with workflow variables and how that will apply with my URL prefixes and modifiers.

 

You can pass, say, a URL template, or a suffix as a workflow variable, so you don't need a separate Open URL action for each URL suffix.

 

19 minutes ago, nikivi said:

But if the path passed in is 'lists/reddit.json', I can also press return but I can also use my specified modifiers I set up for this path. I don't really know how I can make this work and if I can.

 

You can also set modifiers via JSON. 

Link to comment

Okay, never mind, it doesn't work fully.

 

Occasionally picking an option from the 'inside' list filter, will not show anything and will dismiss Alfred. On other occasions it works well.

 

My only guess is that Alfred can't handle that many filters at once and breaks down. ?  

Edited by nikivi
Link to comment

Oddly enough, if I call the script filters not from that List Filter but from the external trigger and pass in the path as argument, it works 100 % of the times.

 

If I can get this workflow to work correctly, it would be so so awesome.

Edited by nikivi
Link to comment

Released small update to the workflow.


Can find it on GitHub. Transferred all of my notes, now everything can be queried from Alfred. Extending my idea of bootstrapping knowledge. Also added book notes I made and explain shell filter that filters through various shell commands and gives you their documentation super fast.


It's pretty insane already. And overall lays a pretty good foundation going forward.


The most awesome part comes soon though once Learn Anything releases its official JSON endpoints. The Alfred workflow for that would be so so cool. You will be able to literally query any learnable topic on Earth and get the most efficient resources for learning it. It will be even faster than Google since for Google you have to first make the search, wait for page to load, then pick result. Here you just query topic, query result, use the result, all from Alfred. Pretty awesome. 

 

Oh and the ultimate goal with Learn Anything is to have people learning topics they never even thought of encountering in the most efficient way. Imagine 7 billion people in the world knowing how to program computers, writing alfred workflows, automation scripts, websites. What a world that would be.

Edited by nikivi
Link to comment
  • 1 month later...

Hey @deanishe, sorry for pinging you like that. 

 

I tried to resolve the issue myself but I am not really sure how to approach it as I believe things should work.

 

I am in the process of rewriting this workflow in Go to add some really sweet new features. The code (just boilerplate awgo setup + previous workflow moved under 'workflow' so everything works) can be seen here.

 

Here is the modified workflow modified and built with the code above.

 

My question is why aren't magic arguments working : 

tKAg7gP.png 

 

The are working in my other Go workflows and the code I basically transferred from there to start a new workflow so not really sure. It's probably again some stupid mistake I did but I don't really know what. Oh and I did look in the debugger. Didn't really see anything there related to this.

 

Thank you a lot if you do decide to take a look at this.

Edited by nikivi
Link to comment
  • 2 months later...

Released new update to update the index for the wiki. The wiki is pretty big now and I use it myself many many times a day. I hope someone else might find it useful too. Let me know if you do. ?  

 

This should be the last update with manual index update, next update should install the SUMMARY.md index from GitHub and cache it for a week or so. I am still battling with how to make it work on the Go side but I'll manage it soon.

 

Also I cannot wait to split the mess that this workflow is and separate the curated lists stuff and put it in Alfred Learn Anything. Everything cached and automatically updated right from GitHub. Would be crazy cool.

 

Hope you like the update. ?

 

Edited by nikivi
Link to comment
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...