fmoralesc / pastie Goto Github PK
View Code? Open in Web Editor NEWa simple *nix clipboard manager with application-indicator support
a simple *nix clipboard manager with application-indicator support
When you copy a file, Pastie displays the path to the file. For long paths, this is useless as you don't know what file that actually is.
The file name should be displayed first, and then in the brackets the path should be displayed (or something like that).
Screenshot: http://lh3.ggpht.com/_1QSDkzYY2vc/TEtBHf5--DI/AAAAAAAABlA/eXQh1F1BuXs/pastie.png
Sure looks that way. Last minor touch 7 years ago, last significant one 11 years ago. No Readme. 18 open issues.
A python solution looks nice to me, gave it a quick whir but already lost on import gtk
and googling solutions leaves me moving on alas. A shame. None of the forks are any more up to date or well documented either.
Hello,
on my computer, Xorg consumes a lot of processor when pastie is active, and sometimes I have to close pastie because xorg consumes mores than 50% cpu.
And I obtain this message:
/usr/lib/pymodules/python2.6/pastielib/protector.py:220: GtkWarning: XID collision, trouble ahead
if 'PASS_TIMEOUT' in self.clipboard.wait_for_targets():
/usr/lib/pymodules/python2.6/pastielib/protector.py:224: GtkWarning: XID collision, trouble ahead
elif self.clipboard.wait_is_uris_available():
Thanks for your help.
LGDN
Hi,
Ctrl+C in jEdit never puts any content in latest Pastie's Clipboard on Ubuntu Lucid 32bit.
As a result, pasting in jEdit always inserts some other unwanted previous content.
Hello,
when I launch pastie from command line I obtain this error message, but it works:
[code]
legluon@dunet-home:~$ Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/pastielib/protector.py", line 278, in update_menu
label = i.get_label()
File "/usr/lib/pymodules/python2.6/pastielib/history.py", line 189, in get_label
first_file, path_list[last] = balanced_constraint_shorten((first_file, path_list[last]), available)
File "/usr/lib/pymodules/python2.6/pastielib/history.py", line 116, in balanced_constraint_shorten
string_ratio = Fraction(len(pair[0]),len(pair[1]))
File "/usr/lib/python2.6/fractions.py", line 98, in new
raise ZeroDivisionError('Fraction(%s, 0)' % numerator)
ZeroDivisionError: Fraction(68, 0)
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/pastielib/protector.py", line 278, in update_menu
label = i.get_label()
File "/usr/lib/pymodules/python2.6/pastielib/history.py", line 189, in get_label
first_file, path_list[last] = balanced_constraint_shorten((first_file, path_list[last]), available)
File "/usr/lib/pymodules/python2.6/pastielib/history.py", line 116, in balanced_constraint_shorten
string_ratio = Fraction(len(pair[0]),len(pair[1]))
File "/usr/lib/python2.6/fractions.py", line 98, in new
raise ZeroDivisionError('Fraction(%s, 0)' % numerator)
ZeroDivisionError: Fraction(68, 0)
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/pastielib/protector.py", line 278, in update_menu
label = i.get_label()
File "/usr/lib/pymodules/python2.6/pastielib/history.py", line 189, in get_label
first_file, path_list[last] = balanced_constraint_shorten((first_file, path_list[last]), available)
File "/usr/lib/pymodules/python2.6/pastielib/history.py", line 116, in balanced_constraint_shorten
string_ratio = Fraction(len(pair[0]),len(pair[1]))
File "/usr/lib/python2.6/fractions.py", line 98, in new
raise ZeroDivisionError('Fraction(%s, 0)' % numerator)
ZeroDivisionError: Fraction(68, 0)
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/pastielib/protector.py", line 278, in update_menu
label = i.get_label()
File "/usr/lib/pymodules/python2.6/pastielib/history.py", line 48, in get_label
l = unicode(self.payload[:length+length]).strip(' ')
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 99: unexpected end of data
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/pastielib/protector.py", line 278, in update_menu
label = i.get_label()
File "/usr/lib/pymodules/python2.6/pastielib/history.py", line 48, in get_label
l = unicode(self.payload[:length+length]).strip(' ')
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 99: unexpected end of data
[/code]
is it normal on Ubuntu Maverick?
Thanks.
I installed it using the .deb file and it wont run now
terminal output:
musl1m@musl1m-laptop:~$ pastie
Traceback (most recent call last):
File "/usr/bin/pastie", line 57, in
clipboard_protector = protector.ClipboardProtector(indicator)
File "/usr/lib/python2.6/dist-packages/pastie/protector.py", line 46, in init
self.history[0].set_as_current()
File "/usr/lib/python2.6/dist-packages/pastie/history.py", line 77, in getitem
return self.data[index]
IndexError: list index out of range
Even using the default keyboard shortcuts (<Control><Shift>C) for open the selection dialog won't work for me. With some try and error I found out that at least setting it to <Control><Alt>C works for me.
By the way: the default keyboard shortcut for Preferences worked... that's why I tried <Control><Alt>C there.
hey,
i use pastie to handle my transactions better.
i copy the account number, the number of the bank, the account holder and the amount to transfer then i paste them into the form of my bank.
i have to select them one by one from pastie.
an idea i had:
what about selecting the latest copies through shortcuts?
e.g. ctrl+shift+number: ctrl+shift+2= second latest copied text and so forth?
i'm not sure whether the combination is still available but it could by used with any other.
do you think it's realizable and do you get the idea behind it?
great software, by the way!
somethig like this:
clipboard dialog is visible
i press shortcut (maybe, Ctrl+C again or Shift+Enter)
selected item content are set as the current clipboard’s and paste in current document (like ctrl-v)
sorry, i can't understand how to add whishlist tag
When testing for issue #5, I:
It took some time for the menu to appear (I guess there's a problem in the HistoryMenuItem:repr function), and when it did, it also took a long time to populate the "Editing the clipboard" dialog textbox, which I opened.
When I closed the dialog, and tried to open it again, it didn't for some seconds.
I quited pastie, and then tried to run it again. It took very long (+10 seconds) for it to open. Again, all operations were slowed until i cleared "The quijote" from the history.
It would be nice to change the icon pastie uses, so it could be better integrated into the ubuntu-mono or other icon-sets. When manually adding a mono gtk-paste icon to the theme it changes everywhere; e.g. paste-icon in Gedit ist also a mono icon.
So it would be great If user could choose between "default", "ubuntu-mono-dark", ubuntu-mono-light" and maybe "elementary-dark".
My question, how to change the icon of appindicator? Replacing gtk-paste in pastie.py with the path to a different icons no icon is displayed :(
Pastie 0.6.7 fails to start:
andrei@andrei-desktop:~/Desktop$ pastie
`menu_proxy_module_load': /usr/bin/python: undefined symbol: menu_proxy_module_load
/usr/lib/pymodules/python2.6/pastielib/protector.py:274: GtkWarning: Failed to load type module: (null)
menu = gtk.Menu()
`menu_proxy_module_load': /usr/bin/python: undefined symbol: menu_proxy_module_load
Segmentation fault (core dumped)
Tested in Ubuntu 10.10 Maverick Meerkat. I see some menu_proxy modules there so it might be an Ubuntu 10.10 specific issue.
The preferences dialog needs a redesign.
There must exist an option to change the shortcuts for the preferences dialog and the selection dialog.
Inside history.py "more" string should use gettext plural form
something like : gettext.ngettext("1 more", "%d more" % n, n)
in KeepassX there is a feature which I can copy a password to the clipboard, then I can paste in some form, after some seconds KeepassX deletes it from the clipboard, so I can't paste that anymore. But with pastie it doesn't works, I tried with klipper and it works.
Hi,
nice little programm, keep on the good work! I've got a little problem here (Lucid 64bit, installed via ppa). Pastie only saves one item, don't know why :(
By the way in the source I've found a gconf-sheme, which look like some configuration can be done for pastie there, but I have no pastie related keys in my g-conf. If you need help with german translation I could help you :)
It would be nice to have a shortcut (like ctrl+alt+h) for accessing the copy history.
Hi,
First of all thanks for a great little tool! I love it!
A small feature request I have:
When I type the hotkey for the Selection Dialog I get a rather small window that shows the currently choosen selection. I would like this window to be bigger.
Maybe even make the size configurable?
Another idea would be to show a similar list when typing the hotkey, that is shown when clicking the pastie-icon, so I can see more than one clipboard-entry and navigate more easily.
Storing clipboard data as plaintext to disk is a security vulnerability. Avoid this by choosing a secure means of encrypting it before storing it.
The question says it all. It would be awesome, if for example by left-clicking on a link it got normally selected like it does now, and that by right-clicking, or alt+left-clicking you'd get a shortened url that you could paste on micro-blogging services.
After using Pastie 0.5 pre for a whole day, it uses ~300 mb of RAM. Screenshot: http://imgur.com/7O3Nm.png
I don know, whether this is possible, but I saw this feature in a clipboard manager on Windows before.
I would like to type and hold a hotkey (e.g. Ctrl-Alt-V). This shows a preview of the clipboard entires saved. Releasing the hotkey would directly paste the entry that is shown (would be the last entry).
If, however, I keep holding Ctrl-Alt and hit v again, the previous entry is choosen. Hit v again and the previous entry is shown, and so on. Until I let go Ctrl and Alt, which automatically inserts the then currently shown entry.
Why I have to do a keyboard shortcut to obtain "Options" menu?
It will be more user friendly to add an "Options" in Pastie menu, for example under "Clean History".
LGDN
pastie 0.5.2-1ubuntu1
Clicking clean history doesn't clean the history completely, as the last entry remains. This also applies when deleting the entry whilst editing the clipboard. Both of these are counter intutitive.
it would be great for themes (read: ubuntu mono dark/light) to create custom icons for pastie.
maybe, for a first iteration, pastie could just use its own icon as a copie from gtk-paste and renamed for pastie. for mono themes, some nice mono icons for parcellite already exist on gnome-look and can be used as well.
Hello,
after testing your app I find it doesn't use the middle click copy from X, could you add this feature please. In parcellite you could enable/disablead this functionnality in the configuration.
Regards.
LGDN.
On Windows my favored clipboard manager is Ditto. I suggest to have a look at it and perhaps adopt some things:
These are the most favored options I like on Ditto.
Hello,
what do you think about add an "about" entry menu to obtain pastie version and links to the pastie web site (and github? for bugs?).
This menu entry could be hide in the preferences (like "Quit").
LGDN.
The new option in Pastie which can be triggered using the Ctrl + Shift + C keyboard shortcut doesn't do anything most of the time (it seldom works).
Also, Chromium already has a function assigned to Ctrl + Shift + C - and even if that wasn't the case, it would be nice if Pastie had an option to change the keyboard shortcut for this.
Tested using Ubuntu 10.04 Lucid Lynx.
Sometimes when I copy text with newlines suddenly HDD activity goes crazy.
I'm sure it's pasties' issue because when I close it (pastie is normally responding) HDD calms down.
Hello,
I've just upgraded to Ubuntu 10.10 Maverick Meerkat and noticed there's no package for it in the Pastie PPA. Could you please upload a Maverick version too?
Thanks!
Ho to reproduce:
the program doesn't start on my amd64 ubuntu lucid. here's the error message:
[code]
Traceback (most recent call last):
File "/usr/bin/pastie", line 53, in
clipboard_protector = protector.ClipboardProtector()
File "/usr/lib/pymodules/python2.6/pastielib/protector.py", line 63, in init
self.history.set_payload(self.recover_history())
File "/usr/lib/pymodules/python2.6/pastielib/protector.py", line 141, in recover_history
data = base64.b64decode(item.text)
File "/usr/lib/python2.6/base64.py", line 76, in b64decode
raise TypeError(msg)
TypeError: Incorrect padding[/code]
Meanwhile I am used to take the Windows-Modifier key for many shortcuts as they collide less with existing shortcuts. I suggest to take the same keyword as System|Preferences|Keyboard shortcuts does: <Mod4>.
Are you interested by a french translation of Pastie? I could do it if I have the po file.
LGDN.
What do you think about to host DEBs on launchpad?
After upgrading to Pastie 0.6.5, it doesn't start anymore. So far I've tested it on Ubuntu 10.04.
Pastie version: 0.6.5-1ubuntu1~ppa
Terminal output:
andrei@andrei-desktop:~$ pastie
Traceback (most recent call last):
File "/usr/bin/pastie", line 55, in
clipboard_protector = protector.ClipboardProtector()
File "/usr/lib/pymodules/python2.6/pastielib/protector.py", line 84, in init
self.prev_sel_dialog_key = prefs.get_sel_dialog_key()
File "/usr/lib/pymodules/python2.6/pastielib/preferences.py", line 65, in get_sel_dialog_key
return get_pref('sel_dialog_key')
File "/usr/lib/pymodules/python2.6/pastielib/preferences.py", line 18, in get_pref
if value.type.value_nick == 'int':
AttributeError: 'NoneType' object has no attribute 'type'
Would be nice to have an About-Dialog which for example points to GitHub. Could be an extra dialog or just an additional tab in the preferences dialog.
Actually there is no documentation about supported modifier keys. From the defaults you could guess that <Control>, <Shift> and <Alt> are supported. A wiki entry might be enough as first approach.
If I copy something to the clipboard, and then close the session, next time I open the session it isn't recovered (pastie didn't save it on exit).
In the latest Pastie (0.6.7.1), I cannot change the selection / preferences dialog hotkey. I was able to do this in an older version (as an example, my selection dialog hotkey is: Ctrl + Shift + Z).
This occurs in both Ubuntu 10.04 and 10.10 (32bit).
Hi.
Thank you for your great software. I really appreciate it.
I am using Lucid(64bit), and when I downloaded 0.3.0 of pastie, it works fine.
However, I have heard that you set up a PPA, I added it, also update the system.
After all, pastie does not run...
Here is the result..
$ pastie
Traceback (most recent call last):
File "/usr/bin/pastie", line 57, in
clipboard_protector = protector.ClipboardProtector(indicator)
File "/usr/lib/python2.6/dist-packages/pastie/protector.py", line 44, in init
self.history.set_payload(self.recover_history())
File "/usr/lib/python2.6/dist-packages/pastie/protector.py", line 56, in recover_history
history_tree = tree.parse(os.path.expanduser(input_file))
File "/usr/lib/python2.6/xml/etree/ElementTree.py", line 862, in parse
tree.parse(source, parser)
File "/usr/lib/python2.6/xml/etree/ElementTree.py", line 587, in parse
self._root = parser.close()
File "/usr/lib/python2.6/xml/etree/ElementTree.py", line 1254, in close
self._parser.Parse("", 1) # end of data
xml.parsers.expat.ExpatError: no element found: line 1, column 0
Can you help me to get my(your? ^^) pastie back?
Thanks in advance!
"/media/file/".split("/") -> ["", "media","file",""]
pastie/pastielib/history.py 127-128:
for d in range(last):
path_list[d] = path_list[d][0]
Replace
for d in range(last):
try:
path_list[d] = path_list[d][0]
except IndexError:
pass
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.