\define url(url)
<$list filter="[field:title[$url$]]">
<$list filter="[removeprefix[https://github.com/Jermolene/TiddlyWiki5/issues/]]">
<a href="$url$" target="_blank">#{{!!title}}</a>
</$list>
</$list>
\end\define url(url)
<$do "$url$" "[removeprefix[https://github.com/Jermolene/TiddlyWiki5/issues/]]">
<a href="$url$" target="_blank">#{{!!title}}</a>
</$do>
\end\define url(url)
<$splitout righttoleft "/#" "$url$">
<a href="$url$" target="_blank">#result</a>
</$splitout>
\end/*\ title: $:/RS/macros/prettifypath.js type: application/javascript module-type: macro Resolves a relative path for an absolute rootpath.\*/(function(){/*jslint node: true, browser: true *//*global $tw: false */"use strict";exports.name = "prettifypath";exports.params = [{name: "path"},];/*Run the macro*/exports.run = function(path) {var arrayOfStrings = path.split("/");var returnValue = "[[#" + arrayOfStrings[arrayOfStrings.length-1] + "|" + path + "]]";return returnValue;};})();
creator: Richard Smith
source: https://dl.dropboxusercontent.com/u/83055414/prettifylinkexample.html#RS%2Fmacros%2Fprettifypath.js

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/484ca13e-3773-4243-940c-892cb7d5c3fd%40googlegroups.com.
- Shoud it perhaps be tagged $:/tags/Macro ?
- I note that adds "#". This is a really nice touch for the github issues but does not work so well for permalinks as they already have this character after the slash sign so it results in double ##. It is of course trivial to remove that bit from the code so I can do this myself. Something else I will try is to let the user specify delimiter is but perhaps use "/" as default. (I'll attempt to implement this too... "good luck, Mat")
- When I add it (to TWaddle), should/can I in the tiddler head add the text:
creator: Richard Smith
source: https://dl.dropboxusercontent.com/u/83055414/prettifylinkexample.html#RS%2Fmacros%2Fprettifypath.js
- ...and, if I manage to get something working with my tweaks for it, how would I fairly credit you? Include "original creator" and "original source" perhaps?
- Maybe its worth making it into a plugin (ref Andreas Tinka) ?
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0e232bb0-e08d-49d3-89ba-1a6266368321%40googlegroups.com.
I think you should only have one vertical bar in the pretty link? ie;
[[github issue: Allow saver to be specified for download|https://github.com/Jermolene/TiddlyWiki5/issues/1755]]
I supposed that Mat intended to use it something like this;
github issue: Allow saver to be specified for download (<<prettylink https://github.com/Jermolene/TiddlyWiki5/issues/1755>>)
Does GitHub have an api that will return the issue title? Or did you mean copy-paste?
Mario has a good point, pretty links seem the obvious way to link to GitHub issues as the URL has no meaning.Wikipedia on the other hand has meaningful URLs: if TiddlyWiki could automatically parse Wikipedia links and add a icon.
-m
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/28c26a23-38bb-482a-b2a4-b5f571a0a74b%40googlegroups.com.
Yes github has an api, but it would create a network request everytime the code is rendered, which may be every keystroke.
For me, it would be ok, to ping Wikipedia, if I open a tiddler.
Yes github has an api, but it would create a network request everytime the code is rendered, which may be every keystroke
Hi Mario - I found the github api and was just reading up on it. I thought it might be a good way for me to learn a bit more about how api calls work.
I see your point about calling the api repeatedly - what do you think the best practice would be in this regard? ie; is there a way to limit the number of times it gets called (once?) - for example only when the wiki is loaded and store the result?
Is there anywhere in the existing code that makes api calls?
Hi Mario - I found the github api and was just reading up on it. I thought it might be a good way for me to learn a bit more about how api calls work.I see your point about calling the api repeatedly - what do you think the best practice would be in this regard? ie; is there a way to limit the number of times it gets called (once?) - for example only when the wiki is loaded and store the result?

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/59d33f4f-b451-4388-b85e-4b7ca0052c84%40googlegroups.com.
If the external link plugin had the ability to add the icon, or it was in a <<.external "URL>> documentation marco -- I think it would be a good addtion
background: transparent url(data:image/gif;base64,R0lGODlhCAAIAIABAABmZv///yH5BAEKAAEALAAAAAAIAAgAAAIPjAMJd5q2HoQLsTpto84UADs=) no-repeat center;
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/31a741c0-f76f-4ff9-90a6-36a01bb8fb95%40googlegroups.com.