Jump to content

pixelgeek

Member
  • Posts

    110
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by pixelgeek

  1. I know that. I just don't want to inflict Node on anyone if I can avoid it. Does that install v3 now or is it still v2?
  2. I had assumed that the script that Alfred put into the Terminal preference would work. So once I fixed that issue I was able to get this resolved. I had an idea of echoing the command to the Terminal Command object but it was at 2am and I doubt my wife would have been happy with me getting up then to test it.
  3. My continuing Hugo workflow is going to require me to write some code for a Script Filter. It just needs to get a list of the files in a directory. I can do it easily enough in Node but I suspect that not a lot of people have the installed already? So is Python more accessible for people?
  4. Holy heck! That is pretty darned amazing
  5. I did end up doing that. I will use @vitor's suggestion about creating a custom search as well. I wasn't aware that the URL saved the search parameters. Thanks
  6. So this is a bit of a self-inflicted issue. I am building a workflow for Hugo. As part of that I am trying to run the Hugo server command. It runs a command line web server that has dynamic update so that the web pages update when you change the template etc I can get the server to run by using the Run Script object # Hugo needs to be run from the blog's root directory cd "${hugoBlogPath}" # Call Hugo to start the server "${hugoCommandPath}" server This will start the Hugo server and I can view the web pages. The problem is that this appears to hang Alfred internally. I can't get Alfred to run any other actions in the workflow and the Alfred command line hangs there on screen. It appears to be waiting for Alfred to get back data from the Hugo server. Sometimes, not all of the time, the Debugger will actually get the return data that the Hugo server sends. Start building sites … hugo v0.111.2+extended darwin/arm64 BuildDate=unknown | EN -------------------+------ Pages | 238 Paginator pages | 4 Non-page files | 0 Static files | 94 Processed images | 0 Aliases | 1 Sitemaps | 1 Cleaned | 0 Built in 65 ms Watching for changes in /Users/Zac/projects/newblog/{archetypes,assets,content,data,layouts,static,themes} Watching for config changes in /Users/Zac/projects/newblog/config.toml, /Users/Zac/projects/newblog/themes/wrongdog/config.toml Environment: "development" Serving pages from memory Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) This takes anywhere from 55 to 68ms each time (for it to run. It can take minutes to get returned to the Debugger) but it almost always stops Alfred from doing anything else after the server command. Even if there is another line in the Run Script. I tried adding open "http://localhost:1313" to the Run Script but it doesn't get executed. The complicating factor is that the command either needs to be run from the blog's root directory or you need to provide the path as part of the command. If I try hugo -s "/Users/Zac/projects/newblog/" it will run but it again gets caught up and doesn't execute any further. I tried running it in a Terminal Command object but it doesn't run and I suspect that Alfred doesn't expand the variables in the Terminal Command object. Anyone have any insight into what I can do to try to get this to run without causing Alfred to pause execution of the workflow?
  7. Hi all Not a Alfred suggestion but a pair of suggestions for the forum. 1) Is it possible to get the beta test forums excluded from the search for people that don't have permission to access it? From time to time I get search results that I can't view and I assume they were from a beta test or something similar? 2) Is it possible to age restrict the search results by default? So just show the last year of results and then let people use the search options to expand it if necessary? Posts from 2017 regularly show up and aren't typically of much use.
  8. So I did some more testing and used the debug tool and found out that you don't add the `var:` part of the variable declaration So it is cd ${hugoContentPath}" This will let Alfred do variable substitution in the Run Script object.
  9. So is this a thing I can do in a Run Script object? cd "${var:hugoBlogPath}" I want to store paths to the user's content directory and terminal commands and then execute them in a Run Script object but it doesn't appear to matter how I format the commands they don't work.
  10. That did it. Seems obvious now 🙂 Thanks
  11. The Inbound Configuration did it. Thanks
  12. I am using a List Filter for a Workflow and I was curious if there was a way to present all of the options to a user at once? So if there are five items it shows all five and then they can select one. Or will I need to create a JSON file and use the Script Filter? Thanks
  13. Is it possible to clear the Alfred command line after an input has been selected? I am building a Workflow with several options and I want to have the user type the keyword and then clear out the command line after they have hit return or entered a space.
  14. Why not just have them as a comma separated value and then use Split Args to turn them into variables and then use Args and Vars to store them as named values?
  15. An easier solution might be to use a List Filter and then enter each of the options in the list filter
  16. I was having a look through the available Obsidian workflows and was wondering if anyone was interested in a tool that could build URIs for the Advanced URI plugin?
  17. Not 100% sure but would a List Filter work? I think that the items in it appear in the order you set them
  18. Could you make this a bit easier to follow by changing the "query" and "query2" terms in your example to something else? You have one query as {query} but the other uses are going to get confusing quick 🙂
  19. Hi all Since I tend to write more than a few scripts for my workflows I was curious if people had any comments about the feasibility of using external scripts where possible. These would be JS and AppleScript code. Shell scripts aren't a problem. I was mostly concerned with speed as well as how external scripts impact when exporting your Workflows to post to Github etc Thanks
  20. Is that volume included in the search options in the Alfred Settings?
  21. I switched to using args and the problem resolved itself. Thanks for all the help folks
  22. Actually I have not 🙂 I took the output from the Debugger in Alfred and pasted that {query} data into Script Debugger and assigned it to the same variable. After that the code is copied directly. I was hoping to avoid having to change the code at all. I will change to using args and test that That was my thought as well. Which is why I added the try/onerror code. It didn't generate any errors though. An interesting problem
×
×
  • Create New...