Announcing mklist2


Announcing mklist2
#1
Hi all,

Following recent discussion on changes to the parts library (specifically new leading characters for aliases and longer filenames) I've written a new version of mklist to ensure that backwards compatibility can be maintained, while also giving a little more power to the users.

Features not appearing in mklist are:
  • Ensure <=64 character titles using a shortening technique
  • Ignore parts with user supplied leading characters (eg. =, _)
  • Strip off leading characters (eg. ~)
  • Remove parts with duplicate names (experimental feature)

The code is also open source so it can easily be modified in future.

Find it here with a pre-compiled Windows executable. The code itself is exceedingly basic C++ so should compile on any OS using a gnu (or compatible) compiler with minimal changes.

Tim
Reply
Re: Announcing mklist2
#2
Dear Mr. Gould,

since you've put much effort and knowledge in the creation of this program - for which I'm eternally thankful - I would humbly suggest that you go all the way. May I suggest that:
  • You add a user-friendly GUI with checkboxes for the different options.
  • Add the possibility to sort out also Unofficials based on the 0 !LDRAW_ORG meta, which might be helpful for all those who simply dump everything into the Parts and P folder and do not work with Unofficial\Parts, Unofficial\Parts
  • Write a deep tech tutorial with just a little bit more information as one can find in the current help, explaining what the [C] stands for, why there are quotes in "mklist2 -d -h=_ -1~" and to what it leads to ripping the ~ character from the description.
  • Add a feature which will place all pattern versions at the end of say "Bricks" or "Plates" bases on the p character in the part number and also sorted by description or number in order to have:

    Brick 1x1
    Brick 1x2
    Brick 2x2
    Brick 1 x 1 with Angry Eye Left/Sad Eye Right Pattern
    Brick 1 x 2 with Classic Space Logo Pattern

  • May I further suggest a name change and in the spirit of the LDraw System of Tools call it LDList, or LDPartsListMaker, or ...

Yours sincerely,

w.
LEGO ergo sum
Reply
Re: Announcing mklist2
#3
Thanks Willy,
  • You add a user-friendly GUI with checkboxes for the different options.

    This is a bit difficult for me to do as I really don't have the tools to write a GUI. That said the code is out there so for someone who did it would be very straightforward to process.

  • Add the possibility to sort out also Unofficials based on the 0 !LDRAW_ORG meta, which might be helpful for all those who simply dump everything into the Parts and P folder and do not work with Unofficial\Parts, Unofficial\Parts

    Processing that line is on my todo list but will require a bigger change. It will happen though.

  • Write a deep tech tutorial with just a little bit more information as one can find in the current help, explaining what the [C] stands for, why there are quotes in "mklist2 -d -h=_ -1~" and to what it leads to ripping the ~ character from the description.

    I shall. Actually I think all these could be illustrated neatly with an example.

  • Add a feature which will place all pattern versions at the end of say "Bricks" or "Plates" bases on the p character in the part number and also sorted by description or number in order to have: Brick 1x1, Brick 1x2, Brick 2x2, Brick 1 x 1 with Angry Eye Left/Sad Eye Right Pattern, Brick 1 x 2 with Classic Space Logo Pattern

    Interesting thought. I'll have a think about how this might be implemented but I can't think of a trivial way to do so, or for that matter any way that's not highly complicated. Unless... they have more info in the header. (eg. Part_Patterened).

  • May I further suggest a name change and in the spirit of the LDraw System of Tools call it LDList, or LDPartsListMaker, or ...

    This is a good idea. I will rename it.
Reply
Re: Announcing mklist2
#4
[*] Add a feature which will place all pattern versions at the end of say "Bricks" or "Plates" bases on the p character in the part number and also sorted by description or number in order to have: Brick 1x1, Brick 1x2, Brick 2x2, Brick 1 x 1 with Angry Eye Left/Sad Eye Right Pattern, Brick 1 x 2 with Classic Space Logo Pattern

