Is there a way to count downloads of a file (or clicks on a given link, in general)?
I have a file, and I would like to know how many times it was downloaded by using a link from a wiki:
http://example.com/cool_file.tar.bz2 [Count: 1234]
Obviously, this link would have to be hidden behind some other link (something like http://example.com/wiki/download_redirect:example.com/cool_file.tar.bz2)
Perhaps some extension? I wouldn't like to parse web logs, I'm too lazy ;)
Tomasz Chmielewski wrote:
Is there a way to count downloads of a file (or clicks on a given link, in general)?
I have a file, and I would like to know how many times it was downloaded by using a link from a wiki:
http://example.com/cool_file.tar.bz2 [Count: 1234]
Obviously, this link would have to be hidden behind some other link (something like http://example.com/wiki/download_redirect:example.com/cool_file.tar.bz2)
Perhaps some extension? I wouldn't like to parse web logs, I'm too lazy ;)
Parsing logs is faster than creating an extension for that :P grep cool_file.tar.bz2 access.log | wc -l
Platonides schrieb:
Tomasz Chmielewski wrote:
Is there a way to count downloads of a file (or clicks on a given link, in general)?
I have a file, and I would like to know how many times it was downloaded by using a link from a wiki:
http://example.com/cool_file.tar.bz2 [Count: 1234]
Obviously, this link would have to be hidden behind some other link (something like http://example.com/wiki/download_redirect:example.com/cool_file.tar.bz2)
Perhaps some extension? I wouldn't like to parse web logs, I'm too lazy ;)
Parsing logs is faster than creating an extension for that :P grep cool_file.tar.bz2 access.log | wc -l
Why use two commands when you can use one?
grep -c cool_file.tar.bz2 access.log
But the problem with such one liners is that after the next logrotate run your download count drops to 0, doesn't it?
So yes, an extension would be still great.
mediawiki-l@lists.wikimedia.org