Ticket #5773 (closed enhancement: fixed)

Opened 4 years ago

Last modified 1 week ago

[PATCH] TracLink for the PasteBin component

Reported by: lars+trac-hacks.org@gatekeeper.vernetzt.org Assigned to: rjollos
Priority: low Component: TracPastePlugin
Severity: normal Keywords:
Cc: thinice@gmail.com, davidf@sjsoft.com, jbeilicke, lkraav, olemis Trac Release: 0.11

Description

It would be great if one could easily link to pastes via TracLinks, e.g.

[paste:213 See this Paste]

Attachments

pastebin-wikilinks.patch (2.3 kB) - added by penmark on 06/08/10 18:00:37.
Patch for adding wikilinks support to TracPastebinPlugin?

Change History

09/03/09 22:38:47 changed by lars+trac-hacks.org@gatekeeper.vernetzt.org

Ieek. Wanted a preview and sent it... Pastebin is really useful sometimes. Thanks!

09/06/09 11:37:32 changed by rjollos

  • summary changed from Integration with TracLink would be nice. to TracLink for the PasteBin component.

A TracLink for the TracPastePlugin would definitely make it a more integrated and useful part of Trac. I'll have to look into it ... shouldn't be too hard right?

11/23/09 22:57:09 changed by jsalaz@meteostar.com

I don't see any other manner of voting for features, so pardon this comment if it's undue. I would absolutely love to see wiki-style links to the pastebin. It's better than forgetting that your external visitors can't access TRAC resources via an internal link.

Is there an easy way to achieve this in the meantime before the plugin is updated?

03/30/10 23:06:24 changed by rovangju

  • cc set to thinice@gmail.com.

I'd like to see this very much too - as well as a way to get the list of recent pastes and move it to another page to increase visibility - kinda like a TOC index.

(follow-up: ↓ 12 ) 05/05/10 07:22:09 changed by anonymous

Referencing pastes by some [paste:N] syntax would be great, as would some sort of [[RecentPastes(N)]] macro to display a list elsewhere.

06/08/10 18:00:37 changed by penmark

  • attachment pastebin-wikilinks.patch added.

Patch for adding wikilinks support to TracPastebinPlugin?

06/08/10 18:02:54 changed by penmark

Attached a patch which adds support for pastebin:123 wiki links

07/29/10 12:02:16 changed by davidfraser

  • cc changed from thinice@gmail.com to thinice@gmail.com, davidf@sjsoft.com.

07/29/10 13:57:29 changed by davidfraser

  • summary changed from TracLink for the PasteBin component to [PATCH] TracLink for the PasteBin component.

Tested and this works nicely with penmark's patch.

09/01/10 02:12:24 changed by rjollos

Adding TracLinks may cause issues if #4265 is not fixed, and if #5695 is implemented. In those cases we may end up with links pointing to the wrong pastes and dangling links.

01/11/11 11:30:04 changed by jbeilicke

  • cc changed from thinice@gmail.com, davidf@sjsoft.com to thinice@gmail.com, davidf@sjsoft.com, jbeilicke.

06/23/12 10:47:47 changed by rjollos

  • cc changed from thinice@gmail.com, davidf@sjsoft.com, jbeilicke to thinice@gmail.com, davidf@sjsoft.com, jbeilicke, lkraav.

The patch look good, but I think the content of get_wiki_syntax is redundant with the implementation of get_link_resolvers. Someone please correct me if I'm wrong about that.

get_link_resolvers allows a TracLink of the form realm:id to be implemented. get_wiki_syntax only needs to return a non-empty list if you wish to implement another syntax, as is done for ticket links in the Trac core with #N. So, for instance, if we wanted a syntax such as @N to point to pastes, we'd have to implement get_wiki_syntax, but I can't think of a use for adding wiki syntax in this plugin.

(in reply to: ↑ 5 ) 06/25/12 02:57:16 changed by rjollos

  • status changed from new to assigned.
  • owner changed from otaku42 to rjollos.

Replying to anonymous:

... as would some sort of [[RecentPastes(N)]] macro to display a list elsewhere.

=> #10121

06/25/12 03:00:19 changed by rjollos

(In [11689]) Refs #5773:

  • Added a paste TracLink. Thanks to penmark for the initial patch.
  • Added framework for unit tests, following osimons implementation for the TagsPlugin in [10670]. The copyrights for all copied files have been retained. All the unit tests are dummy tests, so far.
  • Added license info to each file, and a COPYING file containing the contents of the license.

(follow-up: ↓ 16 ) 04/25/13 19:16:21 changed by olemis

  • cc changed from thinice@gmail.com, davidf@sjsoft.com, jbeilicke, lkraav to thinice@gmail.com, davidf@sjsoft.com, jbeilicke, lkraav, olemis.

Should this ticket be closed ?

@rjollos : btw , maintainer info is not up to date in plugin's setup.py file .

05/15/13 13:05:33 changed by rjollos

(In [13143]) Refs #5773: Updated maintainer info.

(in reply to: ↑ 14 ) 05/15/13 13:06:41 changed by rjollos

  • status changed from assigned to closed.
  • resolution set to fixed.

Replying to olemis:

Should this ticket be closed ?

Yes, it should. Thanks olemis.


Add/Change #5773 ([PATCH] TracLink for the PasteBin component)




Change Properties
Action