wiki:ScreenshotPastePlugin

Version 14 (modified by Roberto Longobardi, 12 years ago) (diff)

--

Screenshot Paste plugin for Trac

Description

A Trac plugin to allow attaching screenshots or other images to tickets, Wiki pages, etc. directly from the clipboard, without needing to save them locally first and then uploading them.

This plugin uses the Supa applet, the Screenshot UPload Applet, which is Copyright 2010 Christoph Linder and is developed under the LGPL 2.1.



How-to


Once the plugin is installed, you can easily attach a screenshot or any image you have in the clipboard to a ticket or Wiki page.



Attach a screenshot or an image to a Trac Ticket


First, grab a screenshot or copy an image, for example, from the browser or an email.

Then, from a ticket, add an attachment as usual.



Screenshot showing Ticket attachment step 1
Adding an attachment while creating a Ticket

The first time, you will get a Java security warning. Click Run to run the applet.



Screenshot showing Java security question
Java security question for the applet

You will notice the extra section above the usual file attachment one.

Click Paste the Captured Screenshot to provide the screenshot to the plugin applet and to see a preview.



Screenshot showing the screenshot paste attachment section
Paste the image you have in memory. Get a preview

Then click Send the Screenshot to actually send it to Trac and save it as an attachment.



Screenshot showing the screenshot attachment paste section in wiki page
Click Upload to send the image to Trac

See the image file name generated and attached to the ticket.



Screenshot showing the file once attached
The image attached as a file, with unique name generated



Attach a screenshot or an image to a Trac Wiki page


The steps are very similar to the ones used for attaching to a Ticket.

First, grab a screenshot or copy an image, for example, from the browser or an email.

Then, from a wiki page, add an attachment as usual.



Screenshot showing the screenshot paste sending
Adding an attachment to a Wiki page

Then follow the steps described above for Ticket attachments.

When done, you will see the image file name generated and attached to the Wiki page.



Screenshot showing the screenshot attachment paste section in wiki page
The image attached as a file, with unique name generated



Bugs/Feature Requests


If you have any issues, create a new ticket.

Existing bugs and feature requests for ScreenshotPastePlugin are here.

Ticket Summary Status Severity Priority Type Owner Created Description
#9683 Images are empty on Windows (linux works fine) closed normal normal defect Roberto Longobardi 12 years ago

I can paste images and see them in the little preview window. To send the screenshot is also no problem, but if i want to open it again, i see always an empty picture like the attached screenshot. I do not see any errors in my Trac logfile.

#9873 jQuery conflict closed normal normal defect Roberto Longobardi 12 years ago

I'm seeing a jQuery conflict when trying to access the plugin in Firefox 11-beta from Windows 7. I have Trac 0.12.3 running through Apache on CentOS 5. I noticed the plugin is adding jquery-1.5.1.min.js, but Trac includes jQuery so I think plugins are not supposed to include it in a page as well, which might be the source of the problem. I guess this might be okay though because you are using the noconflict calls.

#9913 File de.christophlinder.supa.SupaApplet not found closed normal high defect Roberto Longobardi 12 years ago

Powered by Trac 0.12.3 $ python --version Python 2.7.1+

I see the following warning message in the trac log file:

2012-03-20 14:14:54,535 Trac[main] DEBUG: Dispatching <Request "GET '/chrome/screenshotpaste/de.christophlinder.supa.SupaApplet'">
2012-03-20 14:14:54,545 Trac[chrome] WARNING: File de.christophlinder.supa.SupaApplet not found in any of ['/var/lib/trac/.egg-cache/ScreenshotPaste-0.1.1-py2.7.egg-tmp/screenshotpaste/htdocs']

I first downloaded and installed a pre-built egg. When that did not work I built from the sources.

In the application I see this:

'Unable to run the applet :('

#10000 Allow to edit the screenshot before attaching new normal normal enhancement Roberto Longobardi 12 years ago

The idea behind this plugin is cool. At the moment it is still needed to open an external tool to modify the screenshot before attaching it. I don't expect to have a image processing tool here.

What i'm missing is a possibility to cut out an area and place some rectangles to mark some thing on the picture.

#10352 User redirected to empty page after attaching screenshot (missing trailing slash in URL) closed normal normal defect Roberto Longobardi 12 years ago

Hi,

I have this plugin installed along with my trac and found this bug recently which can be quite annoying and confusing to the users.

