/anamnesis

persistent clipboard manager

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Description

Anamnesis is a clipboard manager. It stores all clipboard history and offers an easy interface to do a full-text search of the items of its history.

Installing

Easily

# if you wish: sudo pip3 install git+https://github.com/oneyb/anamnesis 
pip3 install git+https://github.com/oneyb/anamnesis
# or
git clone https://github.com/oneyb/anamnesis
pip3 install anamnesis/ # sudo ?
# or
cd anamnesis && python setup.py install

Manually

The recommended manual installation has three steps:

  1. copy the command-line to the system path
  2. install the anamnesis daemon in the session start-up
  3. create a keyboard shortcut to the graphic interface

Specifically:

  1. Create a symbolic link named ‘anamnesis’ in the system path, pointing to anamnesis.py, for example:
    sudo ln -s /path/to/anamnesis.py /usr/bin/anamnesis
        
  2. Configure the following command to be executed on session start-up (System -> Preferences -> Session Apps):
    anamnesis --start
        
  3. Configure a shortcut to the graphic interface (System -> Preferences -> Keyboard Shortcuts):
    anamnesis --browse
        

Command line

Usage: anamnesis [options]

Options:
  --version            show program's version number and exit
  -h, --help           show this help message and exit
  --start              starts anamnesis daemon
  --stop               stops anamnesis daemon
  --restart            restarts anamnesis daemon
  -b, --browser        opens anamnesis browser with clipboard history
  --cleanup            optimize database and limit the number of elements
  -l N, --list=N       prints the clipboard history last N values
  --filter=KEYWORDS    use keywords to filter the clips to be listed
  -a CLIP, --add=CLIP  adds a value to the clipboard
  --remove=ID          removes the clipboard element with the given id
  --brief              print only a brief version of long clipboard elements

Examples:

Starts the graphical user interface:

anamnesis --browser
# alternatively, if using easy installation
anamnesis-browser

Starts the anamnesis daemon:

anamnesis --start
# alternatively, if using easy installation
anamnesis-daemon

Stops the anamnesis daemon:

anamnesis --stop

List the last 20 clipboard items:

anamnesis --list=20

List the last 5 items in the clipboard the has the keywords ‘my’ and ‘search’:

anamnesis --list=5 --filter="my search"

Adds a clipboard item (same as copying to the clipboard if the daemon is running):

anamnesis --add="hello, clipboard!"

Dependencies (for Ubuntu 20.04 LTS)

  • python3
  • sqlite3
  • python3-gi
  • gobject-introspection
  • gir1.2-gtk-3.0
sudo apt install python3 sqlite3 python3-gi gobject-introspection gir1.2-gtk-3.0

Configuration

Anamnesis will search for configuration files in the $XDG_DATA_DIRS and $XDG_CONFIG_HOME directories. It defaults to:

  • /usr/share/anamnesis/anamnesis.cfg
  • ~/.config/anamnesis/anamnesis.cfg

Authors

Written by Fabio Guerra <fabiowguerra@users.sourceforge.net>

Ported to Python 3 by Brian Oney

Issues