Adding a field and value to incoming imports is pretty easy (if you want to hack the core). Hacking the core has downsides, especially in terms of upgrades and maintenance.
Look for NavigatorWidget.prototype.handleImportTiddlersEvent in $:/core/modules/widgets/navigator.js . In between these lines: incomingTiddlers.push(title); importData.tiddlers[title] = tiddlerFields; You can put something like: tiddlerFields.myimport = "imported" ; (Be sure to make a backup if you try this on anything valuable). I think you can get a local variable by using this.getVariable(variablename), allowing you to wrap a browse widget with the name of the value you want to be inserted. But I didn't test this. Have fun. On Friday, June 12, 2020 at 11:15:44 AM UTC-7, Michael Wiktowy wrote: > > Thanks for the pointer ... I wasn't aware of how to identify the tiddlers > being imported ... listing the field:plugin-type[import] and acting on them > with a tm-tag-add message might be a feasible thread to pull on to do what > I want in at least a semi-automatic way. > > Will have to do a deep dive into $:/core/ui/ViewTemplate/import and > $:/core/ui/ImportListing to see if I can decipher it all. Hooking into the > import functionality of the $browse button macro contained in a particular > tiddler is my priority. Getting drag and drop working on a tiddler is > secondary. > > Thanks again, > /Mike > > On Thursday, June 11, 2020 at 9:11:52 PM UTC-3, TW Tones wrote: >> >> Mike, >> >> That functionality it something I have wanted my self, tagging or other >> actions on internal tiddlers, so thanks. >> >> >> - I notice when importing external items that the standard import >> process takes over. >> - Perhaps there is a way to toggle this behaviour off/on so yours >> gets honoured? >> - I am working on improving this standard import with addons >> - >> >> A view template that appears on field:plugin-type[import] can be used to >> work with the standard import, which contains a json of the import tiddlers >> >> >> Regards >> Tony >> >> On Thursday, June 11, 2020 at 2:04:42 PM UTC+10, Michael Wiktowy wrote: >>> >>> Hi Tony, >>> >>> The ImportHere tiddler here: http://mwiktowy.tiddlyspot.com/#ImportHere >>> gives an idea of what I would like to do but I am not sure of the sequence >>> of actions that I would need to put in the droppable-import-actions macro >>> or in the messages parameter of the $browse button. >>> >>> The only thing that it works for is internal resources dragged over from >>> within the wiki (from the Open or Recent tab or a Title list in a tag >>> pill). The idea is to put one of these mechanisms into tiddlers (that might >>> be buried in tabs) that would allow me to attach notes and resources to it >>> while I import them. A $dropzone nested in a $droppable widget does not do >>> it ... although I am not sure that the tiddler-specific $dropzone is even >>> working due to the global $dropzone covering the entire wiki. >>> >>> Any pointer in the right direction would be appreciated. >>> >>> Thanks, >>> /Mike >>> >>> On Wednesday, June 10, 2020 at 9:03:52 PM UTC-3, TW Tones wrote: >>>> >>>> Michael, >>>> >>>> I have being playing with the import mechanism of late and may be able >>>> to help. Can you share your dropzone tagging so I can test some ideas for >>>> you, but the way I would like to develop custom drop zones myself. >>>> >>>> Regards >>>> Tony >>>> >>>> On Thursday, June 11, 2020 at 5:08:37 AM UTC+10, Michael Wiktowy wrote: >>>>> >>>>> Greetings, >>>>> I am looking for some guidance. I have figured out how to apply tags >>>>> to tiddlers already imported by dragging and dropping them into a >>>>> <$droppable> zone. I am not sure how to tie into the Import system to >>>>> apply >>>>> these tags while a file is being imported and made into a tiddler. >>>>> >>>>> I am interested in adding a tm-add-tag message into the flow in both a >>>>> drag-and-drop import into a specific <$droppable> zone as well as an >>>>> import >>>>> initiated by the <$browse> widget. >>>>> >>>>> Can someone point me to an example as I don't know how to get the >>>>> tiddler titles from a resulting import or trigger an action while they >>>>> are >>>>> being processed? >>>>> >>>>> /Mike >>>>> >>>> -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/23280ae6-8d22-42d5-bf8a-393d50afbe03o%40googlegroups.com.

