Skip to content
Snippets Groups Projects
Select Git revision
  • 81bec38c24787662a504d2384aaa187d5cd533b6
  • master default protected
  • replication_test
  • dev protected
  • release-1.10 protected
  • 556-usage-statistics
  • 553-semantic-recommendation-2
  • 553-semantic-recommendation
  • release-1.9 protected
  • 551-init-broker-service-permissions
  • 549-test-oai-pmh
  • 545-saving-multiple-times-breaks-pid-metadata
  • 499-standalone-compute-service-2
  • 539-load-tests
  • hotfix/helm-chart
  • luca_ba_new_interface
  • 534-bug-when-adding-access-to-user-that-is-not-registered-at-dashboard-service
  • release-1.8 protected
  • 533-integrate-semantic-recommendation
  • feature/openshift
  • 518-spark-doesn-t-map-the-headers-correct
  • v1.10.4 protected
  • v1.10.3 protected
  • v1.10.2 protected
  • v1.10.1 protected
  • v1.10.0-rc13 protected
  • v1.10.0-rc12 protected
  • v1.10.0-rc11 protected
  • v1.10.0-rc10 protected
  • v1.10.0-rc9 protected
  • v1.10.0-rc8 protected
  • v1.10.0-rc7 protected
  • v1.10.0-rc6 protected
  • v1.10.0-rc5 protected
  • v1.10.0-rc4 protected
  • v1.10.0-rc3 protected
  • v1.10.0-rc2 protected
  • v1.10.0rc1 protected
  • v1.10.0rc0 protected
  • v1.10.0 protected
  • v1.9.3 protected
41 results

determine_dt.py

Blame
  • Directory.pm 3.98 KiB
    #
    # scan directory with note files in Tomboy format
    #
    
    =head1 NAME
    
      Tomboy::Directory
    
    =head1 SYNOPSIS
    
    =head1 DESCRIPTION
    
    process a directory containing note files in Tomboy format
    
    =head1 SYNOPSIS
    
      my $tb_dir= new Tomboy::Directory;
      $tb_toc= $tb_dir->scan_dir ($directory);
    
    =cut
    
    package Tomboy::Directory;
    
    use strict;
    
    use Data::Dumper;
    $Data::Dumper::Indent= 1;
    
    use Tomboy::Note::Simple;
    
    # attributes read from the note itself or from the filesystem
    my @TB_note_attrs= qw(title create-date last-change-date last-metadata-change-date notebook is_template fnm);
    my @TB_meta_attrs= qw(uuid mtime size ino);
    =head1 METHODS
    
    =head2 my $tb_dir= new Tomboy::Directory()
    
    creates a new directory object
    
    =cut
    
    sub new
    {
      my $class= shift;
      my %par= @_;
    
      my $obj= {};
      bless $obj, $class;
    
      foreach my $par (keys %par)
      {
        $obj->{$par}= $par{$par};
        if ($par eq 'dir') { $obj->scan_dir ($par{$par}) }
      }
    
      $obj;
    }
    
    =head2 $tb_dir->scan_dir ($directory, ($rows, $quick]))
    
    Scan named directory for Tomboy notes and extract key features using
    Tomboy::Note::Simple.  These features are placed into a record and all
    these records are returned as array reference.
    
    Optionally pass an array reference of such records as $rows and when
    $quick has a true value, the note files are only processed when they
    do not appear to be modified, otherwise the earlier record is passed in
    the result set.
    
    =cut