Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be a bit more explicit about how to satisfy dependencies #9

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion Faster.pm
Expand Up @@ -3,7 +3,6 @@ package Faster;
use Inline (
C => 'DATA',
CCFLAGS => '-O0',
CC => 'gcc-4.3',
LIBS => '-lz',
FORCE_BUILD => 1
);
Expand Down
6 changes: 5 additions & 1 deletion PrimitiveXML.pm
Expand Up @@ -30,7 +30,11 @@ sub new {
}

my $infotxt = do {local $/ = "</siteinfo>\n"; <$in>;};
my $info = XML::Bare->new(text => $infotxt)->parse()->{mediawiki}->{siteinfo};
defined $infotxt
or die "could not read infotxt from input $input";
my $parser= XML::Bare->new(text => $infotxt)
or die "could not create parser from text '$infotxt'";
my $info = $parser->parse()->{mediawiki}->{siteinfo};

my %self = (
page => {},
Expand Down
31 changes: 24 additions & 7 deletions README
Expand Up @@ -7,15 +7,18 @@ The first 1000 pages of the german Wikipedia and all their revisions
hardware.


Dependencies
------------
INSTALL:

You need at least Perl 5.10. The Perl interpreter has to be compiled
with threads support.

You also need a working C compiler for the inline SHA1 C function.
Currently this _must_ be gcc 4.3 callable as 'gcc-4.3'. This will be
fixed soon.
Although gcc 4.3 was specified by old versions of levitation-perl
(circa May 2010), gcc 4.5.2 also appears to work (at least for some
small wiki dumps).

You need zlib, for example the following should work under Debian/Ubuntu:
sudo apt-get install zlib1g-dev

You need the following modules and their dependencies from CPAN:

Expand All @@ -24,21 +27,34 @@ You need the following modules and their dependencies from CPAN:
- JSON::XS
- Compress::Raw::Zlib
- Carp::Assert
- Devel::Size

- CDB_File
- XML::Bare >= 0.44
- Deep::Hash::Utils
- File::Path > 2.04 ? (2.08 is fine; it has to export make_path)

Some Linux distributions will already have the first set.
Under Debian / Ubuntu the following command should set you:

sudo apt-get install libregexp-common-perl \
libinline-perl libjson-xs-perl \
libcompress-raw-zlib-perl libcarp-assert-perl
libcompress-raw-zlib-perl libcarp-assert-perl \
libdevel-size-perl

For Fedora, the equivalent is
sudo yum install perl-Regexp-Common \
perl-Inline perl-JSON-XS \
perl-Compress-Raw-Zlib perl-Carp-Assert


For the second set, you may be able to just run:
sudo cpan -i CDB_File
sudo cpan -i XML::Bare
sudo cpan -i Deep::Hash::Utils


Usage
-----
USAGE:

First, initialize a git repository:

Expand All @@ -47,6 +63,7 @@ First, initialize a git repository:
cd blawiki
git init

(Alternately, go to the working directory of an existing git repository where you want to import the dump, such as one from a previous run of levitation-perl).

Then, "levitate". This is a three-step process:

Expand Down