It is fairly common in large software projects to want to link to third party bugtrackers, wikis, and other tools. As an example, my "Infrastructure" project may have a Task filed against it that depends on an upstream Task in Phabricator which I want to mention in the summary or a comment. A large number of the external systems that you might want to link to will have URL formats that are reasonably constant apart from some short identifier for the item linked.Goals:
- a concise way to quickly enter a link to an item in a frequently used external system without resorting to copy/paste
- enforcing consistent use of permalinks to refer to items in an external system
Currently I have to enter the full URL and to prettify it for my readersIt is fairly common in large software projects to want to link to third party bugtrackers, wikis, and other tools. As an example, my "Infrastructure" project may have a Task filed against it that depends on an upstream Task in Phabricator which I want to mention in the summary or a comment. Where such an external system exists in a project, often the need for links is frequent. Many/most of the external systems that you might want to link to will have permalink URL formats that are reasonably constant apart from some short identifier for the item linked. There are a large variation in the systems that might be linked to, and it is unlikely that Phabricator will in future have
Currently I have to enter the full URL, and to prettify it for my readers enter some link text. In some cases, in addition to a lot more typing and cut and paste back and forth between browser tabs, the browser URL bar after a search on the external system may not be a URL for a permalink, but a temporary query string, but for naive users, this is the URL they are most likely to copy and paste. A more concise method of entering a link to a known external system would help to ensure that all links to the external system are permalinks, enter some linkin addition to making it easier for users to enter the link into remarkup text.
It would be nice if Remarkup could be configured with a list of external systems and URL patterns to automatically generate these links from a shorter link syntax that is easier for the user to enter. I'm thinking something like https://github.com/make-all/AutoLink, except to avoid conflict with existing and future Remarkup, you probably want to use a more defined syntax rather than allowing a regexp to be used for the match.
Example:
Remarkup config
{
"external_uris": [
"P" : "https://secure.phabricator.com/{id}",
"Wiki" : "https://en.wikipedia.com/wiki/{id}"
]
}
Usage in Remarkup (markup is just an example I think won't conflict with anything already existing, but I haven't put much thought into it)
[(P:T11980)] implements [(Wiki:Links)]
Display in Remarkup:
[[https://secure.pahphabricator.com/T11980|P:T11980]] implements [[https://en.wikipedia.com/wiki/Links|Wiki:Links]]