Difference between revisions of "Clipboard Commands"

From OpenCircuits
Jump to navigation Jump to search
(Created page with " This is a guide to the "Command" functions in my Python Clipboard Application, the root documentation is at: '''Python Smart ClipBoard''' = Overview = Commands are tex...")
 
Line 22: Line 22:
  
 
== *>url ==
 
== *>url ==
 +
This command will open a url that follows the *>url.  If multiple lines contain the command many urls will be opened.
 +
One restriction is that the first line copied must contain a *>url command.  Following lines in the clipboard that do not contain the command are just ignored.  Most webbrowsers can copy out the titles and urls of an open page or all open tabs.  If this is copied into the clipboard the transform "add *>url" will add the command to each url ( one per line ) found.  The transform can then be save for later use as a command. 
 +
 +
The code for the command is mostly in cmd_processor.do_star_url_line().
 +
 
== *>text ==
 
== *>text ==
 +
The *>text command is used to open text files.  The command needs to be followed by the name of a file that can be opened with your system editor ( the key parameter is paremeters.ex_editor see '''[[Configuration Files For Python]]''' ) 
 +
 +
The code for the command is mostly in cmd_processor.do_star_text_line
 +
 +
 +
 +
 
== *>shell ==
 
== *>shell ==
 +
The command *>shell followed by a string your operating system recognizes a command in your os terminal shell will run that string.  Like *>url and *>text it can work for multiple commands across multiple lines.
 +
 +
My file explorer in windows does a nice job of copying one or multiple file names ( program is called FreeCommander ), the transform
  
  
 +
The code for the command is mostly in cmd_processor.do_star_text_line
  
 
== *>bat ==
 
== *>bat ==

Revision as of 07:41, 18 March 2020

This is a guide to the "Command" functions in my Python Clipboard Application, the root documentation is at: Python Smart ClipBoard

Overview

Commands are text, single of multiline that contain a command. This is typically indicated by a line starting with *>. Some commands are *>url and *>bat. Some commands are basically single line commands, but you can copy multiple lines with multiple commands ( of the same kind ) or some like *>bat are inherently multi line and currently you can only execute one in a single copy.

For a bit of context if you have the following in your clipboard:

        *>url  https://southcoast.craigslist.org/
    https://southcoast.craigslist.org/tls/d/new-bedford-delta-table-saw/7090239741.html
        *>url  https://southcoast.craigslist.org/tls/d/new-bedford-delta-table-saw/7090239741.html
    Manure - farm & garden - by owner - sale
        *>url  https://southcoast.craigslist.org/grd/d/lakeville-manure/7080232396.html
    The 50 TV Shows You Need to Watch This Winter - The New York Times
        *>url  https://www.nytimes.com/2020/01/02/arts/television/50-shows-to-watch.html?0p19G=0038

then the *>cmd button will open all 4 url's. This lets you keep a list of links in any file that can store text.

Command Details

*>url

This command will open a url that follows the *>url. If multiple lines contain the command many urls will be opened. One restriction is that the first line copied must contain a *>url command. Following lines in the clipboard that do not contain the command are just ignored. Most webbrowsers can copy out the titles and urls of an open page or all open tabs. If this is copied into the clipboard the transform "add *>url" will add the command to each url ( one per line ) found. The transform can then be save for later use as a command.

The code for the command is mostly in cmd_processor.do_star_url_line().

*>text

The *>text command is used to open text files. The command needs to be followed by the name of a file that can be opened with your system editor ( the key parameter is paremeters.ex_editor see Configuration Files For Python )

The code for the command is mostly in cmd_processor.do_star_text_line



*>shell

The command *>shell followed by a string your operating system recognizes a command in your os terminal shell will run that string. Like *>url and *>text it can work for multiple commands across multiple lines.

My file explorer in windows does a nice job of copying one or multiple file names ( program is called FreeCommander ), the transform


The code for the command is mostly in cmd_processor.do_star_text_line

*>bat