Jump to content

deanishe

Member
  • Posts

    8,759
  • Joined

  • Last visited

  • Days Won

    522

Everything posted by deanishe

  1. I already explained how to do that. Read first, then write
  2. You just have to look at the source code for the search form and translate the form parameters into URL parameters. (And hope the search page also accepts the parameters that way.) It just requires basic knowledge of HTML and HTTP. I make the screengrabs with a program called LICEcap: https://www.cockos.com/licecap/
  3. Doesn’t matter. You can still tell the system to pass the URL to a different app. In any case, what you’ve found is the best way. I do something similar with Sublime Text to make it better behaved. It’s just not exactly trivial to write the bridge application.
  4. Then go to the Update tab in Alfred Preferences and choose the "pre-release" channel.
  5. The standard way to open a specific message in an email program is using the message://<Message-Id goes here> URL scheme. Does Outlook not support it?
  6. I only ever use Alfred to export throwaway workflows I build for forum threads. I have a general build script for Python workflows that knows to ignore .pyc files (including them can totally break the workflow on other systems). My Go workflows need compiling, so they each get their own custom build script. Most of the workflow-publishing work is just keeping an orderly repo, imo. The only bit that I find fundamentally tiresome (now that I don't upload to Packal any more) is adding the workflow to this forum, due to this horrid editor.
  7. The URL I posted above works for me when I'm logged in: Here's the working search exported from Alfred. Copy and paste it into Alfred (or Safari). alfred://customsearch/Search%20for%20%E2%80%9C%7Bquery%7D%E2%80%9D%20on%20mpgh.net/mpgh/utf8/nospace/https%3A%2F%2Fwww.mpgh.net%2Fforum%2Fsearch.php%3Fdo%3Dprocess%26query%3D%7Bquery%7D
  8. Write in Markdown and then convert it to BBCode using one of @vitor's workflows: MarkdownTransform.
  9. Here you are. I've tried to extract the titles, too. You should be able to search on the title or the citekey, and then use ↩ to copy the citekey or ⌘↩ to copy the citekey and paste it into the active application. You have to set the path to your BibTeX file in the workflow's configuration screen (it's currently pointing at the included sample file):
  10. Thanks. It's late now. I'll post you something in the morning.
  11. And there was me thinking I was being all cool with a local HTTP server instead of spamming a load of temp files.
  12. Like I just said, you're adding the backticks yourself in the Copy to Clipboard output:
  13. You're adding the backticks yourself in your Copy to Clipboard output… Don't use {query}. Use query = sys.argv[1] and "with input as argv".
  14. @Xage That looks clear enough: You don't have node installed (or at least not at /usr/local/bin/node). This workflow doesn't work "out of the box". You need to install Node first. @Xage @ErikRS When you see the workflow disappears and you just see a bunch of "Search ABC for XYZ" options, those are Alfred's fallback searches. It shows them when a workflow returns no results, which also includes when it dies in flames. If that's happening, open the workflow in Alfred Preferences and then open the debugger. You should see what's going wrong in there.
  15. What I meant is, you're trying to turn a Python REPL session into valid Python code. Yes, it's very simple to do, and there's no need at all for the re module. You just needed to be clear about what you were trying to achieve. Here it is in Python. You can't just keep the lines starting with >>>, you need the continuation lines, too. And because it's Python, you have to preserve the indentation. def extract_code_from_repl(string): """Take a Python REPL session and extract user input.""" code = [] lines = [s for s in string.split('\n') if s.strip()] for line in lines: if line[:4] in ('>>> ', '... '): # user input code.append(line[4:]) return '\n'.join(code) The above function correctly converts the examples I copied from the Python docs into working code. The backticks appear to be something weird happening at your end. If it continues, add string = string.strip('`$') to the top of the function.
  16. Could you upload a sample .bib file somewhere and post a link? Or post a URL to one. Then I'll have a look.
  17. Does the above URL not work for you? If the above URL doesn't work for a logged-in user, it's likely the token needs to be submitted with the search. It's also likely that the token changes regularly. That's the proper way to do it, in any case.
  18. There is if it's understandable code. I mean, your sed and perl and ruby don't take up much space, but they also ain't much fun to read… @Bhishan What are you actually trying to do? Copy examples of using the Python REPL and turn them into valid Python code?
  19. Nope, your description was excellent last time. Specific is good. For my part, at least, that's exactly why I didn't offer to help… The problem was that I thought you needed the .bib file properly parsing (i.e. it's not a simple case of "one entry per line"). Now I read it again, it looks like you might just be interested in the @article{NameYYYY, lines. Is that the case? Does every single entry begin with a single line @article{NameYYYY,? Because that's makes it pretty easy to do. If not, find me a Python or Go library that can parse the .bib file, and I'll whip something up for you.
  20. @ErikRS @Xage Could you check out the thread on reporting issues with workflows? That isn't really enough information to diagnose a problem.
  21. Could be. There's really not much more I can say if it is a login issue. The source you posted has a security token in the form (for me it was "guest"). It's likely that the site needs that to show the results. If that is the case, then it's not possible to create an Alfred web search for the site.
  22. Not possible as best as I can tell. The search box at top-right appears to fundamentally lead to the advanced search page. Which itself doesn't work unless you do the Captcha. So the closest you can get (apparently) is https://www.mpgh.net/forum/search.php?do=process&query={query}, which will take you to the advanced search form with the search query pre-filled. You still need to check the Captcha and start the actual search.
  23. Native languages can access the clipboard directly. For other languages, use the pbpaste command-line tool to read the contents of the clipboard. Here's an article about pbcopy and pbpaste.
  24. Getting Automatic Proxy Configuration to work with (non-native) workflows is essentially an unsolvable problem. I explained why in the post immediately above yours. Then you were doing it wrong… Don't edit the proxy settings, create a new network location (e.g. "Work") and just switch locations. You can also use applications like ControlPlane or Hammerspoon to automatically change network locations for you. Personally, I use ControlPlane for this.
  25. Easily done, but you need to be clearer. When you say folders in your home directory, do you mean only the folders immediately under ~ or folders anywhere under ~.
×
×
  • Create New...