浏览代码

set primary page

master
Pascal Gloor 5 年前
父节点
当前提交
66ce1896bd
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7
    0
      bin/autodoc_process.pl

+ 7
- 0
bin/autodoc_process.pl 查看文件

@@ -18,6 +18,7 @@ my $queuedir = $conf->{path}{global}.'/'.$conf->{path}{queue};
my $originaldir = $conf->{path}{global}.'/'.$conf->{path}{original};

my %langid;
my %primary;
my $q = sqlquery($dbh, "SELECT id,short FROM lang");
while(my($id,$short)=$q->fetchrow_array()) { $langid{$short}=$id; }

@@ -51,6 +52,12 @@ foreach my $file ( readdir(Q) ) {
print "new page id $pageid\n";
update_page_status($pageid, 'inprogress');

if ( !exists $primary{$docid} ) {
$primary{$docid}=undef;
sqlquery($dbh, "CALL set_primary_page(?)",$pageid);
}


print "create original page jpeg $pageid.jpeg";
system(sprintf("pdftoppm -f %s -l %s -r 300 -jpeg -singlefile %s/%s %s/%s", $page+1, $page+1, $queuedir, $file, $originaldir, $pageid));
system(sprintf("mv %s/%s.jpg %s/%s.jpeg",

正在加载...
取消
保存