Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to run user-defined actions/scripts #262

Closed
mntn-xyz opened this issue Oct 11, 2021 · 7 comments
Closed

Ability to run user-defined actions/scripts #262

mntn-xyz opened this issue Oct 11, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@mntn-xyz
Copy link
Contributor

It would be nice to have a hotkey or bar command to run a user-defined action with the argument being the current URL or the URL of a specific link #. For instance, I might want to append the URL to a text file, use Emacs org-capture to file the URL appropriately, compose a new email with the link in the message body, etc.

@makew0rld
Copy link
Owner

Yeah that could be useful. But you can already copy the current URL to the clipboard with a command, so I'm not sure if this would really be worth it.

@makew0rld makew0rld added enhancement New feature or request question Further information is requested labels Oct 11, 2021
@mntn-xyz
Copy link
Contributor Author

True, I wouldn't consider it high priority, but it would save a couple of keystrokes each time, which can add up.

What led me to suggest this is that I like to manage bookmarks in orgmode, as I can annotate, categorize, and tag them appropriately. The bookmarks functionality in Amfora works well enough, but it isn't adequate for my needs. (Not a criticism of Amfora, by the way; Chrome's bookmarks functionality also isn't adequate from my perspective. I have too many bookmarks.)

@makew0rld
Copy link
Owner

Fair enough. I'll leave this issue open but I can't say I plan on working on it any time soon.

@makew0rld makew0rld removed the question Further information is requested label Oct 11, 2021
@mntn-xyz
Copy link
Contributor Author

I came up with another use case. You could set up a hotkey to run a script that would generate a certificate for the current site and update the config file. Unfortunately you'd currently need to reload Amfora to get the updated config, but this could make certificate generation much quicker.

And a variation on what I mentioned before: you could run a script to append URLs to a file using a single keypress, for the purpose of quickly building a curated collection of URLs. When ready, you could then send this file through a script to generate an epub or pdf. (Or you could set up a second action that automatically builds the epub/pdf, emails it to your e-reader, and clears out the current curated list of files.) Lots of potential!

I may look at putting together a PR for this in the near future.

@makew0rld
Copy link
Owner

Definitely some interesting uses there. A PR would be appreciated if the changes aren't too extensive and are documented. Thanks!

@mntn-xyz
Copy link
Contributor Author

Things I didn't add in the PR, but which I considered:

  • Automatic substitution of home directory path for ${home} in command path - while this may be useful it's just a nice to have
  • Running commands on a specific link from the command bar, like cmd1:15 to run command 1 on link 15. This could be useful in certain contexts, but honestly it's' not strictly necessary, and I expect people who use this heavily to rebind the keys anyway to sensible mnemonics like "Alt-E" for "email" or similar. In this case they would have to remember that "cmd5" or whatever corresponds to email.

@makew0rld
Copy link
Owner

makew0rld commented Dec 19, 2024

Fixed by #265. I've made a new issue for the minor comment I left behind: #352

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants