Official part file validator


Official part file validator
#1
I'd like to see an official, web based, part validator in the vein of Mike Heidemann's DAT Header program. A simple web interface where a part author can submit a part and be served back an error list and possibly a fixed, error free part. I would gladly host such an app on the LDraw.org servers.
Reply
Re: Official part file validator
#2
Maybe even take a step further and replace the l3p checks on the PT with something like this. Unfortunately DATHeader was quite closed source last time I checked. Sad
Reply
Re: Official part file validator
#3
?????
I can't remember that question!
Reply
Re: Official part file validator
#4
LDView could probably be modified to write it's finding to a log instead of it's error dialog as it's already present on the part tracker server I believe.
Reply
Re: Official part file validator
#5
The command line LDView could indeed be modified to output warnings and errors to a log file (or stdout/stderr) with relatively little effort.
Reply
Re: Official part file validator
#6
I agree.

The header checking already exists as a (more or less) self-contained script on the Parts Tracker and is used the the parts update build. I have resisted including that as a mandatory check upon file submission for fear of losing parts (and part authors) for want of a few simple corrections that can be done as admin edits.

But DATheader does a lot more...
Chris (LDraw Parts Library Admin)
Reply
Re: Official part file validator
#7
Yes. And I want something to automate the correction process as much as possible while also being completely browser based and therefore platform independent. Streamlining the system with good, platform agnostic tools is something that needed to happen years ago.
Reply
Re: Official part file validator
#8
I agree, but Mike has done a great job with DATheader in the absence of browser-based tools.
Chris (LDraw Parts Library Admin)
Reply
Re: Official part file validator
#9
Chris Dee Wrote:But DATheader does a lot more...

nod

w.
LEGO ergo sum
Reply
Re: Official part file validator
#10
Please let me know the meaning of "nod".
Reply
Re: Official part file validator
#11
My favorite Google translater says "nicken" in German...
Reply
Re: Official part file validator
#12
Ok, it is not an abbreviation, it is an english word Smile - Thanks!
Reply
Re: Official part file validator
#13
What I'd really like to see would be a cross-platform command-line version of DATHeader that could be used for automatic checking. Print errors/warnings/notes to stdout and with a switch, write a corrected dat file to the specified file path. Such a thing could be easily enough be hooked to a web application, the parts tracker or whatever other uses there could be.

EDIT: I humbly congratulate Mike on his 2^10th post.
Reply
Re: Official part file validator
#14
Ups, so many posts already.

You asked for "cross-platform command-line version of DATHeader". DATHeader is written in VB.NET. If somebody like to translate the code into "something "cross-platform" I'll help. But I can not write c or java. Sad

Edit: I just attached the sourcecode for the function ScanForHeaderErrors to this post, so you will see the bad coding behind Smile


Attached Files
.txt   ScanForHeaderErrors.txt (Size: 44.04 KB / Downloads: 0)
Reply
Re: Official part file validator
#15
I assume running through a browser is fine, so I'd prefer to convert it to Perl and incorporate it into the Parts Tracker as a replacement for the existubf L3P scrip on the Tools page. Do you have a full spec. of what DATheader current does? As I said, much of the header checking already exists.
Chris (LDraw Parts Library Admin)
Reply
Re: Official part file validator
#16
A full spec. of all tests for DATHeader are currently not available because it is not necessary, I have the sourcecode Smile
The spec would have been double work.

But I use an object for the header errors. Hopefully the entries are self explaining. If not, please let me know:

Structure ResultHeader
Dim gboolCorrectLengthofPartDescription As Boolean 'Checks for greater 1 and less max. characters.
Dim gboolNoTabinPartDescription As Boolean 'Checks for Tab Character in part description
Dim gboolLeadingSpacesInPartDescription As Boolean
Dim gboolCorrectKeywordLength As Boolean
Dim gboolCorrectKeywordUsed As Boolean
Dim gboolUniqueKeywordUsed As Boolean
Dim gboolCorrectHelpLength As Boolean
Dim gboolPartDescriptionMatchesFilename As Boolean
Dim gboolAuthorRealnameSet As Boolean
Dim gboolAuthorUsernameSet As Boolean
Dim gboolBFCisSet As Boolean
Dim gboolLicenseisSet As Boolean
Dim gboolPartTypeisSet As Boolean
Dim gboolNewNotUsed As Boolean
Dim gboolNeedsWorkComment As Boolean
Dim gboolCategory As Boolean
Dim gboolCategoryAllowed As Boolean
Dim gboolKeywordsAllowed As Boolean
Dim gboolPrimitive48FilenameStartwith48 As Boolean
Dim gboolPrimitivePartDescriptionStartWithout_orTilde As Boolean
Dim gboolSubpartFilenameStartWithS As Boolean
Dim gboolPartFilenameStartwithout48orS As Boolean
Dim gboolSubpartDescriptionStartWithTilde As Boolean
Dim gboolSubpartDescriptionStartWithout_ As Boolean
Dim gboolPartDescriptionStartWithout_ As Boolean
Dim gboolShortCutPartDescriptionStartWith_ As Boolean
Dim gboolShortCutFilenameContains_d_or_c As Boolean
Dim gboolBFC_CCW_at_Primitive As Boolean
Dim gboolNameExtensionIsDAT As Boolean
Dim gboolNoSpecialCharacterInDescription As Boolean
Dim gboolLineEndWithCRLF As Boolean
Dim gboolRotationNotFound As Boolean 'Checks for word ROTATION
Dim gboolHistoryEntryAuthorBracket As Boolean 'Checks for UserName in History Entry with Brackets
Dim gboolMinifigAccessoryNotFound As Boolean ''Checks for Minifig Accessory in Filedescription
Dim gboolFigureAccessoryNotFound As Boolean 'Checks for Figure Accessory in Filedescription
Dim gboolSquarebracketsAroundUsername As Boolean
Dim gboolAliasPartDescriptionStartWithSame As Boolean 'Checks for Alias parts to start with =
Dim gboolPhysicalColorPartMentionColorInDescription As Boolean 'Checks for physical color part to mention the color [71]
Dim gboolPhysicalColorPartOnlyLinetype1Used As Boolean 'Checks for physical color part only to consists of a linetype 1
Dim gboolPhysicalColorPartCorrectColorsUsed As Boolean
Dim gboolAliasPartOnlyLinetype1Used As Boolean
Dim gboolAliasPartOnlyOneLinetype1 As Boolean
Dim gboolAliasPartOnlyColor16Used As Boolean
Dim gboolAliasPartAliasMentionedInComments As Boolean
Dim gboolAliasPartAliasNumberInComment As Boolean
Dim gboolNoAmericanEnglishUsed As Boolean
End Structure
Reply
Re: Official part file validator
#17
I'd like to move forward on this. To all the experienced Web developers out there what is the best language solution for this? JavaScript? Perl? Something else?
Reply
Re: Official part file validator
#18
I think a serverside solution would be the best option - you could hook that onto the Parts Tracker, so JavaScript wouldn't be a very good idea.
Reply
Re: Official part file validator
#19
Yes, I was planning on Perl, as the header checking part of it is already written in Perl. Maybe I'll get some free time later this month!
Chris (LDraw Parts Library Admin)
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)