Page MenuHomePhabricator
Paste P17250

(An Untitled Masterwork)
ActivePublic

Authored by Urbanecm on Tue, Sep 7, 4:43 PM.
[urbanecm@notebook ~/tmp/cswiki_dump_pageviews/pageviews-complete]$ ls
pageviews-20200907-user
[urbanecm@notebook ~/tmp/cswiki_dump_pageviews/pageviews-complete]$ grep '^cs.wikipedia ' pageviews-20200907-user > pageviews-20200907-user-cswiki
[urbanecm@notebook ~/tmp/cswiki_dump_pageviews/pageviews-complete]$ grep ' Jiří_Menzel ' pageviews-20200907-user-cswiki
cs.wikipedia Jiří_Menzel 1076 desktop 15254 A95B54C65D146E469F935G1188H1122I1170J987K1148L1089M843N796O656P576Q606R826S874T697U459V292W112X49
cs.wikipedia Jiří_Menzel 1076 mobile-web 24146 A149B128C180D458E1156F1734G1581H1182I922J951K1213L1085M915N822O871P1058Q1284R2061S2440T2005U1092V592W194X73
cs.wikipedia Jiří_Menzel mobile-app 666 A2B3C11D13E46F39G43H20I22J22K40L30M19N22O29P27Q29R61S60T66U19V22W15X6
[urbanecm@notebook ~/tmp/cswiki_dump_pageviews/pageviews-complete]$ echo $((15254+24146+666))
40066
[urbanecm@notebook ~/tmp/cswiki_dump_pageviews/pageviews-complete]$ # this matches what https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/cs.wikipedia/all-access/user/Ji%C5%99%C3%AD_Menzel/daily/20200907/20200907 says
[urbanecm@notebook ~/tmp/cswiki_dump_pageviews/pageviews-complete]$ cd ../pageviews
[urbanecm@notebook ~/tmp/cswiki_dump_pageviews/pageviews]$ for i in pageviews-20200907-*; do
> grep '^\(cs\|cs\.m\) ' $i > cswiki-$i &
> done
[...]
[urbanecm@notebook ~/tmp/cswiki_dump_pageviews/pageviews]$ grep ' Jiří_Menzel ' cswiki-pageviews-20200907-* | cut -d ' ' -f 3 | awk '{s+=$1} END {print s}'
40341
[urbanecm@notebook ~/tmp/cswiki_dump_pageviews/pageviews]$ # this doesn't match the pageviews API for user traffic, desktop+mobile
[urbanecm@notebook ~/tmp/cswiki_dump_pageviews/pageviews]$ grep --no-filename ' Jiří_Menzel ' cswiki-pageviews-20200907-* | grep '^cs ' | cut -d ' ' -f 3 | awk '{s+=$1} END {print s}'
15346
[urbanecm@notebook ~/tmp/cswiki_dump_pageviews/pageviews]$ # desktop-only is off as well