
Download a Fresh Copy of The Pirate Bay, With Permission - Libertatea
http://torrentfreak.com/download-copy-of-the-pirate-bay-with-permission-130220/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Torrentfreak+%28Torrentfreak%29
======
glogla
Great work! I have some questions if you don't mind.

I kind of wonder why you chose XML, and the page doesn't really elaborate on
that much. Wouldn't CSV be much smaller (XML is pretty noisy format, though
the 7z can probably take care of that) while at the same time more searchble?
You can search CSV with just grep, with XML it gets little more difficult, and
CSV is also more simple to load to a database in case someone wanted to make
TPB web mirror or something.

EDIT: sorry if I seem annoying :) but I had something like this on todo-list
for a while, and you did my work for me, so I kind of wonder why you made
different decisions.

~~~
runn1ng
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
&lt; and > to &gt;.

\- 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
"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
&lt; and > to &gt;."

Then at the very least you need & -> &amp; too.

Alternatively, wrap the whole comment in CDATA, though don't forget to replace
]]> with ]]>]]&lt;<!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
Oh. Thanks for pointing that out, I think I didn't escape & -> &amp;.

I hope it won't make trouble to someone.

------
runn1ng
my original submission

<http://news.ycombinator.com/item?id=5244196>

~~~
t0
Thank you for doing this.

~~~
runn1ng
it's more for fun than anything

~~~
simias
It's not very useful given that there are no comments on your "original
submission".

~~~
nitrogen
Look at his profile; he's the _creator_ of the original submission.

~~~
simias
Ooooh, I missed that. He should have linked his blog directly then, not the
empty comment section. But point taken.

------
felipebueno
It would be very cool (and useful) if they put that in some kind of version
conrol (git, svn, etc).

~~~
islon
I second that. This way if pirate bay got down everyone will have the last
version of the site, not the 3/4/5 months ago version.

~~~
johansch
I think it will only go down if the people keeping it running stop bothering.

They have stable network access covered via the Swedish pirate party. This
party (which have two of Sweden's twenty seats in the European Parliament)
have by doing solid work won a lot of legitimacy in media over the past two
years or so, I think.

