atyourcommand

0.1.2 • Public • Published

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

Install the bundled XPI file.

To develop with source, install with npm:

npm install atyourcommand

Immediate to-dos

  1. Display of commands in context menu or with list of commands in edit mode (with the list of commands pre-opened) or in new command mode (with the list pre-closed)

  2. Finish behavior providing substitution of current page contents, URL, etc. (see todos in main.js under "buttonClick" "execute" event)

  3. Submit to AMO

  4. Support defaults (including empty ones) and document

  5. Also support text selection, URL, image, and custom context(s)

    1. 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)
    2. Give user choice on whether to provide content only in certain selector-based contexts (but making necessary JSON-friendly conversions, e.g., canvas to data URL, for them); video, audio, object/embed/applet URL, , etc.
  6. Optional pre-processing of highlighted contents esp. if cannot convert to HTML (e.g., toDataURL on canvas)

    1. Ensure, as with QR Secret Decoder Ring, that we can get a privileged toDataURL canvas snapshot as an argument.
    2. Any way to create convention to get data out of a plug-in by right-click (and demo)?

Higher priority to-dos (longer)

  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), SQL/local file/cache (see below) 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. Add interfaces to the likes of Firefox's SQLite database (including for access to its localStorage contents) or to FileWriter/FileSystem and cached files (e.g., when right-clicking on a document, getting its HTML cache or resource file cache files, or its localStorage, etc. so no data is inaccessible) and HTTPQuery/PATCH requests for a potentially friendly and uniform approach (which could subsume the local SQLite API as well)
  3. AtYourCommand to include HTTPQuery (partial) retrieval of remote content (though delegate partial saving back to webappfind?)
  4. Conditional operator to check whether PUT, HTTPQuery, etc. is supported, and if so, change text sent to command line accordingly (convenience)
  5. 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.) Also allow joining of commands. This could actually work with WebAppFind, e.g., to make flags prefixed with webappfind- along with its own modes (e.g., view, edit, binaryedit) or custom modes--see next todo.
  6. Make desktop app (e.g., Notepad++ plugin? though ideally also a database app to demo with data that is typically otherwise "locked away" to other apps) which allows right-click of text or a URL, etc., and then displays commands stored by AtYourCommand (in files which themselves might be openable in a WebAppFind filetypes.json manner), determining relevance of commands by reverse detecting their "" or whatever substitutions, demoing how a desktop app can in turn allow contextual snippets to be shuffled off to other applications including web-based ones (via WebAppFind). See also todo for WebAppFind re: possible command line syntax within filetypes.json.

Higher priority to-dos (shorter)

  1. 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).
  2. As per AppLauncher feature request, default to a specific, configurable executable path (or save multiple options for drop-down)
  3. Include pre-sets for opening into WebAppFind (and Firefox) and example like Notepad++
  4. Investigate other applauncher.js aspects for possible types of substitutions?
  5. Make reference to potential use with filebrowser or filebrowser-enhanced links on the currently loaded file (optionally with args)
  6. 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.
  7. Allow storage of own "path" environment for greater portability across OS.
  8. Might add items like JSON-stringified array of current

Readme

Keywords

none

Package Sidebar

Install

npm i atyourcommand

Weekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • brettz9