Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

atyourcommand

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atyourcommand

Open web content into the command line

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

atyourcommand

NOTE: This project is not yet functional.

Firefox add-on for opening arbitrary web content into the command line (which also enables opening arbitrary web content into other web apps via WebAppFind).

A number of automatic substitutions are available (and documented within the dialog) such as obtaining the current URL, title, content as HTML or text, etc.

Installation

One can directly install the bundled XPI file or install with npm:

npm install atyourcommand

Immediate to-dos

  1. Behavior additions
    1. Finish behavior providing substitution of current page contents, URL, etc. (see todos in main.js under "buttonClick" "execute" event)
    2. Support defaults (including empty ones)

Likely to-dos

  1. Opinion piece on great importance of data ownership and decoupling of local or remote data from applications (also discuss need for return to (user-approved) globalStorage for application independence and potential use in websites adopting application-neutral add-on frameworks, and SharedStorage, AsYouWish namespaced storage, and the HTML5 download attribute (whose ability to save anywhere is nice but does not allow the site to prompt for a specific directory and does not allow for automatic reading back of the file), as hacks in the interim). Also consider idea for requesting or providing content (prefs, request for privs, drafts/documents/chat logs/social media content) stored in such globalStorage under user-approved (or site-approved) license and purchasing terms negotiated in the browser with acceptable third-party verifiers. Cover need for "data ownership" to more frequently accompany privacy discussions. Ridiculousness of effort at code being decoupled when web (and desktop in connection with the web) is itself not decoupled. Also cover the ideas for PUT requests (for decoupled saving) and interfaces to the likes of Firefox's SQLite database (including for access to its localStorage contents) or to FileWriter/FileSystem files and HTTPQuery/PATCH requests for a potentially friendly and uniform approach (which could subsume the local SQLite API as well) toward allowing universal and neutral APIs to obtain and save portions of documents as well as whole documents among open data sources and applications (e.g., to right-click when using a Firefox add-on for localStorage, FileSystem, or IndexedDB browsing and send the data to the command line, including optionally to WebAppFind for discovering a suitable web-app, and allowing an API for saving back, thus freeing the user from local storage data lock-in). Likewise for right-clicking a particular element (or XPath/CSS Selector expression?) within a document to do a PATCH back to the server for replacing just that portion with whatever value is indicated by the user or by the web app which was delegated responsibility for the PUT/PATCH (an HTML/XML document is itself a kind of database).
  2. Idea for command line apps to align themselves with a uniform, atyourcommand-friendly syntax to simplify supplying of data (and to allow for UI-building of such arguments for apps which are compliant). Indicate on wiki projects supporting. (Or better yet, parse existing help files or command line help flag commands, if structured enough.)
  3. Add demo of data page being opened into WebAppFind and sent to web app which feeds data to a plug-in and receives data back for a PUT save back to the remote file (important for showing capability of native apps integrated with browser gaining same workflow access to the opening and, optionally, editing, of a document, including online editing).
  4. Ensure, as with QR Secret Decoder Ring, that we can get a privileged toDataURL canvas snapshot as an argument.
  5. As per AppLauncher feature request, default to a specific, configurable executable path (or save multiple options for drop-down)
  6. One-off command line dialog: add optionally savable label (for saving)
  7. One-off command line dialog: add options to "save and execute", "save and close" and add context menu link to prefs dialog
  8. Prefs: label list: add, edit, delete, move up/down (adapt for AYW also?)
  9. Include pre-sets for opening into WebAppFind (and Firefox) and example like Notepad++
  10. Investigate other applauncher.js aspects for possible types of substitutions?
  11. Make reference to potential use with filebrowser or filebrowser-enhanced links on the currently loaded file (optionally with args)
  12. AtYourCommand to include HTTPQuery (partial) retrieval of remote content (though delegate partial saving back to webappfind?)
  13. Conditional operator to check whether PUT, HTTPQuery, etc. is supported, and if so, change text sent to command line accordingly (convenience)
  14. To handle file:// URLs and c:\ paths that are right-clicked (or currently loaded) to: expose folder (or copy folder/file path), bare execution on desktop or with web app (without specific executable, args, etc.; also provide a prompt), e.g., for executables/batch files, see filebrowser enhanced to-do about splitting off its context menu/add-on bar file:// capabilities into separate add-on.