Interesting thought. I'll have a think about how this might be implemented but I can't think of a trivial way to do so, or for that matter any way that's not highly complicated. Unless... they have more info in the header. (eg. Part_Patterened).

I have an idea now.

Tim
Reply
Re: Announcing mklist2
#5
+1 for this feature
Reply
Re: Announcing mklist2
#6
Another interesting possibility (already present in an Arezey tool) is to give the possibility to add primitives to the list. Useful for parts authors...
Reply
Re: Announcing mklist2
#7
And one would need them also for LSYNTH bent parts generation...

To me, the files where LSYNTH generates bent parts from are primitives.

I find it not a good idea to put them into Parts just to see them im MLCad.
One can see them there as well when adding the "P" folder to mlcad.ini,
and creating a custom parts tree entry for LSYNTH.
I'd prefer to see these become primitives.
Reply
LDList Update 1
#8
Worked some more on it. 0.9.2

Changes
  • Renamed to LDList
  • Can now strip unofficial files (see comment later)
  • Can sort patterns to the end of parts.lst. Doing it as Willy asked is just too hard for now but the current version should ensure MLCad shows them last
  • Can include primitives in Parts.lst

Stripping unofficial files is presently crude. I plan to write a better way to get all the part header info. One further question though: should this happen by default and be switched off or vice versa?
Reply
Re: Update 1
#9
Quote:Renamed to LDList
I suggest you edit the title of this post to "LDlist update 1" and make things clear Wink
Quote:Can include primitives in Parts.lst
Thanks! unfortunately I can't run ldlist on this machine (XP), after a relatively long run it quits with a "ungetc failed" message. Parts.lst is not created. Anything I can do to find problem origin? (it's quite possible that I have a very queer file in my LDraw folder!)?
Quote:should this happen by default
I see no reason to strip unofficial files by default!
Another very minor quirk: compression in your zip file is not managed by XP integrated unzipper.
Reply
Re: Update 1
#10
Quote:Thanks! unfortunately I can't run ldlist on this machine (XP), after a relatively long run it quits with a "ungetc failed" message. Parts.lst is not created. Anything I can do to find problem origin? (it's quite possible that I have a very queer file in my LDraw folder!)?

That's kind of strange. If you have a file that's less than 4 lines long I can see it potentially having problems but I don't see why it would exit with that error. But C file input can be pretty odd and I've had to avoid the default line processing to make sure it works for newline in DOS or unix format.

I've uploaded a 0.9.3 executable to narrow down the file with the problem. If you could send me the file I'll see what's going wrong.

Tim
Reply
Re: Update 1
#11
Got it! It was a png image file that was lounging there... Shouldn't you restrict the scan to valid LDraw extensions?

Also, it indeed chokes on too short files (only one LDraw line), or files that start with an empty line (in the later case, I get this message: "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.").

I could then try the "primitive" feature. Two problems:
- 48 folder is not scanned
- To be really useful (I don't know if it's easy), description should be prefixed with "Primitive" and "Hires" (or similar!), otherwise creating categories in MLCad is not so practical...
Reply
Re: Update 1
#13
Philippe \Philo\" Hurbain Wrote:Got it! It was a png image file that was lounging there... Shouldn't you restrict the scan to valid LDraw extensions?

That's very odd. Because it should be checking the extension before doing any processing.

Quote:Also, it indeed chokes on too short files (only one LDraw line), or files that start with an empty line (in the later case, I get this message: "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.").

I'll look into this

Quote:I could then try the "primitive" feature. Two problems:
- 48 folder is not scanned
- To be really useful (I don't know if it's easy), description should be prefixed with "Primitive" and "Hires" (or similar!), otherwise creating categories in MLCad is not so practical...

Both fairly straightforward changes. Will do that.

Tim
Reply
Re: Update 1
#22
Quote:
Quote:I could then try the "primitive" feature. Two problems:
- 48 folder is not scanned
- To be really useful (I don't know if it's easy), description should be prefixed with "Primitive" and "Hires" (or similar!), otherwise creating categories in MLCad is not so practical...

