https://bugs.kde.org/show_bug.cgi?id=307792

--- Comment #5 from Dashon <sparky123558w...@gmail.com> ---
(In reply to Martin Flöser from comment #2)
> Sorry for the late reply to this feature request.
> 
> Could you please elaborate on the use case. I fail to see why one would want
> to export the clipboard history. And even if: what format should be used?
> What to do with binary data (e.g. images)? If we export using a specialized
> format I doubt it's of any use for anybody. If we don't introduce a format
> it would be rather useless content as it would even miss the meta data on
> where one entry ends and the next one starts.
> 
> As a matter of fact: klipper saves it's history to a file in a custom format.

In my case the idea is to be able to get all of the text at once, so that I can
use all of the text at once. For example importing a bunch of links into a
separate program. As things stands you have to go through each entry one by
one. My current workaround is this simple bash script to call klipper from the
command line using qdbus and print each entry to stdout, so that I can redirect
it to a file or wherever else.

#!/bin/bash
# Author: koffeinfriedhof
# From forum.kde.org
# Modified by me

# the list postition counter (messages counter)
n=0

# must not be "" !
f="I am the placeholder for each line in klipper"

# loop through all entries using dbus
while [ 1 ]; do
f="$(qdbus org.kde.klipper /klipper getClipboardHistoryItem $n)"

# if "$f" has zero length (empty), stop
if [ -z "$f" ]; then break; fi

# print each entry
echo "$f"

# increase counter
n=$((++n))
done

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to