Bug#476909: suggestions on reorganisation of the stardict package.

2008-05-19 Thread Andrew Lee
Sorry to get back to you so late.

For my understanding, this is an utility to automatically download and
build stardict-dictdata fake packages from http://stardict.sf.net. And
these stardict-dictdata may not DFSG-free.

So I cannot include this script into stardict package, cause it would
make stardict go into contrib. I'd suggest you package this scripts
called 'stardict-package'(not staridct-dicts), and make the fake
stardict-dictdata packages all Provides on 'stardict-dictdata'. I will
make stardict suggests on 'stardict-package' in next upload.

Thanks for you great work.

Cheers,

-Andrew



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#476909: suggestions on reorganisation of the stardict package.

2008-05-19 Thread Andrew Lee
After discussion with a real DD. There are three options:

1) Put the script into /usr/share/doc/stardict/
This way won't make stardict go into contrib.

2) Generate a stardict-nonfree package out of stardict, containing the
script and running it in postinst.
Only one binary package go into contrib and the rest would still in
main. And you can maintain the script, I can add you to the Uploaders
group if you want.

3) Create a new package.

Please make a choose. :)

Cheers,

-Andrew



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#476909: suggestions on reorganisation of the stardict package.

2008-04-24 Thread Dmitry E. Oboukhov
On 02:51 Wed 23 Apr , Andrew Lee wrote:
AL Dmitry E. Oboukhov wrote:
 But I haven't understood from Your answer what we are working on? Is it
 a new stardict-dicts package or shall we add the scripts into starditct?
 
 As far as contrib repository is concerned it seems to me that there's no
 point to move it there (if only stardict-dicts), because the script for
 downloading the dictionaries is only an additional function (which is
 partly included into stardict itself).

AL Sorry, I have been very busy these days for organize a community event.

AL Please feel free to start a new package now. However you have better
AL idea or not, you are welcome to discuss with me. I will be available on
AL IRC, my nickname is AndrewLee.

Unfortunately I don't know English rather well for communicating in IRC
:(

I think it would be perfect to include my scripts in the package
stardict itself and not to But if You are against it then well, 
we'll make a new package.

Have You any desires or comments concerning what You've looked through?





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#476909: suggestions on reorganisation of the stardict package.

2008-04-22 Thread Andrew Lee
Dmitry E. Oboukhov wrote:
 But I haven't understood from Your answer what we are working on? Is it
 a new stardict-dicts package or shall we add the scripts into starditct?
 
 As far as contrib repository is concerned it seems to me that there's no
 point to move it there (if only stardict-dicts), because the script for
 downloading the dictionaries is only an additional function (which is
 partly included into stardict itself).

Sorry, I have been very busy these days for organize a community event.

Please feel free to start a new package now. However you have better
idea or not, you are welcome to discuss with me. I will be available on
IRC, my nickname is AndrewLee.

By the way, there are virtual packages for stardict. You can find them
by $ zgrep stardict
/usr/share/doc/debian-policy/virtual-package-names-list.txt.gz

All the best.

-Andrew



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#476909: suggestions on reorganisation of the stardict package.

2008-04-20 Thread Dmitry E. Oboukhov
Package: stardict
Severity: normal

Hi, Andrew Lee and Anthony Fok!

I use stardict, I like this dictionary very much, but there is a great
discomfort: at every new installation it is necessary to download the
dictionaries from the site http://stardict.sourceforge.net by hand and
to install them.

It would be nice if the deb-package included the dictionaries from this
site, however it is most likely impossible because mostly they will not
correspond to DFSG.

I have a proposal to you:

to modify the package thus it has configure and template scripts for
debconf, which would allow users to choose and install the dictionaries
automatically (dpkg-reconfigure).

I've written a small script (it is attached) which creates a list of
what to download and where from: according to the results of the work of
this script one may generate the menu for choosing). Some time later I
would be able to complete the work on this system [1].

However now I have to choose whether to make a fake package only for
automatisation of downloading the dictionaries for stardict or to work
further on the stardict package.

Here I need your agreement or disagreement about working on the stardict
package: in the first case you'll include the results of my work into
package and add me to the  Uploaders group and in the second one I'll
make a retitle of this bug in ITP: staridct-dicts [1].

Please inform me what is your opinion on this subject.

Sincerely yours, Dmitry

PS: notes:

[1] _example_ of staridct-dicts.deb uploaded to:
http://uvw.ru/debian/unstable/stardict/

#!/usr/bin/perl

use warnings;
use strict;

