Difference between revisions of "ClipBoard Help File"

From OpenCircuits
Jump to navigation Jump to search
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is the Help "file" for the Python Application whose main page is: [[Python Smart Clipboard]]
+
This is the Help "file" for the Python Application whose main page is: [[Python Smart ClipBoard]]
 
   
 
   
= Right now this is Junk =
+
= This Help Page is Early Draft =
Fix comming soon.....
 
  
 +
2021  April  .... working on enhancements so may get this page right, had to get wiki here working again, finally is
 +
Fix coming soon..... No it is not, help is going to link to the main project page.  This material will be reused elsewhere if useful.
  
Help file for backup application.
+
This Python program (clip_board.py) is an application to enhance the windows ( unix ?? ) clipboard by adding the ability to it to:
  
 +
* Transform keyboard contents, referred to as "Transforms".
 +
* Insert predefined elements into the clipboard, referred to as "Snippets".
 +
* Open example files in a configurable editor or ide, referred to as "Snips". -- This really does not involve the clipboard, but is a sort of high powered version of snippets
 +
* Interpret copied text as commands or directions to the system to carry out some action specified in the clipboard contents, for example, browse to some website.
 +
* The program is easily modified by adding transforms, snips, or snippets, this may require some python programming.
  
= Application Features =
 
  
*Highly configurable.
+
    The program does not have a clipboard history as I, so far, have not found that useful. There are a lot of other apps with this feature.
*Only copies new and updated files.
 
*Produces detailed and summary logs so you can know just what it did.
 
*Once set up runs an update with a couple of clicks.
 
*Recurse down a directory structure ( how far is configurable ).
 
*Can select files with "file filters"  For example only *.png and *.gif files.
 
*GUI shows activity.
 
*Can pause and resume.
 
*Can set to throttle the backup so it does not degrade computer performance.
 
*Directory structure, file names, file format preserved in backup.
 
*Backup files may be inspected without need for a restore.
 
*Can be set to simulate mode where you can see ( via the log files ) what would have been copied.
 
  
= Download and Install =
 
  
There is really no install program.  Currently the application is intended for those who have at least a little familiarity with Python coding and can just insert the downloaded code into their development environment and run it.  Code not yet available.
+
For a quick overview on use once installed see the GUI documentation at: ClipBoard GUI That page will also link to the 4 areas of operation:
  
<!-----------
+
* [[Clipboard Transformations]]
+
* [[Clipboard Snippets]]
 +
* [[Clipboard Snips]]
 +
* [[Clipboard Commands]]
 +
 
 +
 
 +
== Transformations ==
 +
 
 +
Transformations is one of the principal functions of the ClipBoard App, there is a whole page that lists most of them ( they are frequently enhanced keeping up is hard to do )
  
Code at '''[https://github.com/russ-hensel/smart_plug/tree/master russ-hensel/Smart_plug Application ]''' For most of you it will not run due to dependency problems.  You will need to add them.  Pretty much read the error messages and install the missing code.  I use Anaconda Spyder so my preferred tool is conda ( conda install pyHS100 ).  If conda does not work or you do not use it use pip.  pyHS100, a library for smart plugs is pretty likely to be missing ( pip install pyHS100) .  Depending on your installation there may be more.
+
'''[[Clipboard Transformations]]'''
  
Much of the application is configurable through the parameter.py file, but the default should give you an application that runs, including a default database.  You probably will not be able to talk to your smartplugs, because the parameters do need to be told what and where ( tcpip address ) they are.
+
== Commands ==
 +
Interpret copied text as commands or directions to the system to carry out some action specified in the clipboard contents, for example, browse to some website.
 +
'''[[Clipboard Commands]]'''
  
So to tell the application about your plugs.  You should know the address of each plug.  If not you might want to use an application like advanced ip scanner ( google it ).  The smartplug gives up very little information on my scans, but run the scan with the plug plugged in and out, and the address that appears ( or disappears ) it the address of your device.
+
== GUI ==
  
The section of parameters.py that locates the device looks like this:
+
Using the GUI see: [[ClipBoard GUI]]
  
        self.device_list      = [
+
== Meta Tool Bar ==
                { "name": "device_1", "tcpip": "192.168.0.209", "more": None, "gui_label": None, "gui_combo": None  },
+
the meta tool bar is the button bar across the top, it performs actions ( like help ) that are about the application, like configuration, but are not part of its purpose ( like transforming clipboard contents )
                { "name": "device_2",  "tcpip": "192.168.0.209", "more": None, "gui_label": None, "gui_combo": None  },
 
                { "name": "device_3",  "tcpip": "192.168.0.209", "more": None, "gui_label": None, "gui_combo": None  },
 
                                  ]
 
