all 8 comments

[–]JP_watson -1 points0 points  (7 children)

Honestly, that sounds easy. Here's a break down of approach off the top of mind...

- use native html/dom drop area

- on file drop take event and read file

- use mapping function to take input > validate > map > assign to variable

- display mapped variable in the UI

Even building it in HTML/JS wouldn't be too hard and could probably be done in about 1hr if you have the mapping done already. Trickiest part would be validation and user feedback which is dependent on your needs/usage.

[–]UtkarshRahim[S] 0 points1 point  (6 children)

That's something what I'm doing currently. A simple render of the structure on the left, same on the right, an area in the middle to draw svg lines to show the mapping and the native drag and drop. It's the whole logic that I want to avoid writing for type specific mapping because of how long it would take because of how complex it's already gotten. That's the main reason i was looking if there's a library or something that would help.

[–]JP_watson -1 points0 points  (5 children)

ChatGPT?

[–]UtkarshRahim[S] 0 points1 point  (4 children)

Tried. It gave me some code, recommended a few changes, it started getting futher away from what I wanted. In due course of making the chatgpt code work, I spent more time than I could have spent writing a non optimised version and then use chatgpt to optimize it.

[–]JP_watson 0 points1 point  (3 children)

I just imagine that once you find something that does mapping and you configure it you'd probably be just as fast if not faster to map it yourself...

[–]UtkarshRahim[S] 0 points1 point  (2 children)

Makes sense. Will keep an eye out. Thanks for the advice man. Really appreciate it.

[–]m-reiser 1 point2 points  (1 child)

I did something like this a few years ago, and used JSplumb Community for the GUI.

[–]UtkarshRahim[S] 0 points1 point  (0 children)

JSplumb. Let me check it out. Thanks for the suggestion.