Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F191820
shuffle.sh
cscott (C. Scott Ananian)
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
cscott
Jul 13 2015, 5:04 PM
2015-07-13 17:04:20 (UTC+0)
Size
490 B
Referenced Files
None
Subscribers
None
shuffle.sh
View Options
#!/bin/bash
LANG
=
"en de nl fr it ru es sv pl ja ar he hi ko zh"
# link prefix languages
LANG
=
"ar ckb cu cv hy is kaa ka lbe ln mzn pnb uk uz"
HOWMANY
=
10000
for
l in
$LANG
;
do
echo
$l
zcat
${
l
}
wiki-latest-all-titles-in-ns0.gz
|
sort -R >
${
l
}
wiki-shuffled-titles
head -
${
HOWMANY
}
${
l
}
wiki-shuffled-titles >
${
l
}
wiki-
${
HOWMANY
}
head -2
${
l
}
wiki-
${
HOWMANY
}
bzip2
${
l
}
wiki-shuffled-titles
&
$(
dirname
$0
)
/jsonify.js
${
l
}
wiki-
${
HOWMANY
}
>
${
l
}
wiki-
${
HOWMANY
}
.json
done
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
183127
Default Alt Text
shuffle.sh (490 B)
Attached To
Mode
T101928: Refresh RT-testing test pages to change the mix of pages and add small set of pages from wikitionary and other projects
Attached
Detach File
Event Timeline
Log In to Comment