it is a list of dictionaries.  The entry above is for 3 devices ( but I only have one, so the tcpip address is repeated ) For now only worry about the tcpip address and the name for the device; put in as many devices as you wish to control.
 
  
With the edited parameter file saved, restart the application.  You should be able to "talk" to your devices.  Not working?  Double check or email me.
 
  
In the future I may try to add some autodetect features.  There is a routine to discover the plugs in the pyHS100 library, but it does not work for me.
 
  
this cannot bee seen
 
------------->
 
  
  
= How To:... =  
+
== draft material ==
== Goal ==
 
This is how I use the program, you could use it differently:
 
  
Put a short Python script in a directory.  When this is double clicked start the GUI for the backup program set up to backup the directory to another directory either on the current disk or another disk.
 
  
  
== General ==
+
   
*Setup for backup of a directory. See section below.
 
  
*Edit the parameter file:  Use your development environment for Python or a text editor to edit parameters.py.  See also: The section below, [[Configuration Files For Python]].  Normally I have a button on the GUI for this, but this function does not seem so useful for this application
+
*Edit the parameter file:  Use your development environment for Python or a text editor to edit parameters.py.  See also: The section below, [[Configuration Files For Python]].  I have a button on the GUI for this.
  
 
<!-----------
 
<!-----------
Line 79: Line 69:
 
*Use your preferred text editor. In the parameter file, see below.
 
*Use your preferred text editor. In the parameter file, see below.
  
*Using the GUI see: [[Backup GUI]]
+
*Using the GUI see: [[ClipBoard GUI]]
 
 
== Setup for Backup ==
 
There are several different way to use the program, varying in part on how much you setup in parameters.py and how you structure your backups.  I generally set it up with a small program in the directory that I wish to backup, then to run the backup I go to that directory ( with a file manager ) and double click the file.  This is what I will describe here.  There are a lot of small variations you can make to how you run it and locate the files, you can probably figure many of these out yourself.
 
 
 
=== Manually Configure the Backup ===
 
 
 
*Copy the file _sample_backup.py from your download of the program and drop it in the source directory.  Lets say the name of this is  ....../my_important_files.
 
*Set up a backup location somewhere on your computer or network.  It should be named  ......./my_important_files.  You need to set up this directory manually because the backup program checks this name to make sure you do not backup to the wrong location by mistake.  Of course once this is setup it is done for good for that directory and backup configuration.
 
*The application comes with some sample files to be backed up and a backup location for them.
 
*For the rest of the setup read the file _sample_backup.py ( or your copy of it ) and then run it.
 
*Look at the display in the GUI for the setting the program is using, and if Ok then run the backup. See: [[Backup GUI]] for more info on the GUI
 
