Auto correcting (some) defects in the official library


Re: Resulting patch (was Re: Auto correcting..)
#26
I re-iterate, it is great that you are taking this on. Many people will appreciate a cleaner library, but please don't under-estimate the effort involved.
Roland Melkert Wrote:You could probably use a simple search and replace for the !LDRAW_ORG line (I like using grepwin for such things)
Yes, there are many ways that I could do this, but if you want to help get these submitted to the Parts Tracker, I think you should make as much effort as possible to fit in with the change control process.
The current official LDRAW_ORG line should be updated something like:

0 !LDRAW_ORG Part UPDATE 2003-03
to
0 !LDRAW_ORG Unofficial_Part

Roland Melkert Wrote:But the history lines might be a problem. Current version of LDCad does not really manage those lines, I could add a simple 'insert after last one (no matter where it might be)' function though.
They will only be in the header so inserting something like this after the last one would be fine.
0 !HISTORY 2014-11-18 [roland] Auto-corrected with LDCad Vxx.x

The parts release script uses the following algorithm (but it's written in Perl, so I guess not much use for you).
- Read and re-write header to "0 !LICENSE" license line (in fact in official library files this should always be exactly five lines)
- Read and re-write rest of header until one of the following REGEXs is satisfied:
Code:
/^\s*[1-5]\s/
/^\s*0\s*BFC\s*INVERTNEXT\s*/
/^\s*0\s*\/\/\s*/
- write new !HISTORY line (don't forget CRLF DOS-style line ending)

You will also need to request Part Author rights for me to be able to proxy-submit these files under your name, viz:
Part Tracker Wrote:... send an email to the Parts Library Admin (Chris Dee) with your true first and last names and your LDraw.org username. You must also include the statement "I accept the LDraw.org Contributor Agreement with regards to all past and future contributions I make to LDraw.org".

If possible please separate files which already exist as updated versions on the Parts Tracker - these will need special treatment to avoid losing any changes (which may be nothing to do with the corrections you are making).
Chris (LDraw Parts Library Admin)
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: Resulting patch (was Re: Auto correcting..) - by Chris Dee - 2014-11-18, 6:09

Forum Jump:


Users browsing this thread: 1 Guest(s)