[arch-commits] Commit in (7 files)

Sergej Pupykin spupykin at nymeria.archlinux.org
Fri Mar 21 08:42:37 UTC 2014


    Date: Friday, March 21, 2014 @ 09:42:37
  Author: spupykin
Revision: 108018

Added:
  python-simplemediawiki/
Modified:
  arch-wiki-docs/trunk/PKGBUILD
  pitivi/trunk/PKGBUILD
Deleted:
  arch-wiki-docs/trunk/filter.pl
  arch-wiki-docs/trunk/get.sh
  arch-wiki-docs/trunk/index.pl
  python-simplemediawiki-git/

--------------------------------+
 arch-wiki-docs/trunk/PKGBUILD  |   30 ++++++++++++-------------
 arch-wiki-docs/trunk/filter.pl |   46 ---------------------------------------
 arch-wiki-docs/trunk/get.sh    |   25 ---------------------
 arch-wiki-docs/trunk/index.pl  |   35 -----------------------------
 pitivi/trunk/PKGBUILD          |    4 +--
 5 files changed, 17 insertions(+), 123 deletions(-)

Modified: arch-wiki-docs/trunk/PKGBUILD
===================================================================
--- arch-wiki-docs/trunk/PKGBUILD	2014-03-21 08:42:00 UTC (rev 108017)
+++ arch-wiki-docs/trunk/PKGBUILD	2014-03-21 08:42:37 UTC (rev 108018)
@@ -2,27 +2,27 @@
 # Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
 
 pkgname=arch-wiki-docs
-pkgver=20140218
+pkgdesc="Pages from Arch Wiki optimized for offline browsing"
+pkgver=2014.03.21
 pkgrel=1
-pkgdesc="Documentation from wiki.archlinux.org"
 arch=('any')
-makedepends=('wget' 'perl' 'perl-json-xs')
-url="http://wiki.archlinux.org"
+url="https://github.com/lahwaacz/arch-wiki-docs"
 license=('FDL')
-options=('docs' '!strip')
-source=("get.sh"
-	"index.pl"
-	"filter.pl")
-md5sums=('7f9aec77fbf319aa8247149319ff7f7c'
-         'dddb4258bd93acc1a0102bfee3e077f0'
-         '6430f9db1d0f0be5999e2c247f4ca2a1')
+options=('!strip')
+makedepends=('git' 'python' 'python-simplemediawiki-git' 'python-lxml' 'python-cssselect')
+source=('git://github.com/lahwaacz/arch-wiki-docs.git')
+md5sums=('SKIP')
 
