Modify

Opened 8 years ago

Closed 4 years ago

#5773 closed enhancement (fixed)

[PATCH] TracLink for the PasteBin component

Reported by: lars+trac-hacks.org@… Owned by: Ryan J Ollos
Priority: low Component: TracPastePlugin
Severity: normal Keywords:
Cc: Justin Rovang, David Fraser, Jan Beilicke, lkraav, Olemis Lang 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 (1)

pastebin-wikilinks.patch (2.3 KB) - added by Pontus Enmark 7 years ago.
Patch for adding wikilinks support to TracPastebinPlugin

Download all attachments as: .zip

Change History (17)

comment:1 Changed 8 years ago by lars+trac-hacks.org@…

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

comment:2 Changed 8 years ago by Ryan J Ollos

Summary: Integration with TracLink would be nice.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?

comment:3 Changed 7 years ago by jsalaz@…

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?

comment:4 Changed 7 years ago by rovangju

Cc: Justin Rovang added; anonymous removed

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.

comment:5 Changed 7 years ago 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.

Changed 7 years ago by Pontus Enmark

Attachment: pastebin-wikilinks.patch added

Patch for adding wikilinks support to TracPastebinPlugin

comment:6 Changed 7 years ago by Pontus Enmark

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

comment:7 Changed 7 years ago by David Fraser

Cc: David Fraser added

comment:8 Changed 7 years ago by David Fraser

Summary: TracLink for the PasteBin component[PATCH] TracLink for the PasteBin component

Tested and this works nicely with penmark's patch.

comment:9 Changed 7 years ago by Ryan J Ollos

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.

comment:10 Changed 6 years ago by Jan Beilicke

Cc: Jan Beilicke added

comment:11 Changed 5 years ago by Ryan J Ollos

Cc: lkraav added

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.

comment:12 in reply to:  5 Changed 5 years ago by Ryan J Ollos

Owner: changed from Michael Renzmann to Ryan J Ollos
Status: newassigned

Replying to anonymous:

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

=> #10121

comment:13 Changed 5 years ago by Ryan J Ollos

(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.

comment:14 Changed 4 years ago by Olemis Lang

Cc: Olemis Lang added

Should this ticket be closed ?

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

comment:15 Changed 4 years ago by Ryan J Ollos

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

comment:16 in reply to:  14 Changed 4 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Replying to olemis:

Should this ticket be closed ?

Yes, it should. Thanks olemis.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.