package MechUTF8;
use base qw(WWW::Mechanize);
use Encode qw(encode decode);

sub content
{
  my $self=shift;
  my $content=$self-SUPER::content(@_);
  
  $self-response-header('Content-Type')=~/charset=([\w\d\-]+)/
and $content=encode(utf8=decode($1=$content));
  return $content;
}


package main;
use URI;
use File::Basename qw(basename);
use Getopt::Std qw(getopts);

my $server=http://stardict.sourceforge.net;;
my $durl=$server/Dictionaries.php;

sub die_if_error($$)
{
  my ($browser, $errtxt)[EMAIL PROTECTED];
  $browser-success and return;
  die sprintf $errtxt, server status: %s\n,
$browser-status;
}

sub usage()
{
  print endusage;
  usage: $0 [OPTIONS]

  OPTIONS:
-h- this helpscreen
-v- print verbose messages
-o file   - save list to file
endusage
  exit -1;
}

getopts('o:hv', \my %opts) or usage;
$opts{h} and usage;
if ($opts{o})
{
  open STDOUT, '', $opts{o}
or die Can not create file $opts{o}: $!\n;
  $|=1;
}

$|=1; select STDERR; $|=1; select STDOUT;
my $browser=new MechUTF8;
$opts{v} and print STDERR Getting $durl ...\n;
$browser-get($durl);
die_if_error $browser, Can not get categories list from $server;

my %ans=
map { m{href=(.*?).*?\s*(.*?)\s*}s; ($2, $server/$1) }
  $browser-content=~m{(a.*?/a)}sgi;
for (sort keys %ans)
{
  unless ($ans{$_}=~m{$server/Dictionaries_})
  {
delete $ans{$_};
next;
  }

  $opts{v} and print STDERR \tGetting $ans{$_} ...\n;
  $browser-get($ans{$_});
  die_if_error $browser, Can not get category `$_';
  my $content=$browser-content;

  for ($content)
  {
s[t([rd]).*?][t$1]sig;
s[\s*(?:/)?\s*(?:font|span|strong|b|b|br).*?][ ]sig;
  }

  my %dlist=
map { $$_[0]=~s[td.*?\s*(.*?)\s*.*][$1]; ($$_[0], $$_[1]) }
grep { $$_[1] !~ /rpm$/i }
map { $$_[1]=~s/\?.*//s; $_ }
map { ($$_[1]=~m[.*a\s*href=(.*?)\s*\s*tarbal]si)?[$$_[0], $1]:() }
map { [ $$_[0], $$_[1] $$_[2] ] }
grep { @$_ == 4  or @$_ == 3 }
map { [ m[(td.*?/td)]sig ] }
  $content=~m{(tr.*?/tr)}sig;
  for my $url (values %dlist)
  {
my $basename=basename(URI-new($url)-path);
$url={file=$basename, url=$url, section=$_};
  }
  
  $opts{v} and
printf STDERR \t\tfound %d tarbal-links for download\n,
  scalar keys %dlist;
  unless (%dlist)
  {
delete $ans{$_};
next;
  }
  
  printf %s\n,
join \t, 
  $dlist{$_}{section}, 
  $_,
  $dlist{$_}{file},
  $dlist{$_}{url} for sort keys %dlist;
}

keys %ans or
  die Can not find categories list in $durl\n;

exit 0;


signature.asc
Description: Digital signature


Bug#476909: suggestions on reorganisation of the stardict package.

2008-04-20 Thread Andrew Lee
Hi Dmitry,

Well done! I'd like to do such thing for long. But it would probably
become contrib, isn't it?

I haven't check all dictionary on stardict's website for a long time. So
I am curious now, does any dictionary on stardict website are DFSG?

Maybe convert exist dictionary in debian main to stardict format is a
better option.

-Andrew



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#476909: suggestions on reorganisation of the stardict package.

2008-04-20 Thread Dmitry E. Oboukhov
AL Well done! I'd like to do such thing for long. But it would probably
AL become contrib, isn't it?

AL I haven't check all dictionary on stardict's website for a long time. So
AL I am curious now, does any dictionary on stardict website are DFSG?

AL Maybe convert exist dictionary in debian main to stardict format is a
AL better option.

But I haven't understood from Your answer what we are working on? Is it
a new stardict-dicts package or shall we add the scripts into starditct?

As far as contrib repository is concerned it seems to me that there's no
point to move it there (if only stardict-dicts), because the script for
downloading the dictionaries is only an additional function (which is
partly included into stardict itself).


signature.asc
Description: Digital signature