I had put something together a fair while back that might be worth taking a look at. I was using it to embed _canonical_uri tiddlers to PDFs so I pulled out the mime-type selector for flexibility and made a "$:/language/Docs/Types/application/pdf" along the same lines as the others to add that option to the list (I am not sure why it is not a default option). I've always wanted to make things a little more automated by reading the extension but never bothed since 99% of this things I was embedding were PDFs. It has the bonus feature of tagging the created tiddler with the title of whatever tiddler contains the macro.
https://sextant.space/#DropCanonicalURI Enjoy, /Mike On Thursday, April 6, 2023 at 11:15:14 PM UTC-4 Charlie Veniot wrote: > Me being a huge fan of minimalism (like Tiny Core Linux), I'm a big fan of > a small (lean and mean) core if it can be paired with an excellent > repository and easy package (plugin) management. > > Looking at what I did with this handy little gadget, there isn't much to > it, so it would be pretty cool to see that in the core. > > I might try and pretty that up and turn into a sidebar tab tiddler that > can also function well as a transcluded thingy. > > > > On Thursday, April 6, 2023 at 11:53:58 PM UTC-3 Simon Baird wrote: > >> I wonder if this could become something that makes its way into the core >> TiddlyWiki. >> >> Imagine if there was a configuration option under Settings in >> $:/ControlPanel called "Image import behavior" and the options were "Embed >> image in TiddlyWiki" and "Externally link image with canonical url field". >> >> If the default behavior was "Embed.." then it wouldn't break anything for >> those accustomed to the embedding. >> >> On Wed, 5 Apr 2023 at 18:32, Simon Baird <simon...@gmail.com> wrote: >> >>> That's really cool - thanks for sharing! >>> >>> On Sun, 2 Apr 2023 at 19:36, Charlie Veniot <cj.v...@gmail.com> wrote: >>> >> Related TW script *in this post*, just below the video. >>>> >>>> https://youtu.be/NjE0MHsndE8 >>>> >>>> ``` >>>> \define droppable-image-actions() >>>> <$action-setfield $tiddler=<<actionTiddler>> $field="text" $value=""/> >>>> <$action-setfield $tiddler=<<actionTiddler>> $field="_canonical_uri" >>>> $value={{{ [<actionTiddler>split[/]last[]addprefix[./Graphics%20Samples/]] >>>> }}}/> >>>> <$action-setfield $tiddler=<<actionTiddler>> $field="type" $value={{{ >>>> [<actionTiddler>split[/]last[]split[.]last[]addprefix[image/]] }}}/> >>>> <$action-createtiddler $basetitle={{{ [<actionTiddler>split[/]last[]] >>>> }}} $template=<<actionTiddler>>/> >>>> <$action-deletetiddler $tiddler=<<actionTiddler>>/> >>>> \end >>>> >>>> <$droppable actions=<<droppable-image-actions>>> >>>> <div style="border:5px double blue;text-align:center;"> >>>> <p>Drop image here</p> >>>> </div> >>>> </$droppable> >>>> ``` >>>> >>>> -- >>>> 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 view this discussion on the web visit >>>> https://groups.google.com/d/msgid/tiddlywiki/aab7273a-7f53-4ce8-adc4-fdfdb03058b7n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/tiddlywiki/aab7273a-7f53-4ce8-adc4-fdfdb03058b7n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> >>> >>> -- >>> simon...@gmail.com >>> >> >> >> -- >> simon...@gmail.com >> > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ff4f59ae-b2d1-413b-9839-a98e264f1463n%40googlegroups.com.