+pkgver() {
+  date "+%Y.%m.%d"
+}
+
 build() {
-  bash $srcdir/get.sh $srcdir $srcdir/pages
-  (cd $srcdir/pages && perl -w $srcdir/filter.pl)
+  cd "$pkgname"
+  python arch-wiki-docs.py --output-directory "$srcdir/build_wiki"
 }
 
 package() {
-  mkdir -p $pkgdir/usr/share/doc/arch-wiki/html
-  cp -r $srcdir/pages/* $pkgdir/usr/share/doc/arch-wiki/html/
+  install -dm755 "$pkgdir/usr/share/doc/arch-wiki/html"
+  cp -r "$srcdir"/build_wiki/* "$pkgdir/usr/share/doc/arch-wiki/html/"
 }

Deleted: arch-wiki-docs/trunk/filter.pl
===================================================================
--- arch-wiki-docs/trunk/filter.pl	2014-03-21 08:42:00 UTC (rev 108017)
+++ arch-wiki-docs/trunk/filter.pl	2014-03-21 08:42:37 UTC (rev 108018)
@@ -1,46 +0,0 @@
-#!/usr/bin/perl -w
-
-%INDEX=();
-
-print "Reading index\n";
-
-open FH, "<index.html" || die;
-
-while(<FH>)
-{
-    if(/HREF='([0-9]+).html'\>(.+)\<\/A\>$/)
-    {
-        $INDEX{$1} = $2;
-    }
-}
-
-close FH;
-
-sub fix_file {
-    my $in = shift @_;
-
-    open FH, "<$in" || die;
-    open FHO, ">tmpout.html" || die;
-
-    $_ = join "", <FH>;
-
-    foreach $i (keys %INDEX)
-    {
-        s/href=\"\/index.php\/\Q$INDEX{$i}\E\"/href=\"$i.html\"/gsm;
-        s/href=\"htt\S+\/\/wiki.archlinux.org\/index.php\/\Q$INDEX{$i}\E\"/href=\"$i.html\"/gsm;
-    }
-    print FHO;
-
-    close FH;
-    close FHO;
-
-    rename("tmpout.html", "$in");
-}
-
- at files=<0*.html>;
-
-foreach $f (@files)
-{
-    print "Fixing $f\n";
-    fix_file($f);
-}

Deleted: arch-wiki-docs/trunk/get.sh
===================================================================
--- arch-wiki-docs/trunk/get.sh	2014-03-21 08:42:00 UTC (rev 108017)
+++ arch-wiki-docs/trunk/get.sh	2014-03-21 08:42:37 UTC (rev 108018)
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-TARGETDIR=$2
-
-mkdir -p $TARGETDIR
-
-cat >$TARGETDIR/index.html <<EOF
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<HTML>
-	<HEAD>
-		<TITLE>ArchWiki index</TITLE>
-		<META http-equiv="content-type" content="text/html; charset=utf-8"/>
-	</HEAD>
-	<BODY>
-EOF
-
-perl $1/index.pl https://wiki.archlinux.org | while read A; do
-    TITLE=`echo $A | cut -d \  -f 2- | tr ' ' '_'`
-    ID=`echo $A | cut -d \  -f 1`
-    echo "$ID => $TITLE"
-    echo "<P><A HREF='$ID.html'>$TITLE</A>" >>$TARGETDIR/index.html
-    [ -f "$TARGETDIR/$ID.html" ] || wget --no-check-certificate -q "https://wiki.archlinux.org/index.php?title=$TITLE&printable=yes" -O "$TARGETDIR/$ID.html"
-done
-
-echo "</BODY></HTML>" >>$TARGETDIR/index.html

Deleted: arch-wiki-docs/trunk/index.pl
===================================================================
--- arch-wiki-docs/trunk/index.pl	2014-03-21 08:42:00 UTC (rev 108017)
+++ arch-wiki-docs/trunk/index.pl	2014-03-21 08:42:37 UTC (rev 108018)
@@ -1,35 +0,0 @@
-#!/usr/bin/perl -w
-
-use Encode;
-use JSON::XS;
-
-$URL=$ARGV[0];
-
- at ALLPAGES=();
-
-my $pageid;
-my $pagetitle;
-my $from = "";
-my $ret;
-again:
-my $count = 0;
-$cmd="wget --no-check-certificate -q \"$URL/api.php?action=query&list=allpages&aplimit=500&format=json&apfilterredir=nonredirects&apfrom=$from\" -O -";
-#print STDERR $cmd."\n";
-$text=`$cmd`;
-$ret = JSON::XS->new->utf8->decode($text);
-$H = $ret->{query}->{allpages};
-foreach $i (@$H)
-{
-    push @ALLPAGES, encode("UTF-8", "$i->{title}");
-    printf("%08u %s", $i->{pageid}, encode("UTF-8", "$i->{title}\n"));
-    $count++;
-}
-
-if($count == 1)
-{
-    exit 0;
-}
-
- at ALLPAGES = sort @ALLPAGES;
-$from = $ALLPAGES[-1];
-goto again;

Modified: pitivi/trunk/PKGBUILD
===================================================================
--- pitivi/trunk/PKGBUILD	2014-03-21 08:42:00 UTC (rev 108017)
+++ pitivi/trunk/PKGBUILD	2014-03-21 08:42:37 UTC (rev 108018)
@@ -4,7 +4,7 @@
 # Contributor: Gabor Nyekhelyi (n0gabor) <n0gabor at vipmail.hu>
 
 pkgname=pitivi
-pkgver=0.92
+pkgver=0.93
 pkgrel=1
 pkgdesc="Editor for audio/video projects using the GStreamer framework"
 arch=('i686' 'x86_64')
@@ -20,7 +20,7 @@
             'gst-plugins-ugly: additional multimedia codecs')
 install=$pkgname.install
 source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/$pkgver/$pkgname-$pkgver.tar.xz)
-md5sums=('6c84db8a647c9151c3890e9cd15a8fc1')
+md5sums=('27fa7e560b6da0cc8f83466c1346b96e')
 
 build() {
   cd "$srcdir/$pkgname-$pkgver"




More information about the arch-commits mailing list