Both fairly straightforward changes. Will do that.

Tim
Any news? I know, UTSL, but...

Also, if LDRAWDIR is not defined, LDlist doesn't work (and error message is a bit obscure...). Maybe path could be specified as an overriding argument?
Reply
Re: Update 1
#23
Hi Philo,

I've got no time at all to work on this Sad Unlike fixing bits of the website I'd need to sit down and really edit. And my time is just too full for that. Maybe this coming weekend I will have a chance. Maybe.

Tim
Reply
Re: Update 1
#28
These changes have been made.

I will release a new version once I match Michael's XML file perfectly. We still have a couple of small differences.

Tim
Reply
Re: LDList Update 1
#12
[quote="Tim Gould"]
[*] Renamed to LDList


Have you asked Anders Isaksson if it's ok to rip off the name of his software?
http://www.blockcad.net/ldlist.htm
Reply
Re: LDList Update 1
#14
Sigh. There's so many LDraw tools out there I'm totally unaware of. Will think of another name.

Tim
Reply
Re: LDList Update 1
#15
Ah, don't lose heart. The LSC does a tremendous job making old LDraw tools outdated and discouraging programmers from making new tools. Wink
Reply
Re: LDList Update 1
#16
Tim Gould Wrote:Sigh. There's so many LDraw tools out there I'm totally unaware of. Will think of another name.

Well, my LDList has been available from ldraw.org, at least in 2008 (http://news.lugnet.com/cad/dev/org/ldraw/?n=4249) - I don't know which ldraw.org reorganisation removed it...
Reply
Re: LDList Update 1
#17
I've got no idea why it wouldn't be there either but I suggest you add it again. The link may have died at some point in which case it could have been removed.

In truth I didn't look through the list. I do enought literature reviews for work to do them for LDraw too Wink

Tim
Reply
Re: LDList Update 1
#18
I look through the report of broken downloads (submitted by the users) every three, four months - all links are tested through the CSM as well as copying the link directly in a browser. If it gets no response twice it will be removed. Broken links are annoyance to the users and will be removed independently of the prog they are linking to.

If you submit links to LDraw.org just check them from time to time and don't forget to update them when moving to a new address.

w.

LDraw Content Manager
LEGO ergo sum
Reply
Re: LDList Update 1
#19
Well, I've added it again, but it doesn't show up - I guess the pages are updated manually?
Reply
Re: LDList Update 1
#20
Yes. And added.

Tim
Reply
Re: LDList Update 1
#24
I must be getting old (58 and counting...) - I can't find the 3:rd party downloads anywhere on the LDRAW pages, so I can't check the link.
Reply
Re: LDList Update 1
#25
They're not on the new site yet Sad And unfortunately with the crash of the old site we can't even link to the old one.

As an interim response I suggest adding software to here using the template demonstrated for LDView.

Tim
Reply
Re: LDList Update 1
#26
Well, it seems I can't log in there, even though I'm already logged in to the forums, so I'll let it be...
Reply
Re: Announcing mklist2
#21
Not to hijack the thread, but as it might possibly be of use to others, I figure I should also probably share my partslist program I wrote a while ago for generating JSON formatted parts lists for use in my (yet unfinished and now stagnant) WebGL-based LDraw program in case somebody might find it useful.

It's a bit too long to include in the message, so I put it on github here. It is unix only as-is, feel free do whatever with it, I don't care.
Reply
LDMakeList Update
#27
Hi all,

I've renamed this program to be LDMakeList, thus keeping the LD for LDraw and the old name. If this conflicts with any old code I will scream Wink

The latest files can be found here

Please note I cannot promise any further work on this other than bug fixes. New features will have to be added by others. I fully open this to editing by anyone. I'm super busy lately and thanks to my laptop being stolen in Switzerland I no longer have a working C++ compiler on windows and can't even compile this Sad

Tim
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)
Forum Jump:


Users browsing this thread: 1 Guest(s)