/[BackupPC]/trunk/bin/BackupPC_burnArchiveCLI
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/BackupPC_burnArchiveCLI

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 188 by dpavlin, Wed Oct 12 16:49:02 2005 UTC revision 189 by dpavlin, Wed Oct 12 16:49:03 2005 UTC
# Line 62  sub dumpArchive2XML($$$) Line 62  sub dumpArchive2XML($$$)
62          my $output = new IO::File(">$filename");          my $output = new IO::File(">$filename");
63          my $writer = new XML::Writer(OUTPUT=>$output, NEWLINES => 1);          my $writer = new XML::Writer(OUTPUT=>$output, NEWLINES => 1);
64    
65            $writer->pi('xml-stylesheet', 'href="archive.css" type="text/css"');
66    
67          my $files_sql = q{          my $files_sql = q{
68                  SELECT                  SELECT
69                          files.path AS path,                          files.path AS path,
# Line 116  sub dumpArchive2XML($$$) Line 118  sub dumpArchive2XML($$$)
118                  $sth_files->execute($row->{'backup_id'});                  $sth_files->execute($row->{'backup_id'});
119    
120                  delete($row->{'backup_id'});                  delete($row->{'backup_id'});
121                    $row->{'date'} = strftime($t_fmt,gmtime($row->{'date'}));
122    
123                  $writer->startTag( "backup", %{$row} );                  $writer->startTag( "backup", %{$row} );
124    
125                  while (my $row = $sth_files->fetchrow_hashref()) {                  while (my $row = $sth_files->fetchrow_hashref()) {
126                          # convert filetype to string                          # convert filetype to string
127                          $row->{'type'} = BackupPC::Attrib::fileType2Text(undef, $row->{'type'});                          $row->{'type'} = BackupPC::Attrib::fileType2Text(undef, $row->{'type'});
128                            $row->{'date'} = strftime($t_fmt,gmtime($row->{'date'}));
129                          my $path = $row->{'path'}; delete $row->{'path'};                          my $path = $row->{'path'}; delete $row->{'path'};
130    
131                          $writer->startTag("file", %{$row});                          $writer->startTag("file", %{$row});
# Line 269  foreach my $arc (@archives_to_burn) { Line 273  foreach my $arc (@archives_to_burn) {
273    
274          }          }
275    
276          # FIXME add file list in xml and txt and note file          # add file list and note in xml
   
277          dumpArchive2XML($dbh, $dvd_nr, $xml_file);          dumpArchive2XML($dbh, $dvd_nr, $xml_file);
278          print $list "$xml_file\n";          print $list "$xml_file\n";
279    
280            # add css file for archive
281            my $css_file = $Conf{CgiImageDir} . '/archive.css';
282            if (-r $css_file) {
283                    print $list "$css_file\n";
284            } else {
285                    print "WARNING: missing $css_file, not added to iso image!\n";
286            }
287    
288          close($list);          close($list);
289    
290          print "Running mkisofs now for $inc increments...\n";          print "Running mkisofs now for $inc increments...\n";

Legend:
Removed from v.188  
changed lines
  Added in v.189

  ViewVC Help
Powered by ViewVC 1.1.26