<commit_before>package SH::TCSync;

=encoding utf8

=head1 NAME

SH::TCSync - Common methods for handling tc files.

=head1 SYNOPSIS

use SH::TCSync qw(tcsync);
tcsync()


=head1 DESCRIPTION

Synchronize between catalogs and dropbox encrypted file.
Remove duplicated files if any.

=cut

use Carp;
use Data::Dumper;
use autodie;
use Mojo::Base -strict;
use YAML::Tiny;
use IPC::System::Simple qw(system);
use File::Basename;
use File::Find;
use File::Compare;
use Carp 'confess';
use File::Copy qw(move copy);
use FindBin;
use List::MoreUtils qw(uniq any);
use utf8;
use Exporter 'import';
our @EXPORT_OK = qw(mount unmount tcsync fix_duplicated_tcfiles);

our $homedir;
# our $passworddir;
# our $keyfiledir;
# our $trueprog;
# our $tcoptions;
# our $dirsep;
# our $clear;
my $passwordfile = '<PASSWORD>';
my $igoreddirs_rx;
my $basedir;
my $files_hr;

BEGIN {
    push @INC, "$FindBin::Bin/../lib";
    if ( $^O eq 'MSWin32' ) {
        $homedir     = 'c:\privat';
    } else {
        $homedir     = $ENV{HOME};
    }
}

my $configfile = ($ENV{CONFIG_DIR}||$ENV{HOME}.'/etc').'/SH-TCSync.yml';
my $config = YAML::Tiny::LoadFile($configfile);

use SH::ArrayCompare;
say $SH::ArrayCompare::VERSION;
SH::ArrayCompare::compare_arrays('a', ['a','b'], ['b','c']);

use SH::Script qw(ask);

my $passworddir = $config->{passworddir};
my $trueprog    = $config->{truecrypt};
my $dirsep      = $config->{dirsep};
my $tcoptions   = $config->{tcoptions};

my @igoredfiles = ('.kate-swp');
my $dropbox='/usr/bin/dropbox';
#
#   SUBROUTINES
#

=head1 FUNCTIONS

=head2 mount

Mount a tc-file. Put it in an array

=cut

sub mount {
    my $tcfile     = shift;<commit_msg>TCSynk problemer<commit_after>package SH::TCSync;

=encoding utf8

=head1 NAME

SH::TCSync - Common methods for handling tc files.

=head1 SYNOPSIS

use SH::TCSync qw(tcsync);
tcsync()


=head1 DESCRIPTION

Synchronize between catalogs and dropbox encrypted file.
Remove duplicated files if any.

=cut

use Carp;
use Data::Dumper;
use autodie;
use Mojo::Base -strict;
use YAML::Tiny;
use IPC::System::Simple qw(system);
use File::Basename;
use File::Find;
use File::Compare;
use Carp 'confess';
use File::Copy qw(move copy);
use FindBin;
use List::MoreUtils qw(uniq any);
use utf8;
use Exporter 'import';
our @EXPORT_OK = qw(mount unmount tcsync fix_duplicated_tcfiles);

our $homedir;
# our $passworddir;
# our $keyfiledir;
# our $trueprog;
# our $tcoptions;
# our $dirsep;
# our $clear;
my $passwordfile = '<PASSWORD>';
my $igoreddirs_rx;
my $basedir;
my $files_hr;

BEGIN {
    push @INC, "$FindBin::Bin/../lib";
    if ( $^O eq 'MSWin32' ) {
        $homedir     = 'c:\privat';
    } else {
        $homedir     = $ENV{HOME};
    }
}

my $configfile = ($ENV{CONFIG_DIR}||$ENV{HOME}.'/etc').'/SH-TCSync.yml';
my $config = YAML::Tiny::LoadFile($configfile);

use SH::ArrayCompare;
say $SH::ArrayCompare::VERSION;
SH::ArrayCompare::compare_arrays('a', ['a','b'], ['b','c']);

use SH::Script qw(ask);

my $passworddir = $config->{passworddir};
my $trueprog    = $config->{truecrypt};
my $dirsep      = $config->{dirsep};
my $tcoptions   = $config->{tcoptions};

my @igoredfiles = ('.kate-swp');
my $dropbox=$ENV{HOME}.'/bin/dropbox.py';
#
#   SUBROUTINES
#

=head1 FUNCTIONS

=head2 mount

Mount a tc-file. Put it in an array

=cut

sub mount {
    my $tcfile     = shift;
{'fraction_non_alphanumeric': 0.16811768237766436, 'fraction_numerical': 0.005403782647853498, 'mean_word_length': 4.435562805872757, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3550793', 'n_tokens_mistral': 1335, 'n_tokens_neox': 1291, 'n_words': 332}