Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Suggestions ➜ make import a bit smarter

make import a bit smarter

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Sun 11 Dec 2011 06:22 PM (UTC)

Amended on Sun 11 Dec 2011 07:01 PM (UTC) by Fiendish

Message
If you import from a world file that has unlabeled aliases and triggers that are the same as ones in the active world, they get duplicated in the active world, even if the pattern and script are identical. Import is also very noisy about not loading plugins. Actually, it's very noisy about NOT loading plugins, because it seems that the file load button will never like the plugin section of a world file.

I propose that import should ignore aliases and triggers and whatever else if the current active world already has identical entries, because most people never label them.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,046 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 11 Dec 2011 09:31 PM (UTC)
Message
Quote:

I propose that import should ignore aliases and triggers and whatever else if the current active world already has identical entries, because most people never label them.


I don't see any major objection to this. In fact, since the importing and loading (ie. loading a world file) share the same code, I have changed version 4.81 to never load (exact) duplicates of un-labelled triggers, aliases or timers.

I can't see any real use in having two completely identical triggers (aliases or timers) so now they just won't load.

This would also have the side-effect of cleaning up existing files with duplicates.

Oh, wait. That would make it impossible to copy and paste a trigger with a view to changing it. This may require a bit more thought...

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #2 on Sun 11 Dec 2011 10:12 PM (UTC)
Message
Nick Gammon said:
I can't see any real use in having...

Oh, wait. That would make it impossible to copy and paste a trigger with a view to changing it.
Yeah. I can see use in having, just not in importing.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #3 on Sun 11 Dec 2011 11:54 PM (UTC)
Message
Nick Gammon said:
Oh, wait. That would make it impossible to copy and paste a trigger with a view to changing it. This may require a bit more thought...

A "Duplicate" button would solve that issue nicely, I think. Sidestep the export/import steps and just duplicate the selected entries.

I don't remember the last time the resources DLL was updated though....

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Nick Gammon   Australia  (23,046 posts)  Bio   Forum Administrator
Date Reply #4 on Mon 12 Dec 2011 03:41 AM (UTC)
Message
@Fiendish: Can you clarify when exactly you want to be able to remove duplicates? ...


  • When pasting in the GUI (Paste button)

  • When opening a world file

  • When loading a plugin

  • When doing a File -> Import

  • When using ImportXML directly, or via a plugin

  • When doing AddTrigger, AddAlias, AddTimer etc.


I can imagine it will be easy enough to pass a flag around to make the duplicate removal only happen on some of those occasions.

Or maybe, without changing the GUI (DLL) it could be that Shift-click-on-Paste-button would cancel the duplicate check (that might be a bit obscure though).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #5 on Mon 12 Dec 2011 03:58 AM (UTC)

Amended on Mon 12 Dec 2011 04:09 AM (UTC) by Fiendish

Message
Duplicates are already not added (albeit rather noisily) on a label collision. There's just no similar block currently when there are no labels. I think "removing duplicates" is not quite the way to consider it. I prefer "not add duplicates". But no matter, I suppose the distinction is arbitrary.

As far as I can reason, the only time I think one might legitimately desire a duplicate trigger or alias is with the intent to change it right away as you suggested earlier. And I think the only mechanism that makes sense for that is the Paste GUI button.

So perhaps block duplicates for everything except Paste.

Also, if File->Import is never going to load plugins anyway (Plugin not expected here. Use File -> Plugins to load plugins), maybe it shouldn't read that section of the world file?

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,046 posts)  Bio   Forum Administrator
Date Reply #6 on Mon 12 Dec 2011 05:01 AM (UTC)
Message
Altered change to allow the Paste button to make duplicates.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,046 posts)  Bio   Forum Administrator
Date Reply #7 on Mon 12 Dec 2011 05:03 AM (UTC)
Message
Fiendish said:

Import is also very noisy about not loading plugins. Actually, it's very noisy about NOT loading plugins, because it seems that the file load button will never like the plugin section of a world file.


What are you saying here? You want to be able to load a plugin into the world file, discarding the plugin part? Is this to get a GUI interface to edit the triggers etc.?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #8 on Mon 12 Dec 2011 01:37 PM (UTC)
Message
I'm saying that if you use File->Import and then choose a world file that happens to have plugin lines in it, you get inundated with many instances of

Quote:
Plugin not expected here. Use File -> Plugins to load plugins

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,046 posts)  Bio   Forum Administrator
Date Reply #9 on Mon 12 Dec 2011 07:37 PM (UTC)
Message
Hmm, not totally sure when you would want to use that, but I have relaxed the rules so that when doing a File -> Import, or hit the Paste button for triggers etc., it skips loading plugins and other include files. You will now just get a warning, not an error, about include tags being skipped.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #10 on Mon 12 Dec 2011 09:04 PM (UTC)
Message
Nick Gammon said:
Hmm, not totally sure when you would want to use that
Just about every established world file has plugins loaded. I'm not sure when it would *not* be the case.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,046 posts)  Bio   Forum Administrator
Date Reply #11 on Mon 12 Dec 2011 09:45 PM (UTC)
Message
Maybe I didn't phrase my question right.

Why are you wanting to load (import) a world file into a world file?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #12 on Mon 12 Dec 2011 10:51 PM (UTC)
Message
To get useful things from another world file, of course.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,046 posts)  Bio   Forum Administrator
Date Reply #13 on Mon 12 Dec 2011 10:52 PM (UTC)
Message
Just checking we are on the same page here.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #14 on Thu 05 Jan 2012 06:47 AM (UTC)
Message
spam intentional?

Quote:
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 729: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 730: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 731: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 732: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 733: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 734: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 735: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 736: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 737: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 738: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 739: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 740: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 741: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 742: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 743: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 744: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 745: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 746: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 747: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 748: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 749: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 750: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 751: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 752: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 753: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 754: Tag not used: <include> (muclient)
[WARNING] Z:\home\avi\Documents\aardwolfclientpackage\MUSHclient\worlds\Aardwolf (copy).mcl
Line 755: Tag not used: <include> (muclient)

https://github.com/fiendish/aardwolfclientpackage
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


48,365 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]