*After it has run take a look at the log files ( you can do this from the GUI once you configure parameters.py for your text editor of choice.
 
*_sample_backup.py will run pretty much the same no matter where it is located on you disk, except you may find the python log file left in the directory with _sample_backup.py
 
  
=== Minimally Configure the Backup ===
+
== More Info Here ==
 
 
*Edit parameters.py to default:
 
**default_name = {default name for the backup}     
 
**log_detail_fn = {file name for the detailed log}
 
**log_summary_fn = {file name for the summary log}  
 
*Now look at the file _sample_backup_2.py for more documentation, pretty much all you have to set is the source and destination.
 
*Program runs like _sample_backup.py, see above.
 
 
 
=== No Configruation of Backup ===
 
In this mode the the location of the backup.py file determines the source directory and parameters.py computes a destination.  In my setup many files come from my D: drive and go to a network location rooted at I:\Data.  So I use a method in the backup.py file to compute the destination......
 
 
 
Code in _sample_backup_3.py and the shipped parameters.py as  parameters.set_source_here() look at these files.
 
  
 
=  How to Use the Parameter File =  
 
=  How to Use the Parameter File =  
Line 115: Line 80:
 
**See above in Download and Install
 
**See above in Download and Install
 
*Enable your favorite editor to work with the application.
 
*Enable your favorite editor to work with the application.
**self.ex_editor          =  r"D:\apps\Notepad++\notepad++.exe"  # use r" or the backslashes will not work, or you can use forward slashes instead they may be wrong but they work.
+
**self.ex_editor          =  r"D:\apps\Notepad++\notepad++.exe"  # use r" or the backslashes will not work, or you can use forward slashes instead; they may be "wrong" in Windowd, but they work.
 
*Lots of other settings:
 
*Lots of other settings:
 
**Read the comments in parameters.py and change as desired.  If a setting does not work let me know.
 
**Read the comments in parameters.py and change as desired.  If a setting does not work let me know.
Line 121: Line 86:
 
**Re download and get back to the original parameter file.
 
**Re download and get back to the original parameter file.
  
= The GUI =
+
== Links ==
 
+
*'''Click on Category ClipBoard ''' below
see: [[ClipBoard GUI]]
+
*'''[https://opencircuits.com/index.php?title=Python_Smart_ClipBoard Python Smart ClipBoard - OpenCircuits ]''' main page for this application.
 
 
= Debugging =
 
 
 
There are several application outputs that may be useful for debugging.
 
 
 
* Watch the GUI
 
* Check the Python console.
 
* Look at the python log file ( use the GUI button <Edit Log> ( specify your editor in parameters.py first ) or use your editor on the default name of the log file ...\backup\backup.py_log.
 
 
 
Most issues will probably be missing libraries, parameters.py issues, or just bugs in my code (email me ).
 
 
 
If you are dropping you backup scripts around your disks and double clicking them you may need to tweak your path so python.exe or pythonw.exe is on your path.
 
 
 
<!-----------
 
 
this cannot bee seen
 
------------->
 
 
 
= Links =
 
 
 
*[[Python Smart Clipboard]] main page for this project
 
 
 
*Click on category page for this project ( '''ClipBoard''' ) below.
 
*Click on '''What links here''' on the left of this page
 
 
 
 
 
  
[[category:ClipBoard]] [[category:Python]] [[category:Python Project]]
+
[[Category:ClipBoard]]

Latest revision as of 07:34, 31 March 2021

This is the Help "file" for the Python Application whose main page is: Python Smart ClipBoard

This Help Page is Early Draft[edit]

2021 April .... working on enhancements so may get this page right, had to get wiki here working again, finally is Fix coming soon..... No it is not, help is going to link to the main project page. This material will be reused elsewhere if useful.

This Python program (clip_board.py) is an application to enhance the windows ( unix ?? ) clipboard by adding the ability to it to:

  • Transform keyboard contents, referred to as "Transforms".
  • Insert predefined elements into the clipboard, referred to as "Snippets".
  • Open example files in a configurable editor or ide, referred to as "Snips". -- This really does not involve the clipboard, but is a sort of high powered version of snippets
  • Interpret copied text as commands or directions to the system to carry out some action specified in the clipboard contents, for example, browse to some website.
  • The program is easily modified by adding transforms, snips, or snippets, this may require some python programming.


   The program does not have a clipboard history as I, so far, have not found that useful. There are a lot of other apps with this feature.


For a quick overview on use once installed see the GUI documentation at: ClipBoard GUI That page will also link to the 4 areas of operation:


Transformations[edit]

Transformations is one of the principal functions of the ClipBoard App, there is a whole page that lists most of them ( they are frequently enhanced keeping up is hard to do )

Clipboard Transformations

Commands[edit]

Interpret copied text as commands or directions to the system to carry out some action specified in the clipboard contents, for example, browse to some website. Clipboard Commands

GUI[edit]

Using the GUI see: ClipBoard GUI

Meta Tool Bar[edit]

the meta tool bar is the button bar across the top, it performs actions ( like help ) that are about the application, like configuration, but are not part of its purpose ( like transforming clipboard contents )



draft material[edit]

  • Edit the parameter file: Use your development environment for Python or a text editor to edit parameters.py. See also: The section below, Configuration Files For Python. I have a button on the GUI for this.
  • Install: see section above.
  • Debug: see section below.
  • Quick Restart of the application: Not in this app, just shutdown and restart.
  • Use your preferred text editor. In the parameter file, see below.

More Info Here[edit]

How to Use the Parameter File[edit]

See: Configuration Files For Python

Editing of the parameters.py file

    • See above in Download and Install
  • Enable your favorite editor to work with the application.
    • self.ex_editor = r"D:\apps\Notepad++\notepad++.exe" # use r" or the backslashes will not work, or you can use forward slashes instead; they may be "wrong" in Windowd, but they work.
  • Lots of other settings:
    • Read the comments in parameters.py and change as desired. If a setting does not work let me know.
  • If you mess up.
    • Re download and get back to the original parameter file.

Links[edit]