This happens only when the user is creating a new ticket and attaching a screenshot using the plugin. The ticket gets created, the user is able to paste the screenshot, but when he hits "Send the screenshot" he is redirected to an empty page like the one attached.

The problem is a missing trailing slash "/" in the URL. The page is redirected to "/attachment/ticket/183" for example while it should have been redirected to "/attachment/ticket/183/". It would be great if someone would look into this.

Thanks.

#10427 ScreenShotPaste doesn't work with trac 1.0 closed blocker normal defect Roberto Longobardi 12 years ago

Following upgrade from trac 0.12 to trac 1.0, paste the clipboard function still works, but when you try to 'Send the Screenshot', it brings up a pop-up box with HTML for the whole page, with an error "Missing or invalid form token. Do you have cookies enabled" buried in the middle of it.

Have attached the main section of the HTML in case it's useful. Happy to help with any debug info - but not a python person so you need to be gentle...

#11430 Provide at least a self signed certificate new normal normal enhancement Roberto Longobardi 10 years ago

It would be nice if there where at least a self signed certificate.

#11431 Provide a possibility to set a the filename new normal normal defect Roberto Longobardi 10 years ago

When using Image we are often refere to them using the fileName of the attached image. Specifying the filename before attaching the image would allow much nicer names.

#12089 unicode error after screenshot plugin install in trac 1.0 new critical high defect Roberto Longobardi 9 years ago

Hi

I am getting below error after screenshotpaste plugin installation while trying to add images.

Trac detected an internal error: UnicodeError: source returned bytes, but no encoding specified

Found a bug in Trac?

If you think this should work and you can reproduce the problem, you should consider creating a bug report.

Note that the ScreenshotPaste plugin seems to be involved. Please report this issue to the plugin maintainer.

Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac or its plugins, please try the mailing list instead of creating a ticket.

Otherwise, please a new bug report describing the problem and explain how to reproduce it.

Python Traceback

Most recent call last:
File "/usr/lib/python2.6/site-packages/Trac-1.0-py2.6.egg/trac/web/main.py", line 497, in _dispatch_request
File "/usr/lib/python2.6/site-packages/Trac-1.0-py2.6.egg/trac/web/main.py", line 233, in dispatch
File "/usr/lib/python2.6/site-packages/Trac-1.0-py2.6.egg/trac/web/chrome.py", line 968, in render_template
File "/usr/lib/python2.6/site-packages/Genshi-0.7-py2.6-linux-x86_64.egg/genshi/core.py", line 133, in __or__
File "/usr/lib/python2.6/site-packages/Trac-1.0-py2.6.egg/trac/web/chrome.py", line 1147, in inner
File "build/bdist.linux-x86_64/egg/screenshotpaste/attachment.py", line 53, in filter_stream
File "build/bdist.linux-x86_64/egg/screenshotpaste/util.py", line 64, in write_common_code
File "/usr/lib/python2.6/site-packages/Genshi-0.7-py2.6-linux-x86_64.egg/genshi/input.py", line 442, in HTML
File "/usr/lib/python2.6/site-packages/Genshi-0.7-py2.6-linux-x86_64.egg/genshi/core.py", line 273, in _ensure
File "/usr/lib/python2.6/site-packages/Genshi-0.7-py2.6-linux-x86_64.egg/genshi/input.py", line 449, in _coalesce
File "/usr/lib/python2.6/site-packages/Genshi-0.7-py2.6-linux-x86_64.egg/genshi/input.py", line 337, in _generate

System Information:

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36
Trac	1.0
Genshi	0.7 (without speedups)
MySQL	server: "5.1.73", client: "5.1.73", thread-safe: 1
MySQLdb	1.2.3c1
Python	2.6.6 (r266:84292, Jan 22 2014, 09:42:36) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
setuptools	0.6
jQuery	1.7.2

Enabled Plugins:

ScreenshotPaste	0.1.2	/var/trac/cd/plugins/ScreenshotPaste-0.1.2-py2.6.egg
TracAccountManager	0.4.4	/var/trac/cd/plugins/TracAccountManager-0.4.4-py2.6.egg


Download


Download Egg files and the zipped source from the project on SourceForge.


Source


You can check out ScreenshotPastePlugin from the repository on SourceForge using Git.


Recent Changes


ChangeLog macro failed
No node screenshotpasteplugin at revision 18635


Author/Contributors


Author: seccanj
Maintainer: seccanj
Contributors:

Attachments (9)

Download all attachments as: .zip