On Fri, 03 Dec 2004 14:35:42 +1100, John Yu <jyu(a)objectmastery.com> wrote:
Hmm, the ellipses in your list... you mean I need to
create all
directories 0/00 to f/ff? Including the subdirs under temp and archive,
that's 9000+ directories to create! Is that right?
Uploads are filed based on md5sums; so, yeah, the maximum layout's
gonna be pretty humongous. Easily done though, if you can get at a
shell and Perl:
$ cd /path/to/your/wiki/images
$ mkdir archive temp
$ perl -e '@hex=("0".."9", "a".."f"); for $pre
("", "archive/",
"temp/") { for $w (@hex) { mkdir("$pre$w"); for $x (@hex) {for $y
(@hex) { mkdir("$pre$w/$x$y") } } } }'
And then adjust the ownership of everything recursively if need be.
If you *don't* have shell access, it's not so easy; either you could
get Perl to issue FTP commands from your home PC (I bet there are
plenty of modules on CPAN that make *that* easy); or, you could just
edit MediaWiki so that it stores uploads in one flat directory.
What about images/thumb directory? Do I need to create
0/00-f/ff
subdirectories under it as well?
Oh, well, if you do, add thumb to the mkdir line, and "thumb\" to the
same list as "archive/" and "temp/"
;)
--
Rowan Collins BSc
[IMSoP]