Possible to-dos

  1. Create icons, etc.
  2. Might allow selection of submenus, separators, etc.
  3. Any other command line necessities (besides quoted string escaping)?
  4. As per AppLauncher feature request, allow shortcuts on the toolbar; also modify to work with main menu, app-bar, or key command as well
  5. Option to have context menu items, based on the substitutions used (or user choice), cause them to only appear under certain, correct conditions (but ensure commands can utilize multiple components (e.g., highlighted link and page HTML)
  6. Ability to confirm selected text content is a path, URL or file URL, etc.?
  7. Optional pre-processing of highlighted contents esp. if cannot convert to HTML (e.g., toDataURL on canvas)
  8. Allow atyourcommand to send content to web apps directly through WebAppFind code when present (as opposed to through command line)?
  9. Remote site supply of commands
    1. Way for websites to register commands or groups of commands upon user introspection and permission
    2. Served with special content type and protocol meant for external launching?
      1. Create protocol to force dialog asking to launch app (so if user clicks link, will get asked), optionally with args, and optionally with desktop file or remote URLs, etc. as content; will thereby also be able to support (and demo) WebAppFind invocation from remote
  10. De-coupling of remote content from its executable (as in regular atyourcommand) but remember upon future loads of the content
    1. Modify Open In Browser add-on to allow launching of a file URL including with own args (and optional saving/editing of the command for reuse across atyourcommand content)
      1. Overlay Open In Browser but make it support site prefs (but not by domain as with Mozilla content prefs!) (in addition to mapping MIME to commands) so choice will be remembered (checkbox to remember choice including any arguments, passing URL and/or file contents); also allow WebAppFind detection (e.g., remote filetypes.json?) in addition to MIME detection?
      2. Point out potential use in automatically launching WebAppFind-driven web apps automatically with web data (and with PUT requests back to server, could get full round-trip decoupling of data and app)
      3. Allow all file:// URLs to optionally be opened externally as per https://support.mozilla.org/en-US/questions/758172
      4. Cover usage of http://kb.mozillazine.org/View_source.editor.external and http://kb.mozillazine.org/View_source.editor.path
    2. As with my possible todo for Open In Browser site prefs, make the filebrowser-enhanced context menu and right-click on WebAppFind icon (for the opening of the current browser document into WebAppFind) sensitive to site prefs so right-click arguments can optionally be remembered; share options across all of these addons?
  11. To make atyourcommand more meaningful, ensure works with a Gopher-over-HTTP protocol (e.g., one limited to
  12. elements and other tags auto-escaped):
    1. Do Gopher system for these files just extra required header; search "Gopher (protocol) over HTTP" (FTP, WebDAV?)
    2. Problem with informational message--needs to map to real files; use instead hidden files of given extension with optional sticky coordinates
    3. Use WebDAV request (via same-site Ajax or Firefox add-on privileged cross-domain (already with WebDAV add-on?)) for directory (propfind overloaded, was it?) so request for individual file reading or writing (as with directory listing) can be made over HTTP (including reverse webappfind)
  13. Exporting as batch files, and converting batch files upon import (also in conjunction with Executable Builder) which could allow for convenient reuse of the content when attaching the batch script to a "Open with..." handler. Use approach like http://stackoverflow.com/a/5215844/271577
  1. https://github.com/piroor/ctxextensions (restartless and to AMO?); support not only full custom control over context menu, but also toolbar, menu, add-on bar, key command, etc.
    1. Break apart functionality to specialize in context menu text and URL manipulations? (If so, ensure some other way to have full control over where tools appear; do this by modifying the Firefox Add-ons SDK itself so capability baked-in?)
    2. Integrate with or replicate Greasemonkey behavior also?
    3. Get context menu to support hiding items via whitelist or blacklist until exposed by a key command (so that for normal browsing, the context menu is light, but can be made more powerful at a keystroke).
  2. Utilize (JavaScript-based) Blockly for pipelining of any kind of command (though avoid baking in UI as UI should be flexible, e.g., to allow use in menu, toolbar, add-on bar, etc.); also macro-like development
  3. When allowing users to create command line commands for context menus/menus/toolbars/add-on bar/etc., allow and demo (with Blockly?) JS prompts (useful for dynamic batch), e.g., to replicate atyourcommand functionality. Might automatically provide prompts when a variable is indicated without a value unless marked as having a default (including an empty one).

Inspiration

The main impetus for this project comes from my interest to act in the reverse direction from https://github.com/brettz9/webappfind, but some ideas were obtained from https://addons.mozilla.org/en-US/firefox/addon/applauncher/ after I discovered it had some of the same ideas (but I wanted it restartless, with baked in WebAppFind support, etc.).

I was also very much inspired by (and would ultimately hope to replicate) the powerful ContextMenu Extensions add-on which admirably provides controlled but extensible and open programmability to regular users.

FAQs

Package last updated on 25 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc