#Title Drag import JSON
1 messages ยท Page 1 of 1 (latest)
You were exactly the person I was hoping would see this... feels up your alley for some reason
I've done drag upload stuff before
There's Drag Upload module but that's more for stuff to the canvas
Nice, I can't emote in this channel to show my excitement, but it's palpable
I know I can do it, just need to see if I can do it without leaving a residual json file somewhere
nods
I was considering asking in #macro-polo if it would best be a world script, but also kinda wanted awareness of the old import button suggestions in the core git โ those really feel like they should be core by now
world scripts are just modules that are hard to distribute
exactly... would much prefer a module โ thanks for showing some interest anyway ๐
thank you, I bore easily so I monitor this channel for module ideas
good to know...
@worldly quail give this a whirl
Whoa! Gimme a sec to load up
I think I probably want to do some document type checking because it throws document create errors if you give it the wrong type of document. Won't hurt anything as it is though, probably.
That is freaking sensational dude
even does rolltables ๐
@spark root @molten eagle you probably want to wait for the official module but just so you're aware of this little gamechanger
@bitter hornet too... these are the champions that are forever importing JSONs for testing
is this akin to the createitem black magic that tim did with midi?
emphasis on little, 13 lines
where you can drag an item to a macro or something
you can drag a JSON from your desktop downloads folder or wherever right into the sidebar
no more Create Actor/Item/Table > Give it a name > Find it in sidebar > Right click > Locate File > Import
Awwww, i got excited that it was the "make an item in a macro" drag and drop that I had asked about
care to explain that a bit better so I can see if it is something I could do?
Hey this works with macros too... bless you @sudden grove
I am implementing an export/import kind of code for JSON too in a module I am working on ๐
just takes whatever directory is dropped into and tries to make a document in that collection out of the json
amazing
@molten eagle you're up to something special over there, can't wait for the release
package submitted, should be official soon
n1!
would have been sooner, but I was making dinner when I saw it
lmao... coded it with one hand while chopping onions
Will see! I am hopeful ๐
Now, lets see about that print function...
๐
Oh this is neat
Printing the whole macro that is gonna be called so everyone can pretty much see how to do stuff ๐
๐
๐
its an input for keywords to make something happen...
@sudden grove probably didn't see this? #dnd5e message
so you're finding a way for us mortals to use the right keywords?
looks similar to what I have been doing to cut down on my freeform sheets' updates
parsing text and checking values against the document model
still don't understand the printing thing
If the user wants, the final macro call will be printed in the console or someplace, so one can easily check how-to do it.
Want to update a token height? Do this. Sight? That... etc
that sounds great to me, helping us learn at the same time
#package-releases message @worldly quail It's out
Happy days!
@south oracle 13 lines you can add to Zhell-QOL?
Hooks.on('renderSidebarDirectory', (app, html)=>{
html.find('.directory-list').on('drop', async function(event){
event.originalEvent.preventDefault();
const files = event.originalEvent.dataTransfer.files;
if (!files[0]) return true;
const reader = new FileReader();
reader.addEventListener("load", () => {
let text = reader.result;
game[app.tabName].documentClass.create(JSON.parse(text));
}, false);
reader.readAsText(files[0]);
});
});
@sudden grove can't seem to install from the setup or the manifest link.... looks like you've linked directly to the .zip
(plugged in the manifest manually and it works tho)
So I did, just fixed it
๐
Thanks for letting me know
np, wanted to install it all official-like
huh.
Oh sure, but I'm rewriting it to use no jQuery /s
Idk what that means but I appreciate your tone
@worldly quail version 1.0.1 will now handle multiple file drops. Not sure why I didn't do that to start
Magnificent!
I have another idea banked for a handy QOL module if you're interested โ I think it has been attempted before but there's nothing current and it would be better now. A module that registers all the major control tools and sidebar tabs as potential keybinds so users can go into Configure Controls and do as they please
There are other modules that get partway there. Monk's Little Details does some... what I like about that module is that you can set them so they're only activated while you're holding
I actually feel like this should be core (there must be an issue somewhere on it)
I have thought of dynamically generated keybinds before. Not sure how it would work. It is sort of out of my wheelhouse. I am trying to figure out a simple way to recreate the GM Screen module at the moment, even though I have never used it.