Wednesday, November 16, 2011

Clipboard manager

Reading Jeff Hooglan's post on Parcellite reminded me that I have not blogged about my own clipboard manager that I am writing , ClipCat (Clip Catalog). I really missed ClipMate when I switched to Linux years ago and didn't find anything remotely comparable. Klipper in KDE was OK, but I have switched to Gnome (may switch again because of Unity and Gnome 3, but that's another story...). I tried Glipper, Klipper, Parcelite, etc. but they did not have all the features that I wanted.
So, I decided to try and write one myself. It's coming along nicely, and I use it every day.

Main Features:
  • Panel icon with drop down menu of clip history, with current clipboard contents at the top and highlighted.
  • History menu can be sorted Alphabetical, Reverse Alphabetical, Chronological, Reverse Chronological, Most Used, Last Used.
  • Snippets, with user set categories & icons in the history sub-menu.
  • Optional properties - category, title, tags, source, note, for a snippet (or clip).
  • Clips/snips can be edited.
  • Grow a clip/snip, if a longer version is copied (optional).
  • Can append next copied text to an existing clip.
  • Can automatically append successive clipboard contents to a clip, or into a new clip.
  • Create a new clip directly, and put it on the clipboard.
  • Can insert date/time into a clip.
  • Load a file into a clip.
  • Save a clip to a file.
  • Search clips/snips. Full text search with AND, OR, NOT, NEAR operators and wild cards. Table column to search can be specified.
  • Compact, repair, backup, restore of clips database file.
Clip history menu (and snip sub-menu) are opened by clicking on ClipCat's panel icon. The history menu is configurable as to number of items shown in primary menu (the rest are shown in a sub-menu), length of the menu item shown, length of the preview shown in a tooltip (if too long to show in menu). Right clicking brings up a menu for opening the Action Window, sorting clips, clearing clip history, opening the preferences dialog, showing help or the About dialog. Middle click opens the property dialog for setting the category, tags, title, source or note of a clip/snip.

The small Action Window allows creating, viewing, editing clips, as well as executing plugins that manipulate clips. The Action Window also has optional word wrap and spell checking. It's initial position on screen can be set, as well as whether it stays on top of other windows, and shows on all desktops. The font for the editor view can be chosen, and sound for events can be enabled. Some properties of the selected clip/snip are shown in a tooltip, such as title, date created, times used. Character and word count for the clip being viewed are shown in the right of the status bar. Character count is color coded according to it's probable suitability for Twitter, SMS text message, or Shoutbox.

A simple plugin architecture allows extra functionality to be added by writing a script in Python. A template is provided to start a new plugin script.
Current plugins:
  1. ClipCat information - version, number of clips/snips, etc..
  2. Delete blank lines.
  3. Dump snips in a category to a file.
  4. Email a clip.
  5. Explode a clip into several clips (split at newline or other delimiter).
  6. Move tagged clips to another category.
  7. Number lines (with user chosen separator after numbers).
  8. Open the URL's in a clip in a browser.
  9. Post clip on PasteBin, and put the URL pointing to it on the clipboard.
  10. Remove/replace text using a regular expression.
  11. Remove HTML-XML tags.
  12. Remove leading characters (#\\>, or user selected).
  13. Remove line numbers, ignoring dates.
  14. Send clip as an SMS text message.
  15. Shorten a URL and put the short version on the clipboard.
  16. Sort lines in the clip; alphabetical, reverse alphabetical, case insensitive, natural.
Plugins can be helpful to clean up email messages, remove comment characters from code, format text to be included in email or documents,
extract plain text from HTML code, make inserting items into forms easier, share clips, etc.
Some plugins log their actions to the editor of the Action Window, so it can be saved as a clip/snip for reference, if desired.

ClipCat is written in Python and pyGTK. Data is kept in the very reliable SQLite database, so only one file need be backed up. Each clip/snip has the properties date created, last used, times used, and and the user set properties. This database can be viewed or edited independently of ClipCat if needed.

I have tried it on an old Thinkpad, 600Mhz Celeron with only 256MB RAM and it still performed acceptably.

While far from perfect, I find it very useful even at the present stage of development. I have lots of ideas for improvement too. I hope to package it and recruit some testers soon. If interested, leave a comment.


















12 comments:

  1. interested! i'm an Ubuntu noob, loved (and depended on) ClipMate before i bailed from Windows. i'd be happy to be a tester for your ClipCat project, love the name! i'm hooly((at))gmx.com

    ReplyDelete
  2. Thanks for you interest. I hope to have it packaged for testing in the next few weeks. Note that at this point it only runs on Gnome 2.x. No effort has been spent to make it installable in Unity or Gnome 3.

    ReplyDelete
  3. Definitely! This seems to be what I have been looking for my clipboard management especially with those Python script plug-ins... awesome:) I would really love to know when you decide to make those packages available. Please let me know on pawel.ceranka@gmail.com. Thanks for your work:)

    ReplyDelete
  4. Hi there,

    Not sure if this ever happened, but is there any way I can download this package or did it not ever get released? If you need someone to do testing (I know it has been a few months, but just thought I would throw it out there), let me know at benbos_06 {} yahoo.com.

    Thanks!

    ReplyDelete
  5. Still working on fixing bugs, then I need to package it for testing.

    ReplyDelete
  6. To anyone interested, I'm sorry for the delay in releasing ClipCat. The changing Gnome environment, Ubuntu going to Unity, etc. have slowed me down. I wrote it for Ubuntu 10.04 which I am still using. Since the newer Gnome and Unity seem unsuitable to run ClipCat, I will probably move to Mint Cinnamon early this year, and port ClipCat to that desktop.

    In the meantime, I am writing the help documentation.

    ReplyDelete
  7. Hi! I'm looking for ClipCat but didn't find it. Where I could download it?

    ReplyDelete
  8. Hello and thanks for your interest. Unfortunately, I still do not have it packaged for testing. I switched to Mint with the MATE desktop which took a little conversion.
    Also, I have been side tracked by writing my own simple command line bug tracking database (also using SQLite), the adapting it for movies, and lately health info. I also wrote my own Python programmer's editor as an exercise to see what is possible (for me).
    I have still been working on ClipCat, fixing bugs and improving it and it's plugins. I have written a simple install script, but it may require some user intervention if all the required packages are not automatically installed.
    I apologize to all of you who have expressed interest, and I will try to get something packaged for you to test soon.

    ReplyDelete
  9. Just found this and it sounds perfect. Any chance of downloading ClipCat? I am using Debian-based SparkyLinux and glipper has stopped working after an update. I cannot bear those clipboard managers that do not display a tooltip of the full clip.

    ReplyDelete
  10. Yes, but note the comment above. As of now, it only works on the MATE desktop (or GNOME 2). I will email you privately and we can arrange for you to test ClipCat.

    ReplyDelete
  11. Hello, I just stumbled upon this project in late April 2015 after coming back to Unity from KDE 4.x, is there any chance ClipCat may become available for Unity?

    ReplyDelete
    Replies
    1. Hello, sorry for the late reply. Unfortunately I have not packaged ClipCat for download as some of the underlying technologies have changed, & I have not had time to update it. When I do, it will probably be to run on Mate or Cinnamon desktop. It may be possible that it will run on unity but that will be a lower priority as I have never used it.
      Thanks for your interest.

      Delete