Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels) 2014
Minor Proposed Change to File History
Moderator: CCGHQ Admins
Minor Proposed Change to File History
by Xander9009 » 30 May 2018, 22:49
So, I've been a bit displeased with how the system I set up for editor history has aged. It's not very robust, though it's certainly simple. I was considering what issues it has and how they might be addressed. The main two issues are:
1: When there are a lot of editors/edits, it becomes difficult to match edits to dates.
2: When there's a comment, the current method of including those comments isn't very well incorporated.
I whipped up this from a card with those issues (Raging Ravine).
1: When there are a lot of editors/edits, it becomes difficult to match edits to dates.
2: When there's a comment, the current method of including those comments isn't very well incorporated.
I whipped up this from a card with those issues (Raging Ravine).
- Code: Select all
<AUTHOR><![CDATA[sumomole]]></AUTHOR>
<EDITORS><![CDATA[sumomole, Borborigmos, Splinterverse, Splinterverse, Splinterverse, Splinterverse]]></EDITORS>
<DATE><![CDATA[25-09-14, 23-10-15, 16-01-17, 22-01-17, 29-01-17, 03-02-01]]></DATE>
--22-01-17: Added availability block to creature ability.
Becomes
<HISTORY>
<CREATION Author="sumomole" Date="25-09-14" />
<EDITS>
<EDIT Author="Borborigmos" Date="23-10-15" />
<EDIT Author="Splinterverse" Date="16-01-17" />
<EDIT Author="Splinterverse" Date="22-01-17"><![CDATA[Added availability block to creature ability.]]></EDIT>
<EDIT Author="Splinterverse" Date="29-01-17" />
<EDIT Author="Splinterverse" Date="03-02-01" />
</EDITS>
</HISTORY>
- Code: Select all
<AUTHOR><![CDATA[sumomole, Borborigmos]]></AUTHOR>
<EDITORS><![CDATA[sumomole, Borborigmos]]></EDITORS>
<DATE><![CDATA[25-09-14, 23-09-14]]></DATE>
Becomes
<HISTORY>
<CREATION Author="sumomole" Author2="Borborigmos" Date="25-09-14" />
</HISTORY>
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Minor Proposed Change to File History
by RiiakShiNal » 31 May 2018, 10:20
One thing to note is that XML attributes don't handle non-roman characters very well (can't use CDATA there). If no one is using non-roman characters for their name then it isn't a problem, but if you want to allow that then you should probably adjust it to be something like this:
Optionally, you could put the comment in a COMMENT block to better document it in the file.
- Code: Select all
<HISTORY>
<CREATION Date="25-09-2014">
<AUTHOR><![CDATA[sumomole]]></AUTHOR>
</CREATION>
<EDITS>
<EDIT Date="23-10-2015">
<AUTHOR><![CDATA[Borborigmos]]></AUTHOR>
</EDIT>
<EDIT Date="16-01-2017">
<AUTHOR><![CDATA[Splinterverse]]></AUTHOR>
</EDIT>
<EDIT Date="22-01-2017">
<AUTHOR><![CDATA[Splinterverse]]></AUTHOR>
<![CDATA[Added availability block to creature ability.]]>
</EDIT>
<EDIT Date="29-01-2017">
<AUTHOR><![CDATA[Splinterverse]]></AUTHOR>
</EDIT>
<EDIT Date="03-02-2001">
<AUTHOR><![CDATA[Splinterverse]]></AUTHOR>
</EDIT>
</EDITS></HISTORY>
- Code: Select all
<HISTORY>
<CREATION Date="25-09-2014">
<AUTHOR><![CDATA[sumomole]]></AUTHOR>
<AUTHOR><![CDATA[Borborigmos]]></AUTHOR>
</CREATION>
</HISTORY>
Optionally, you could put the comment in a COMMENT block to better document it in the file.
- Code: Select all
<COMMENT><![CDATA[Added availability block to creature ability.]]></COMMENT>
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Minor Proposed Change to File History
by Xander9009 » 31 May 2018, 15:05
Will definitely do the year as YYYY-MM-DD; that makes a lot of sense. The authors using CDATA blocks makes sense, and I'll do it that way, though I did list out the authors currently involved and there aren't any characters to worry about. That said, the whole idea is to be more robust and future-proof, so... I really like the idea of the comment block, especially if the authors are getting a separate tag instead of simply being an attribute.
Good ideas. Thanks.
I'll give it a few days to percolate in case anything else comes to mind for anyone (not to mention I don't currently have the time needed to write a script to swap everything to the new version, anyway). I'll probably implement whatever changes are finalized on Monday unless they're still being discussed.
I'm also considering reworking the uploading process so that the tool I'm working on can handle the uploading of new files. If I do that, I could incorporate a small section to handle writing out the history for you instead of having to do that by hand, so anything that makes the history easier to parse without sacrificing human-readability is good.
Good ideas. Thanks.
I'll give it a few days to percolate in case anything else comes to mind for anyone (not to mention I don't currently have the time needed to write a script to swap everything to the new version, anyway). I'll probably implement whatever changes are finalized on Monday unless they're still being discussed.
I'm also considering reworking the uploading process so that the tool I'm working on can handle the uploading of new files. If I do that, I could incorporate a small section to handle writing out the history for you instead of having to do that by hand, so anything that makes the history easier to parse without sacrificing human-readability is good.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 20 guests