3 ms·
Well, it could be in CSV, yes, but - I was saving the comments, too, so right now, a torrent element has comment elements as sub-elements; in CSV would probabl
by runn1ng 14y ago
Well, it could be in CSV, yes, but
- I was saving the comments, too, so right now, a torrent element has comment elements as sub-elements; in CSV would probably need to be two tables/files instead of one, which would get a little more complicated
- I didn't want to think so much about escaping newlines (that are in the comments and infos) and the delimiters, right now I was only escaping < to < and > to >.
- It was easier to check whether the script is working correctly or not (probably the top reason :) ).
- I thought parsing XML would be easier than parsing some other format, since there are tools already available for that.
But well, if somebody will really want CSV version he can easily transfer that from XML...
ad edit: no problem.
- jerf 14y ago"I didn't want to think so much about escaping newlines (that are in the comments and infos) and the delimiters, right now I was only escaping < to < and > to >." Then at the very least you need & -> & too. Alternatively, wrap the whole comment in CDATA, though don't forget to replace ]]> with ]]>]]<<!CDATA[ or something like that so you don't get spurious CDATA closures. (There may not be any in there now, but there will be once people hear about you doing this...)
- runn1ng 14y agoOh. Thanks for pointing that out, I think I didn't escape & -> &. I hope it won't make trouble to someone.
- glogla 14y agoAh, that makes sense. I was looking mostly at the poor file, so I haven't considered comments and such.
- deleted 14y ago[deleted]