Merge branch 'development' into 'master'

Merge development

Closes #40, #14, #27, #33, #39, and #9

See merge request !19
This commit is contained in:
Luc Didry
2017-06-13 19:57:50 +02:00
55 changed files with 5934 additions and 3042 deletions
+5 -2
View File
@@ -1,6 +1,8 @@
*.swp
lutim.conf
lutim.db
*.db
*.db-shm
*.db-wal
script/hypnotoad.pid
local/*
files/*
@@ -10,5 +12,6 @@ themes/*
!themes/default/*
themes/default/templates/data.html.ep
themes/default/templates/raw.html.ep
themes/default/templates/stats.json.ep
themes/default/public/packed/*
tmp/
tmp/*
+120
View File
@@ -0,0 +1,120 @@
image: hatsoftwares/test-ci:latest
stages:
- sqlite
- postgresql
before_script:
- carton install
- rm -f *db
sqlite1:
stage: sqlite
cache:
key: "$CI_BUILD_REF_NAME"
untracked: true
paths:
- local
script:
- make podcheck
- MOJO_CONFIG=t/sqlite1.conf make test-sqlite
- MOJO_CONFIG=t/sqlite1.conf make watch
- MOJO_CONFIG=t/sqlite1.conf make cleanbdd
- MOJO_CONFIG=t/sqlite1.conf make cleanfiles
- MOJO_CONFIG=t/sqlite1.conf make stats
sqlite2:
stage: sqlite
cache:
key: "$CI_BUILD_REF_NAME"
untracked: true
paths:
- local
script:
- make podcheck
- MOJO_CONFIG=t/sqlite2.conf make minion &
- MOJO_CONFIG=t/sqlite2.conf make test-sqlite
- MOJO_CONFIG=t/sqlite2.conf make watch
- MOJO_CONFIG=t/sqlite2.conf make cleanbdd
- MOJO_CONFIG=t/sqlite2.conf make cleanfiles
- MOJO_CONFIG=t/sqlite2.conf make stats
sqlite3:
stage: sqlite
cache:
key: "$CI_BUILD_REF_NAME"
untracked: true
paths:
- local
script:
- make podcheck
- service postgresql restart
- sleep 10
- service postgresql status
- make create-pg-test-db
- MOJO_CONFIG=t/sqlite3.conf make minion &
- sleep 3
- MOJO_CONFIG=t/sqlite3.conf make test-sqlite
- MOJO_CONFIG=t/sqlite3.conf make watch
- MOJO_CONFIG=t/sqlite3.conf make cleanbdd
- MOJO_CONFIG=t/sqlite3.conf make cleanfiles
- MOJO_CONFIG=t/sqlite3.conf make stats
tags:
- Debian
- Jessie
postgresql1:
stage: postgresql
cache:
key: "$CI_BUILD_REF_NAME"
untracked: true
paths:
- local
script:
- make podcheck
- service postgresql restart
- sleep 10
- service postgresql status
- make create-pg-test-db
- MOJO_CONFIG=t/postgresql1.conf make test-pg
- MOJO_CONFIG=t/postgresql1.conf make watch
- MOJO_CONFIG=t/postgresql1.conf make cleanbdd
- MOJO_CONFIG=t/postgresql1.conf make cleanfiles
- MOJO_CONFIG=t/postgresql1.conf make stats
postgresql2:
stage: postgresql
cache:
key: "$CI_BUILD_REF_NAME"
untracked: true
paths:
- local
script:
- make podcheck
- service postgresql restart
- sleep 10
- service postgresql status
- make create-pg-test-db
- MOJO_CONFIG=t/postgresql2.conf make minion &
- sleep 3
- MOJO_CONFIG=t/postgresql2.conf make test-pg
- MOJO_CONFIG=t/postgresql2.conf make watch
- MOJO_CONFIG=t/postgresql2.conf make cleanbdd
- MOJO_CONFIG=t/postgresql2.conf make cleanfiles
- MOJO_CONFIG=t/postgresql2.conf make stats
postgresql3:
stage: postgresql
cache:
key: "$CI_BUILD_REF_NAME"
untracked: true
paths:
- local
script:
- make podcheck
- service postgresql restart
- sleep 10
- service postgresql status
- make create-pg-test-db
- MOJO_CONFIG=t/postgresql3.conf make minion &
- sleep 3
- MOJO_CONFIG=t/postgresql3.conf make test-pg
- MOJO_CONFIG=t/postgresql3.conf make watch
- MOJO_CONFIG=t/postgresql3.conf make cleanbdd
- MOJO_CONFIG=t/postgresql3.conf make cleanfiles
- MOJO_CONFIG=t/postgresql3.conf make stats
tags:
- Debian
- Jessie
+1
View File
@@ -14,3 +14,4 @@
* Laura Arjona Reina (<https://wiki.debian.org/LauraArjona>), spanish translation
* Thor77 (<http://thor77.org>), german translation, among other things
* Quentin Pagès, occitan translation
* Alexis Clairet (<https://github.com/Turboconnard>), paste image to upload ability
+16
View File
@@ -2,6 +2,22 @@ Revision history for Lutim
0.8 2017-?
- Improve statistics page
- Add database abstraction layer (#42)
- Add PostgreSQL support (#42)
- Asks for Mojolicious 7.31 minimum (to install it: `carton update`)
- Add Liberapay and Tipeee buttons
- Remove Flattr button
- Handle MOJO_CONFIG env variable (#44)
- Fix bug #39
- Add gallery constructor to "my files" list (#33)
- Handle too much images in zip download URL (#27)
- LocalStorage is now updated if an image's delay is modified
- Allow user to paste image from clipboard to upload images (#14 and !5)
- Fix #40
- Add stats in JSON format (GET /stats.json)
- Add Cache-control headers for static files
- Put almost all js/css stuff outside templates
- Allow to use Minion to increment counter (#43)
0.7.1 2016-06-21
- Fix dependency bug
+46 -7
View File
@@ -1,4 +1,4 @@
EXTRACTFILES=utilities/locales_files.txt
EXTRACTDIR=-D lib -D themes/default/templates
EN=themes/default/lib/Lutim/I18N/en.po
FR=themes/default/lib/Lutim/I18N/fr.po
DE=themes/default/lib/Lutim/I18N/de.po
@@ -7,19 +7,58 @@ OC=themes/default/lib/Lutim/I18N/oc.po
XGETTEXT=carton exec local/bin/xgettext.pl
CARTON=carton exec
LUTIM=script/lutim
REAL_LUTIM=script/application
locales:
$(XGETTEXT) -W -f $(EXTRACTFILES) -o $(EN) 2>/dev/null
$(XGETTEXT) -W -f $(EXTRACTFILES) -o $(FR) 2>/dev/null
$(XGETTEXT) -W -f $(EXTRACTFILES) -o $(DE) 2>/dev/null
$(XGETTEXT) -W -f $(EXTRACTFILES) -o $(ES) 2>/dev/null
$(XGETTEXT) -W -f $(EXTRACTFILES) -o $(OC) 2>/dev/null
$(XGETTEXT) $(EXTRACTDIR) -o $(EN) 2>/dev/null
$(XGETTEXT) $(EXTRACTDIR) -o $(FR) 2>/dev/null
$(XGETTEXT) $(EXTRACTDIR) -o $(DE) 2>/dev/null
$(XGETTEXT) $(EXTRACTDIR) -o $(ES) 2>/dev/null
$(XGETTEXT) $(EXTRACTDIR) -o $(OC) 2>/dev/null
podcheck:
podchecker lib/Lutim/DB/Image.pm
test-sqlite:
$(CARTON) $(REAL_LUTIM) test
test-pg:
$(CARTON) $(REAL_LUTIM) test
test: podcheck test-sqlite test-pg
clean:
rm -rf lutim.db files/
dev:
rmassets:
rm -rf themes/default/public/packed/*
dev: rmassets
$(CARTON) morbo $(LUTIM) --listen http://0.0.0.0:3000 --watch lib/ --watch script/ --watch themes/ --watch lutim.conf
devlog:
multitail log/development.log
prod: rmassets
$(CARTON) hypnotoad -f $(LUTIM)
prodlog:
multitail log/production.log
minion:
$(CARTON) $(REAL_LUTIM) minion worker
create-pg-test-db:
sudo -u postgres psql -f t/create-pg-testdb.sql
stats:
$(CARTON) $(LUTIM) cron stats -m production
watch:
$(CARTON) $(LUTIM) cron watch -m production
cleanfiles:
$(CARTON) $(LUTIM) cron cleanfiles -m production
cleanbdd:
$(CARTON) $(LUTIM) cron cleanbdd -m production
+6 -2
View File
@@ -1,13 +1,17 @@
requires 'Mojolicious';
requires 'Mojolicious', '>= 7.31';
requires 'EV';
requires 'IO::Socket::SSL';
requires 'Data::Validate::URI';
requires 'Net::Domain::TLD', '>= 1.73'; # Must have the last version to handle (at least) .xyz and .link
requires 'Mojo::Pg';
requires 'Mojolicious::Plugin::I18N';
requires 'Mojolicious::Plugin::AssetPack';
requires 'Mojolicious::Plugin::DebugDumperHelper';
requires 'Mojolicious::Plugin::PgURLHelper';
requires "Minion", "== 4.06";
requires 'Minion::Backend::SQLite', "== 0.009";
requires 'CSS::Minifier::XS';
requires 'JavaScript::Minifier::XS';
requires 'Mojolicious::Plugin::DebugDumperHelper';
requires 'ORLite';
requires 'Text::Unidecode';
requires 'DateTime';
+1372 -1167
View File
File diff suppressed because it is too large Load Diff
+55 -228
View File
@@ -1,9 +1,7 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package Lutim;
use Mojo::Base 'Mojolicious';
use Mojo::Util qw(quote);
use LutimModel;
use Crypt::CBC;
use Data::Entropy qw(entropy_source);
use Lutim::DB::Image;
use vars qw($im_loaded);
BEGIN {
@@ -25,6 +23,7 @@ sub startup {
$self->{wait_for_it} = {};
$self->plugin('DebugDumperHelper');
$self->plugin('PgURLHelper');
my $config = $self->plugin('Config', {
default => {
@@ -42,6 +41,13 @@ sub startup {
crypto_key_length => 8,
thumbnail_size => 100,
theme => 'default',
dbtype => 'sqlite',
max_files_in_zip => 15,
minion => {
enabled => 0,
dbtype => 'sqlite',
db_path => 'minion.db'
},
}
});
@@ -70,228 +76,30 @@ sub startup {
$self->plugin('AssetPack' => { pipes => [qw(Combine)] });
# Helpers
$self->helper(
render_file => sub {
my $c = shift;
my ($filename, $path, $mediatype, $dl, $expires, $nocache, $key, $thumb) = @_;
$self->plugin('Lutim::Plugin::Helpers');
$dl = 'attachment' if ($mediatype =~ m/svg/);
$filename = quote($filename);
# Minion
if ($config->{minion}->{enabled}) {
$self->config->{minion}->{dbtype} = 'sqlite' unless defined $config->{minion}->{dbtype};
if ($config->{minion}->{dbtype} eq 'sqlite') {
$self->config('minion')->{db_path} = 'minion.db' unless defined $config->{minion}->{db_path};
$self->plugin('Minion' => { SQLite => 'sqlite:'.$config->{minion}->{db_path} });
} elsif ($config->{minion}->{dbtype} eq 'postgresql') {
$self->plugin('Minion' => { Pg => $self->pg_url($config->{minion}->{'pgdb'}) });
}
$self->app->minion->add_task(
accessed => sub {
my $job = shift;
my $short = $job->args->[0];
my $time = $job->args->[1];
my $asset;
unless (-f $path && -r $path) {
$c->app->log->error("Cannot read file [$path]. error [$!]");
$c->flash(
msg => $c->l('Unable to find the image: it has been deleted.')
);
return 500;
my $img = Lutim::DB::Image->new(app => $job->app, short => $short);
$img->accessed($time) if $img->path;
}
);
}
$mediatype =~ s/x-//;
my $headers = Mojo::Headers->new();
if ($nocache) {
$headers->add('Cache-Control' => 'no-cache, no-store, max-age=0, must-revalidate');
} else {
$headers->add('Expires' => $expires);
}
$headers->add('Content-Type' => $mediatype.';name='.$filename);
$headers->add('Content-Disposition' => $dl.';filename='.$filename);
$c->res->content->headers($headers);
if ($key) {
$asset = $c->decrypt($key, $path);
} else {
$asset = Mojo::Asset::File->new(path => $path);
}
if (defined $thumb && $im_loaded && $mediatype ne 'image/svg+xml' && $mediatype !~ m#image/(x-)?xcf# && $mediatype ne 'image/webp') { # ImageMagick don't work in Debian with svg (for now?)
my $im = Image::Magick->new;
$im->BlobToImage($asset->slurp);
# Create the thumbnail
$im->Resize(geometry=>'x'.$c->config('thumbnail_size'));
# Replace the asset with the thumbnail
$asset = Mojo::Asset::Memory->new->add_chunk($im->ImageToBlob());
}
$c->res->content->asset($asset);
$headers->add('Content-Length' => $asset->size);
return $c->rendered(200);
}
);
$self->helper(
ip => sub {
my $c = shift;
my $ip_only = shift || 0;
my $proxy = $c->req->headers->header('X-Forwarded-For');
my $ip = ($proxy) ? $proxy : $c->tx->remote_address;
my $remote_port = (defined($c->req->headers->header('X-Remote-Port'))) ? $c->req->headers->header('X-Remote-Port') : $c->tx->remote_port;
return ($ip_only) ? $ip : "$ip remote port:$remote_port";
}
);
$self->helper(
provisioning => sub {
my $c = shift;
# Create some short patterns for provisioning
if (LutimModel::Lutim->count('WHERE path IS NULL') < $c->config->{provisioning}) {
for (my $i = 0; $i < $c->config->{provis_step}; $i++) {
if (LutimModel->begin) {
my $short;
do {
$short= $c->shortener($c->config->{length});
} while (LutimModel::Lutim->count('WHERE short = ?', $short) || $short eq 'about' || $short eq 'stats' || $short eq 'd' || $short eq 'm' || $short eq 'gallery' || $short eq 'zip' || $short eq 'infos');
LutimModel::Lutim->create(
short => $short,
counter => 0,
enabled => 1,
delete_at_first_view => 0,
delete_at_day => 0,
mod_token => $c->shortener($c->config->{token_length})
);
LutimModel->commit;
}
}
}
}
);
$self->helper(
shortener => sub {
my $c = shift;
my $length = shift;
my @chars = ('a'..'z','A'..'Z','0'..'9');
my $result = '';
foreach (1..$length) {
$result .= $chars[entropy_source->get_int(scalar(@chars))];
}
return $result;
}
);
$self->helper(
stop_upload => sub {
my $c = shift;
if (-f 'stop-upload' || -f 'stop-upload.manual') {
$c->stash(
stop_upload => $c->l('Uploading is currently disabled, please try later or contact the administrator (%1).', $config->{contact})
);
return 1;
}
return 0;
}
);
$self->helper(
max_delay => sub {
my $c = shift;
return $c->config->{max_delay} if ($c->config->{max_delay} >= 0);
warn "max_delay set to a negative value. Default to 0.";
return 0;
}
);
$self->helper(
default_delay => sub {
my $c = shift;
return $c->config->{default_delay} if ($c->config->{default_delay} >= 0);
warn "default_delay set to a negative value. Default to 0.";
return 0;
}
);
$self->helper(
is_selected => sub {
my $c = shift;
my $num = shift;
return ($num == $c->default_delay) ? 'selected="selected"' : '';
}
);
$self->helper(
crypt => sub {
my $c = shift;
my $upload = shift;
my $filename = shift;
my $key = $c->shortener($c->config('crypto_key_length'));
my $cipher = Crypt::CBC->new(
-key => $key,
-cipher => 'Blowfish',
-header => 'none',
-iv => 'dupajasi'
);
$cipher->start('encrypting');
my $crypt_asset = Mojo::Asset::File->new;
$crypt_asset->add_chunk($cipher->crypt($upload->slurp));
$crypt_asset->add_chunk($cipher->finish);
my $crypt_upload = Mojo::Upload->new;
$crypt_upload->filename($filename);
$crypt_upload->asset($crypt_asset);
return ($crypt_upload, $key);
}
);
$self->helper(
decrypt => sub {
my $c = shift;
my $key = shift;
my $file = shift;
my $cipher = Crypt::CBC->new(
-key => $key,
-cipher => 'Blowfish',
-header => 'none',
-iv => 'dupajasi'
);
$cipher->start('decrypting');
my $decrypt_asset = Mojo::Asset::File->new;
open(my $f, "<",$file) or die "Unable to read encrypted file: $!";
binmode $f;
while (read($f, my $buffer,1024)) {
$decrypt_asset->add_chunk($cipher->crypt($buffer));
}
$decrypt_asset->add_chunk($cipher->finish) ;
return $decrypt_asset;
}
);
$self->helper(
delete_image => sub {
my $c = shift;
my $image = shift;
unlink $image->path();
$image->update(enabled => 0);
}
);
# Hooks
$self->hook(
before_dispatch => sub {
my $c = shift;
@@ -328,15 +136,20 @@ sub startup {
delete @{$wait_for_it}{grep { time - $wait_for_it->{$_} > $c->config->{anti_flood_delay} } keys %{$wait_for_it}} if (defined($wait_for_it));
}
);
$self->hook(after_static => sub {
my $c = shift;
$c->res->headers->cache_control('max-age=2592000, must-revalidate');
});
$self->asset->store->paths($self->static->paths);
$self->asset->process('index.css' => ('css/bootstrap.min.css', 'css/fontello-embedded.css', 'css/animation.css', 'css/uploader.css', 'css/hennypenny.css', 'css/lutim.css', 'css/markdown.css'));
$self->asset->process('stats.css' => ('css/bootstrap.min.css', 'css/fontello-embedded.css', 'css/morris-0.4.3.min.css', 'css/hennypenny.css', 'css/lutim.css'));
$self->asset->process('about.css' => ('css/bootstrap.min.css', 'css/fontello-embedded.css', 'css/hennypenny.css', 'css/lutim.css'));
$self->asset->process('index.css' => ('css/bootstrap.min.css', 'css/fontello-embedded.css', 'css/animation.css', 'css/uploader.css', 'css/hennypenny.css', 'css/lutim.css', 'css/markdown.css'));
$self->asset->process('stats.css' => ('css/bootstrap.min.css', 'css/fontello-embedded.css', 'css/morris-0.4.3.min.css', 'css/hennypenny.css', 'css/lutim.css'));
$self->asset->process('about.css' => ('css/bootstrap.min.css', 'css/fontello-embedded.css', 'css/hennypenny.css', 'css/lutim.css'));
$self->asset->process('gallery.css' => ('/gallery/css/unite-gallery.css', '/gallery/themes/default/ug-theme-default.css'));
$self->asset->process('index.js' => ('js/jquery-2.1.0.min.js', 'js/bootstrap.min.js', 'js/lutim.js', 'js/dmuploader.min.js'));
$self->asset->process('stats.js' => ('js/jquery-2.1.0.min.js', 'js/bootstrap.min.js', 'js/lutim.js', 'js/raphael-min.js', 'js/morris-0.4.3.min.js', 'js/stats.js'));
$self->asset->process('freeze.js' => ('js/jquery-2.1.0.min.js', 'js/freezeframe.min.js'));
$self->asset->process('index.js' => ('js/bootstrap.min.js', 'js/lutim.js', 'js/dmuploader.min.js'));
$self->asset->process('stats.js' => ('js/bootstrap.min.js', 'js/lutim.js', 'js/raphael-min.js', 'js/morris-0.4.3.min.js', 'js/stats.js'));
$self->asset->process('freeze.js' => ('js/jquery-2.1.0.min.js', 'js/freezeframe.min.js'));
$self->defaults(layout => 'default');
@@ -367,6 +180,20 @@ sub startup {
to('Controller#stats')->
name('stats');
$r->get('/partial/:file' => sub {
my $c = shift;
$c->render(
template => 'partial/'.$c->param('file'),
format => 'js',
layout => undef,
d => {
delay_0 => $c->l('no time limit'),
delay_1 => $c->l('24 hours'),
delay_365 => $c->l('1 year')
}
);
})->name('partial');
$r->get('/gallery' => sub {
shift->render(
template => 'gallery',
+1
View File
@@ -1,3 +1,4 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package Lutim::Command::cron;
use Mojo::Base 'Mojolicious::Commands';
+15 -8
View File
@@ -1,7 +1,8 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package Lutim::Command::cron::cleanbdd;
use Mojo::Base 'Mojolicious::Command';
use LutimModel;
use Mojo::Util qw(slurp decode);
use Mojo::File;
use Lutim::DB::Image;
use FindBin qw($Bin);
use File::Spec qw(catfile);
@@ -11,20 +12,26 @@ has usage => sub { shift->extract_usage };
sub run {
my $c = shift;
my $cfile = Mojo::File->new($Bin, '..' , 'lutim.conf');
if (defined $ENV{MOJO_CONFIG}) {
$cfile = Mojo::File->new($ENV{MOJO_CONFIG});
unless (-e $cfile->to_abs) {
$cfile = Mojo::File->new($Bin, '..', $ENV{MOJO_CONFIG});
}
}
my $config = $c->app->plugin('Config', {
file => File::Spec->catfile($Bin, '..' ,'lutim.conf'),
file => $cfile,
default => {
keep_ip_during => 365,
dbtype => 'sqlite',
}
});
my $separation = time() - $config->{keep_ip_during} * 86400;
LutimModel->do(
'UPDATE lutim SET created_by = "" WHERE path IS NOT NULL AND created_at < ?',
{},
$separation
);
my $dbi = Lutim::DB::Image->new(app => $c->app);
$dbi->clean_ips_until($separation);
}
=encoding utf8
+30 -15
View File
@@ -1,8 +1,9 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package Lutim::Command::cron::cleanfiles;
use Mojo::Base 'Mojolicious::Command';
use LutimModel;
use Mojo::File;
use Lutim::DB::Image;
use Lutim;
use Mojo::Util qw(slurp decode);
use FindBin qw($Bin);
use File::Spec qw(catfile);
@@ -11,26 +12,40 @@ has usage => sub { shift->extract_usage };
sub run {
my $c = shift;
my $l = Lutim->new;
my $time = time();
my @images = LutimModel::Lutim->select('WHERE enabled = 1 AND (delete_at_day * 86400) < (? - created_at) AND delete_at_day != 0', $time);
for my $image (@images) {
$l->app->delete_image($image);
my $cfile = Mojo::File->new($Bin, '..' , 'lutim.conf');
if (defined $ENV{MOJO_CONFIG}) {
$cfile = Mojo::File->new($ENV{MOJO_CONFIG});
unless (-e $cfile->to_abs) {
$cfile = Mojo::File->new($Bin, '..', $ENV{MOJO_CONFIG});
}
}
my $config = $c->app->plugin('Config', {
file => File::Spec->catfile($Bin, '..' ,'lutim.conf'),
file => $cfile,
default => {
dbtype => 'sqlite',
}
});
if (defined($config->{delete_no_longer_viewed_files}) && $config->{delete_no_longer_viewed_files} > 0) {
$time = time() - $config->{delete_no_longer_viewed_files} * 86400;
@images = LutimModel::Lutim->select('WHERE enabled = 1 AND last_access_at < ?', $time);
my $l = Lutim->new;
for my $image (@images) {
$l->app->delete_image($image);
my $dbi = Lutim::DB::Image->new(app => $c->app);
$dbi->get_images_to_clean()->each(
sub {
my ($img, $num) = @_;
$l->app->delete_image($img);
}
);
if (defined($config->{delete_no_longer_viewed_files}) && $config->{delete_no_longer_viewed_files} > 0) {
my $time = time() - $config->{delete_no_longer_viewed_files} * 86400;
$dbi->get_no_longer_viewed_files($time)->each(
sub {
my ($img, $num) = @_;
$l->app->delete_image($img);
}
);
}
}
+81 -30
View File
@@ -1,11 +1,15 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package Lutim::Command::cron::stats;
use Mojo::Base 'Mojolicious::Command';
use LutimModel;
use Mojo::DOM;
use Mojo::Util qw(slurp spurt encode);
use Mojo::Util qw(encode);
use Mojo::File;
use Mojo::JSON qw(encode_json);
use Lutim::DB::Image;
use DateTime;
use FindBin qw($Bin);
use File::Spec qw(catfile);
use POSIX;
has description => 'Generate statistics about Lutim.';
has usage => sub { shift->extract_usage };
@@ -13,11 +17,19 @@ has usage => sub { shift->extract_usage };
sub run {
my $c = shift;
my $cfile = Mojo::File->new($Bin, '..' , 'lutim.conf');
if (defined $ENV{MOJO_CONFIG}) {
$cfile = Mojo::File->new($ENV{MOJO_CONFIG});
unless (-e $cfile->to_abs) {
$cfile = Mojo::File->new($Bin, '..', $ENV{MOJO_CONFIG});
}
}
my $config = $c->app->plugin('Config', {
file => File::Spec->catfile($Bin, '..' ,'lutim.conf'),
theme => 'default',
file => $cfile,
default => {
stats_day_num => 365
theme => 'default',
stats_day_num => 365,
dbtype => 'sqlite'
}
});
@@ -26,7 +38,10 @@ sub run {
$config->{theme} = 'default';
$template = 'themes/'.$config->{theme}.'/templates/data.html.ep.template';
}
my $text = slurp($template);
my $stats = {};
my $text = Mojo::File->new($template)->slurp;
my $dom = Mojo::DOM->new($text);
my $thead_tr = $dom->at('table thead tr');
my $tbody_tr = $dom->at('table tbody tr');
@@ -35,18 +50,28 @@ sub run {
my $separation = time() - $config->{stats_day_num} * 86400;
my %data;
for my $img (LutimModel::Lutim->select('WHERE path IS NOT NULL AND created_at >= ?', $separation)) {
my $time = DateTime->from_epoch(epoch => $img->created_at);
my ($year, $month, $day) = ($time->year(), $time->month(), $time->day());
my $img = Lutim::DB::Image->new(app => $c->app);
my $sca = $img->select_created_after($separation);
if (defined($data{$year}->{$month}->{$day})) {
$data{$year}->{$month}->{$day} += 1;
} else {
$data{$year}->{$month}->{$day} = 1;
$stats->{total} = $img->count_not_empty;
$stats->{average} = floor($sca->size / $config->{stats_day_num}) if $config->{stats_day_num};
$stats->{for_days} = $config->{stats_day_num};
$sca->each(
sub {
my ($e, $num) = @_;
my $time = DateTime->from_epoch(epoch => $e->created_at);
my ($year, $month, $day) = ($time->year(), $time->month(), $time->day());
if (defined($data{$year}->{$month}->{$day})) {
$data{$year}->{$month}->{$day} += 1;
} else {
$data{$year}->{$month}->{$day} = 1;
}
}
}
);
my $total = LutimModel::Lutim->count('WHERE path IS NOT NULL AND created_at < ?', $separation);
my $total = $img->count_created_before($separation);
for my $year (sort {$a <=> $b} keys %data) {
for my $month (sort {$a <=> $b} keys %{$data{$year}}) {
for my $day (sort {$a <=> $b} keys %{$data{$year}->{$month}}) {
@@ -58,33 +83,58 @@ sub run {
}
}
my $moy = $total / $config->{stats_day_num};
# Raw datas
my $template2 = 'themes/'.$config->{theme}.'/templates/raw.html.ep.template';
unless (-e $template2) {
$config->{theme} = 'default';
$template = 'themes/'.$config->{theme}.'/templates/raw.html.ep.template';
}
my $text2 = slurp($template2);
my $text2 = Mojo::File->new($template2)->slurp;
my $dom2 = Mojo::DOM->new($text2);
my $raw = $dom2->at('table tbody');
my $raw_foot = $dom2->at('table tfoot');
my $unlimited_enabled = LutimModel::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = 0 AND enabled = 1');
my $unlimited_disabled = LutimModel::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = 0 AND enabled = 0');
my $day_enabled = LutimModel::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = 1 AND enabled = 1');
my $day_disabled = LutimModel::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = 1 AND enabled = 0');
my $week_enabled = LutimModel::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = 7 AND enabled = 1');
my $week_disabled = LutimModel::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = 7 AND enabled = 0');
my $month_enabled = LutimModel::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = 30 AND enabled = 1');
my $month_disabled = LutimModel::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = 30 AND enabled = 0');
my $year_enabled = LutimModel::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = 365 AND enabled = 1');
my $year_disabled = LutimModel::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = 365 AND enabled = 0');
my $year_disabled_in_month = LutimModel::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = 365 AND enabled = 0 AND created_at < ?', time - 30 * 86400);
my $unlimited_enabled = $img->count_delete_at_day_endis(0, 1);
my $unlimited_disabled = $img->count_delete_at_day_endis(0, 0);
my $day_enabled = $img->count_delete_at_day_endis(1, 1);
my $day_disabled = $img->count_delete_at_day_endis(1, 0);
my $week_enabled = $img->count_delete_at_day_endis(7, 1);
my $week_disabled = $img->count_delete_at_day_endis(7, 0);
my $month_enabled = $img->count_delete_at_day_endis(30, 1);
my $month_disabled = $img->count_delete_at_day_endis(30, 0);
my $year_enabled = $img->count_delete_at_day_endis(365, 1);
my $year_disabled = $img->count_delete_at_day_endis(365, 0);
my $year_disabled_in_month = $img->count_delete_at_day_endis(365, 1, time - 335 * 86400);
$stats->{unlimited} = {
enabled => $unlimited_enabled,
disabled => $unlimited_disabled
};
$stats->{day} = {
enabled => $day_enabled,
disabled => $day_disabled
};
$stats->{week} = {
enabled => $week_enabled,
disabled => $week_disabled
};
$stats->{month} = {
enabled => $month_enabled,
disabled => $month_disabled
};
$stats->{year} = {
enabled => $year_enabled,
disabled => $year_disabled
};
my $year_disabled_in_month_pct = ($year_enabled != 0) ? " (".sprintf('%.2f', $year_disabled_in_month/$year_enabled)."%)" : '';
$raw->append_content("\n<tr><td><%= \$raw[4] %></td><td>".$unlimited_enabled."</td><td>".$unlimited_disabled."</td><td>ø</td></tr>\n");
$raw->append_content("<tr><td><%= \$raw[5] %></td><td>".$day_enabled."</td><td>".$day_disabled."</td><td>".$day_enabled." (100%)</td></tr>\n");
$raw->append_content("<tr><td><%= \$raw[6] %></td><td>".$week_enabled."</td><td>".$week_disabled."</td><td>".$week_enabled." (100%)</td></tr>\n");
$raw->append_content("<tr><td><%= \$raw[7] %></td><td>".$month_enabled."</td><td>".$month_disabled."</td><td>".$month_enabled." (100%)</td></tr>\n");
$raw->append_content("<tr><td><%= \$raw[8] %></td><td>".$year_enabled."</td><td>".$year_disabled."</td><td>".$year_disabled_in_month." (".sprintf('%.2f', $year_disabled_in_month/$year_enabled)."%)</td></tr>\n");
$raw->append_content("<tr><td><%= \$raw[8] %></td><td>".$year_enabled."</td><td>".$year_disabled."</td><td>".$year_disabled_in_month.$year_disabled_in_month_pct."</td></tr>\n");
$raw_foot->append_content("\n<tr><td><%= \$raw[9] %></td><td>".($unlimited_enabled + $day_enabled + $week_enabled + $month_enabled + $year_enabled)."</td><td>".($unlimited_disabled + $day_disabled + $week_disabled + $month_disabled + $year_disabled)."</td><td>".($day_enabled + $week_enabled + $month_enabled + $year_disabled_in_month)."</td></tr>\n");
@@ -140,8 +190,9 @@ Morris.Donut({
$dom2
EOF
spurt $dom, 'themes/'.$config->{theme}.'/templates/data.html.ep';
spurt encode('UTF-8', $dom2), 'themes/'.$config->{theme}.'/templates/raw.html.ep';
Mojo::File->new('themes/'.$config->{theme}.'/templates/stats.json.ep')->spurt(encode_json($stats));
Mojo::File->new('themes/'.$config->{theme}.'/templates/data.html.ep')->spurt($dom);
Mojo::File->new('themes/'.$config->{theme}.'/templates/raw.html.ep')->spurt(encode('UTF-8', $dom2));
}
=encoding utf8
+22 -8
View File
@@ -1,8 +1,10 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package Lutim::Command::cron::watch;
use Mojo::Base 'Mojolicious::Command';
use Mojo::Util qw(slurp decode);
use Filesys::DiskUsage qw/du/;
use LutimModel;
use Lutim::DB::Image;
use Lutim;
use Mojo::File;
use Switch;
use FindBin qw($Bin);
use File::Spec qw(catfile);
@@ -13,10 +15,18 @@ has usage => sub { shift->extract_usage };
sub run {
my $c = shift;
my $cfile = Mojo::File->new($Bin, '..' , 'lutim.conf');
if (defined $ENV{MOJO_CONFIG}) {
$cfile = Mojo::File->new($ENV{MOJO_CONFIG});
unless (-e $cfile->to_abs) {
$cfile = Mojo::File->new($Bin, '..', $ENV{MOJO_CONFIG});
}
}
my $config = $c->app->plugin('Config', {
file => File::Spec->catfile($Bin, '..' ,'lutim.conf'),
file => $cfile,
default => {
policy_when_full => 'warn'
policy_when_full => 'warn',
dbtype => 'sqlite',
}
});
@@ -36,11 +46,15 @@ sub run {
}
case 'delete' {
say '[Lutim cron job watch] Older files are being deleted';
my $dbi = Lutim::DB::Image->new(app => $c->app);
my $l = Lutim->new;
do {
for my $img (LutimModel::Lutim->select('WHERE path IS NOT NULL AND enabled = 1 ORDER BY created_at ASC LIMIT 50')) {
unlink $img->path() or warn "Could not unlink ".$img->path.": $!";
$img->update(enabled => 0);
}
$dbi->get_50_oldest()->each(
sub {
my ($img, $num) = @_;
$l->app->delete_image($img);
}
);
} while (du(qw/files/) > $config->{max_total_size});
}
else {
+236 -228
View File
@@ -1,9 +1,10 @@
# vim:set sw=4 ts=4 sts=4 expandtab:
package Lutim::Controller;
use Mojo::Base 'Mojolicious::Controller';
use Mojo::Util qw(url_unescape b64_encode);
use Mojo::Util qw(url_escape url_unescape b64_encode);
use Mojo::Asset::Memory;
use Mojo::JSON qw(true false);
use Lutim::DB::Image;
use DateTime;
use Digest::file qw(digest_file_hex);
use Text::Unidecode;
@@ -45,9 +46,12 @@ sub about {
}
sub stats {
shift->render(
my $c = shift;
my $img = Lutim::DB::Image->new(app => $c);
$c->render(
template => 'stats',
total => LutimModel::Lutim->count('WHERE path IS NOT NULL')
total => $img->count_not_empty
);
}
@@ -85,13 +89,13 @@ sub get_counter {
my $short = $c->param('short');
my $token = $c->param('token');
my @images = LutimModel::Lutim->select('WHERE short = ? AND path IS NOT NULL AND mod_token = ?', ($short, $token));
if (scalar(@images)) {
my $img = Lutim::DB::Image->new(app => $c->app, short => $short);
if (defined($img->mod_token) && $img->mod_token eq $token) {
return $c->render(
json => {
success => true,
counter => $images[0]->counter,
enabled => ($images[0]->enabled) ? true : false
counter => $img->counter,
enabled => ($img->enabled) ? true : false
}
);
}
@@ -109,19 +113,18 @@ sub modify {
my $token = $c->param('token');
my $url = $c->param('url');
my @images = LutimModel::Lutim->select('WHERE short = ? AND path IS NOT NULL', $short);
if (scalar(@images)) {
my $image = $images[0];
my $image = Lutim::DB::Image->new(app => $c->app, short => $short);
if ($image->path) {
my $msg;
if ($image->mod_token() ne $token || $token eq '') {
if ($image->mod_token ne $token || $token eq '') {
$msg = $c->l('The delete token is invalid.');
} else {
$c->app->log->info('[MODIFICATION] someone modify '.$image->filename.' with token method (path: '.$image->path.')');
$image->update(
delete_at_day => ($c->param('delete-day') && ($c->param('delete-day') <= $c->max_delay || $c->max_delay == 0)) ? $c->param('delete-day') : $c->max_delay,
delete_at_first_view => ($c->param('first-view')) ? 1 : 0,
);
$image->delete_at_day(($c->param('delete-day') && ($c->param('delete-day') <= $c->max_delay || $c->max_delay == 0)) ? $c->param('delete-day') : $c->max_delay);
$image->delete_at_first_view(($c->param('first-view')) ? 1 : 0);
$image->write;
$msg = $c->l('The image\'s delay has been successfully modified');
if (defined($c->param('format')) && $c->param('format') eq 'json') {
return $c->render(
@@ -178,11 +181,10 @@ sub delete {
my $short = $c->param('short');
my $token = $c->param('token');
my @images = LutimModel::Lutim->select('WHERE short = ? AND path IS NOT NULL', $short);
if (scalar(@images)) {
my $image = $images[0];
my $image = Lutim::DB::Image->new(app => $c->app, short => $short);
if ($image->path) {
my $msg;
if ($image->mod_token() ne $token || $token eq '') {
if ($image->mod_token ne $token || $token eq '') {
$msg = $c->l('The delete token is invalid.');
} elsif ($image->enabled() == 0) {
$msg = $c->l('The image %1 has already been deleted.', $image->filename);
@@ -349,102 +351,96 @@ sub add {
return $c->redirect_to('/');
}
}
if(LutimModel->begin) {
my @records = LutimModel::Lutim->select('WHERE path IS NULL LIMIT 1');
if (scalar(@records)) {
# Save file and create record
my $filename = unidecode($upload->filename);
my $ext = ($filename =~ m/([^.]+)$/)[0];
my $path = 'files/'.$records[0]->short.'.'.$ext;
my $record = Lutim::DB::Image->new(app => $c->app)->select_empty;
if ($record->short) {
# Save file and create record
my $filename = unidecode($upload->filename);
my $ext = ($filename =~ m/([^.]+)$/)[0];
my $path = 'files/'.$record->short.'.'.$ext;
my ($width, $height);
if ($im_loaded && $mediatype ne 'image/svg+xml' && $mediatype !~ m#image/(x-)?xcf# && $mediatype ne 'image/webp') { # ImageMagick don't work in Debian with svg (for now?)
my $im = Image::Magick->new;
$im->BlobToImage($upload->slurp);
my ($width, $height);
if ($im_loaded && $mediatype ne 'image/svg+xml' && $mediatype !~ m#image/(x-)?xcf# && $mediatype ne 'image/webp') { # ImageMagick don't work in Debian with svg (for now?)
my $im = Image::Magick->new;
$im->BlobToImage($upload->slurp);
# Automatic rotation from EXIF tag
$im->AutoOrient();
# Automatic rotation from EXIF tag
$im->AutoOrient();
# Update the uploaded file with it's auto-rotated clone
my $asset = Mojo::Asset::Memory->new->add_chunk($im->ImageToBlob());
$upload->asset($asset);
# Update the uploaded file with it's auto-rotated clone
my $asset = Mojo::Asset::Memory->new->add_chunk($im->ImageToBlob());
$upload->asset($asset);
# Create the thumbnail
$width = $im->Get('width');
$height = $im->Get('height');
$im->Resize(geometry=>'x85');
$thumb = 'data:'.$mediatype.';base64,';
if ($mediatype eq 'image/gif') {
$thumb .= b64_encode $im->[0]->ImageToBlob();
} else {
$thumb .= b64_encode $im->ImageToBlob();
}
# Create the thumbnail
$width = $im->Get('width');
$height = $im->Get('height');
$im->Resize(geometry=>'x85');
$thumb = 'data:'.$mediatype.';base64,';
if ($mediatype eq 'image/gif') {
$thumb .= b64_encode $im->[0]->ImageToBlob();
} else {
$thumb .= b64_encode $im->ImageToBlob();
}
unless ((defined($keep_exif) && $keep_exif) || $mediatype eq 'image/svg+xml' || $mediatype !~ m#image/(x-)?xcf# || $mediatype ne 'image/webp') {
# Remove the EXIF tags
my $data = new IO::Scalar \$upload->slurp();
my $et = new Image::ExifTool;
# Use $data in Image::ExifTool object
$et->ExtractInfo($data);
# Remove all metadata
$et->SetNewValue('*', undef);
# Create a temporary IO::Scalar to write into
my $temp;
my $a = new IO::Scalar \$temp;
$et->WriteInfo($data, $a);
# Update the uploaded file with it's no-tags clone
$data = Mojo::Asset::Memory->new->add_chunk($temp);
$upload->asset($data);
}
my $key;
if ($c->param('crypt') || $c->config->{always_encrypt}) {
($upload, $key) = $c->crypt($upload, $filename);
}
$upload->move_to($path);
$records[0]->update(
path => $path,
filename => $filename,
mediatype => $mediatype,
footprint => digest_file_hex($path, 'SHA-512'),
enabled => 1,
delete_at_day => ($c->param('delete-day') && ($c->param('delete-day') <= $c->max_delay || $c->max_delay == 0)) ? $c->param('delete-day') : $c->max_delay,
delete_at_first_view => ($c->param('first-view')) ? 1 : 0,
created_at => time(),
created_by => $ip,
width => $width,
height => $height
);
# Log image creation
$c->app->log->info('[CREATION] '.$ip.' pushed '.$filename.' (path: '.$path.')');
# Give url to user
$short = $records[0]->short;
$real_short = $short;
if (!defined($records[0]->mod_token)) {
$records[0]->update(
mod_token => $c->shortener($c->config->{token_length})
);
}
$token = $records[0]->mod_token;
$short .= '/'.$key if (defined($key));
$limit = $records[0]->delete_at_day;
$created = $records[0]->created_at;
} else {
# Houston, we have a problem
$msg = $c->l('There is no more available URL. Retry or contact the administrator. %1', $c->config->{contact});
}
unless ((defined($keep_exif) && $keep_exif) || $mediatype eq 'image/svg+xml' || $mediatype !~ m#image/(x-)?xcf# || $mediatype ne 'image/webp') {
# Remove the EXIF tags
my $data = new IO::Scalar \$upload->slurp();
my $et = new Image::ExifTool;
# Use $data in Image::ExifTool object
$et->ExtractInfo($data);
# Remove all metadata
$et->SetNewValue('*', undef);
# Create a temporary IO::Scalar to write into
my $temp;
my $a = new IO::Scalar \$temp;
$et->WriteInfo($data, $a);
# Update the uploaded file with it's no-tags clone
$data = Mojo::Asset::Memory->new->add_chunk($temp);
$upload->asset($data);
}
my $key;
if ($c->param('crypt') || $c->config('always_encrypt')) {
($upload, $key) = $c->crypt($upload, $filename);
}
$upload->move_to($path);
$record->path($path)
->filename($filename)
->mediatype($mediatype)
->footprint(digest_file_hex($path, 'SHA-512'))
->enabled(1)
->delete_at_day(($c->param('delete-day') && ($c->param('delete-day') <= $c->max_delay || $c->max_delay == 0)) ? $c->param('delete-day') : $c->max_delay)
->delete_at_first_view(($c->param('first-view'))? 1 : 0)
->created_at(time())
->created_by($ip)
->width($width)
->height($height)
->write;
# Log image creation
$c->app->log->info('[CREATION] '.$ip.' pushed '.$filename.' (path: '.$path.')');
# Give url to user
$short = $record->short;
$real_short = $short;
if (!defined($record->mod_token)) {
$record->mod_token($c->shortener($c->config->{token_length}))->write;
}
$token = $record->mod_token;
$short .= '/'.$key if (defined($key));
$limit = $record->delete_at_day;
$created = $record->created_at;
} else {
# Houston, we have a problem
$msg = $c->l('There is no more available URL. Retry or contact the administrator. %1', $c->config->{contact});
}
LutimModel->commit;
} else {
$msg = $c->l('The file %1 is not an image.', $upload->filename);
}
@@ -519,15 +515,14 @@ sub short {
my $thumb = $c->param('thumb');
my $dl = (defined($c->param('dl'))) ? 'attachment' : 'inline';
my @images = LutimModel::Lutim->select('WHERE short = ? AND ENABLED = 1 AND path IS NOT NULL', $short);
if (scalar(@images)) {
if($images[0]->delete_at_day && $images[0]->created_at + $images[0]->delete_at_day * 86400 <= time()) {
my $image = Lutim::DB::Image->new(app => $c->app, short => $short);
if ($image->enabled && $image->path) {
if($image->delete_at_day && $image->created_at + $image->delete_at_day * 86400 <= time()) {
# Log deletion
$c->app->log->info('[DELETION] someone tried to view '.$images[0]->filename.' but it has been removed by expiration (path: '.$images[0]->path.')');
$c->app->log->info('[DELETION] someone tried to view '.$image->filename.' but it has been removed by expiration (path: '.$image->path.')');
# Delete image
$c->delete_image($images[0]);
$c->delete_image($image);
# Warn user
$c->flash(
@@ -539,54 +534,53 @@ sub short {
my $test;
if (defined($touit)) {
$test = 1;
my $short = $images[0]->short;
my $short = $image->short;
$short .= '/'.$key if (defined($key));
my ($width, $height) = (340,340);
if ($images[0]->mediatype eq 'image/gif') {
if (defined($images[0]->width) && defined($images[0]->height)) {
($width, $height) = ($images[0]->width, $images[0]->height);
if ($image->mediatype eq 'image/gif') {
if (defined($image->width) && defined($image->height)) {
($width, $height) = ($image->width, $image->height);
} elsif ($im_loaded) {
my $upload = $c->decrypt($key, $images[0]->path);
my $upload = $c->decrypt($key, $image->path);
my $im = Image::Magick->new;
$im->BlobToImage($upload->slurp);
$width = $im->Get('width');
$height = $im->Get('height');
$images[0]->update(
width => $width,
height => $height
);
$image->width($width)
->height($height)
->write;
}
}
return $c->render(
template => 'twitter',
layout => undef,
short => $short,
filename => $images[0]->filename,
mimetype => ($c->req->url->to_abs()->scheme eq 'https') ? $images[0]->mediatype : '',
filename => $image->filename,
mimetype => ($c->req->url->to_abs()->scheme eq 'https') ? $image->mediatype : '',
width => $width,
height => $height
);
} else {
# Delete image if needed
if ($images[0]->delete_at_first_view && $images[0]->counter >= 1) {
if ($image->delete_at_first_view && $image->counter >= 1) {
# Log deletion
$c->app->log->info('[DELETION] someone made '.$images[0]->filename.' removed (path: '.$images[0]->path.')');
$c->app->log->info('[DELETION] someone made '.$image->filename.' removed (path: '.$image->path.')');
# Delete image
$c->delete_image($images[0]);
$c->delete_image($image);
$c->flash(
msg => $c->l('Unable to find the image: it has been deleted.')
);
return $c->redirect_to('/');
} else {
my $expires = ($images[0]->delete_at_day) ? $images[0]->delete_at_day : 360;
my $dt = DateTime->from_epoch( epoch => $expires * 86400 + $images[0]->created_at);
my $expires = ($image->delete_at_day) ? $image->delete_at_day : 360;
my $dt = DateTime->from_epoch( epoch => $expires * 86400 + $image->created_at);
$dt->set_time_zone('GMT');
$expires = $dt->strftime("%a, %d %b %Y %H:%M:%S GMT");
$test = $c->render_file($images[0]->filename, $images[0]->path, $images[0]->mediatype, $dl, $expires, $images[0]->delete_at_first_view, $key, $thumb);
$test = $c->render_file($im_loaded, $image->filename, $image->path, $image->mediatype, $dl, $expires, $image->delete_at_first_view, $key, $thumb);
}
}
@@ -594,40 +588,37 @@ sub short {
# Update counter
$c->on(finish => sub {
# Log access
$c->app->log->info('[VIEW] someone viewed '.$images[0]->filename.' (path: '.$images[0]->path.')');
$c->app->log->info('[VIEW] someone viewed '.$image->filename.' (path: '.$image->path.')');
# Update record
my $counter = $images[0]->counter + 1;
$images[0]->update(counter => $counter);
$images[0]->update(last_access_at => time());
if ($c->config('minion')->{enabled}) {
$c->app->minion->enqueue(accessed => [$image->short, time]);
} else {
$image->accessed(time);
}
# Delete image if needed
if ($images[0]->delete_at_first_view) {
if ($image->delete_at_first_view) {
# Log deletion
$c->app->log->info('[DELETION] someone made '.$images[0]->filename.' removed (path: '.$images[0]->path.')');
$c->app->log->info('[DELETION] someone made '.$image->filename.' removed (path: '.$image->path.')');
# Delete image
$c->delete_image($images[0]);
$c->delete_image($image);
}
});
}
} elsif ($image->path && !$image->enabled) {
# Log access try
$c->app->log->info('[NOT FOUND] someone tried to view '.$short.' but it does\'nt exist anymore.');
# Warn user
$c->flash(
msg => $c->l('Unable to find the image: it has been deleted.')
);
return $c->redirect_to('/');
} else {
@images = LutimModel::Lutim->select('WHERE short = ? AND ENABLED = 0 AND path IS NOT NULL', $short);
if (scalar(@images)) {
# Log access try
$c->app->log->info('[NOT FOUND] someone tried to view '.$short.' but it does\'nt exist anymore.');
# Warn user
$c->flash(
msg => $c->l('Unable to find the image: it has been deleted.')
);
return $c->redirect_to('/');
} else {
# Image never existed
$c->render_not_found;
}
# Image never existed
$c->render_not_found;
}
}
@@ -635,105 +626,122 @@ sub zip {
my $c = shift;
my $imgs = $c->every_param('i');
my $zip = Archive::Zip->new();
my $img_nb = scalar(@{$imgs});
my $max_zip = $c->config('max_files_in_zip');
# We HAVE to add a png file at the beginning, otherwise the $zip
# could use the mimetype of an SVG file if it's the first file asked.
$zip->addFile('themes/default/public/img/favicon.png', 'hosted_with_lutim.png');
if ($img_nb <= $max_zip) {
my $zip = Archive::Zip->new();
$zip->addDirectory('images/');
for my $img (@{$imgs}) {
my ($short, $key) = split('/', $img);
if (defined $key) {
$key =~ s/\.[^.]*//;
} else {
$short =~ s/\.[^.]*//;
}
my @images = LutimModel::Lutim->select('WHERE short = ? AND ENABLED = 1 AND path IS NOT NULL', $short);
# We HAVE to add a png file at the beginning, otherwise the $zip
# could use the mimetype of an SVG file if it's the first file asked.
$zip->addFile('themes/default/public/img/favicon.png', 'hosted_with_lutim.png');
if (scalar(@images)) {
my $filename = $images[0]->filename;
if($images[0]->delete_at_day && $images[0]->created_at + $images[0]->delete_at_day * 86400 <= time()) {
# Log deletion
$c->app->log->info('[DELETION] someone tried to view '.$images[0]->filename.' but it has been removed by expiration (path: '.$images[0]->path.')');
# Delete image
$c->delete_image($images[0]);
# Warn user
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$filename.'.txt');
next;
}
# Delete image if needed
if ($images[0]->delete_at_first_view && $images[0]->counter >= 1) {
# Log deletion
$c->app->log->info('[DELETION] someone made '.$images[0]->filename.' removed (path: '.$images[0]->path.')');
# Delete image
$c->delete_image($images[0]);
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$filename.'.txt');
next;
$zip->addDirectory('images/');
for my $img (@{$imgs}) {
my ($short, $key) = split('/', $img);
if (defined $key) {
$key =~ s/\.[^.]*//;
} else {
my $expires = ($images[0]->delete_at_day) ? $images[0]->delete_at_day : 360;
my $dt = DateTime->from_epoch( epoch => $expires * 86400 + $images[0]->created_at);
$dt->set_time_zone('GMT');
$expires = $dt->strftime("%a, %d %b %Y %H:%M:%S GMT");
$short =~ s/\.[^.]*//;
}
my $image = Lutim::DB::Image->new(app => $c->app, short => $short);
my $path = $images[0]->path;
unless ( -f $path && -r $path ) {
$c->app->log->error("Cannot read file [$path]. error [$!]");
if ($image->enabled && $image->path) {
my $filename = $image->filename;
if($image->delete_at_day && $image->created_at + $image->delete_at_day * 86400 <= time()) {
# Log deletion
$c->app->log->info('[DELETION] someone tried to view '.$image->filename.' but it has been removed by expiration (path: '.$image->path.')');
# Delete image
$c->delete_image($image);
# Warn user
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$filename.'.txt');
next;
}
if ($key) {
$zip->addString($c->decrypt($key, $path)->slurp, "images/$filename");
# Delete image if needed
if ($image->delete_at_first_view && $image->counter >= 1) {
# Log deletion
$c->app->log->info('[DELETION] someone made '.$image->filename.' removed (path: '.$image->path.')');
# Delete image
$c->delete_image($image);
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$filename.'.txt');
next;
} else {
$zip->addFile($path, "images/$filename");
my $expires = ($image->delete_at_day) ? $image->delete_at_day : 360;
my $dt = DateTime->from_epoch( epoch => $expires * 86400 + $image->created_at);
$dt->set_time_zone('GMT');
$expires = $dt->strftime("%a, %d %b %Y %H:%M:%S GMT");
my $path = $image->path;
unless ( -f $path && -r $path ) {
$c->app->log->error("Cannot read file [$path]. error [$!]");
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$filename.'.txt');
next;
}
if ($key) {
$zip->addString($c->decrypt($key, $path)->slurp, "images/$filename");
} else {
$zip->addFile($path, "images/$filename");
}
# Log access
$c->app->log->info('[VIEW] someone viewed '.$image->filename.' (path: '.$image->path.')');
# Update counter and record
if ($c->config('minion')->{enabled}) {
$c->app->minion->enqueue(accessed => [$image->short, time]);
} else {
$image->accessed(time);
}
}
# Log access
$c->app->log->info('[VIEW] someone viewed '.$images[0]->filename.' (path: '.$images[0]->path.')');
# Update counter
$images[0]->update(counter => $images[0]->counter + 1);
# Update record
$images[0]->update(last_access_at => time());
}
} else {
@images = LutimModel::Lutim->select('WHERE short = ? AND ENABLED = 0 AND path IS NOT NULL', $short);
if (scalar(@images)) {
} elsif ($image->path && !$image->enabled) {
# Log access try
$c->app->log->info('[NOT FOUND] someone tried to view '.$short.' but it does\'nt exist anymore.');
# Warn user
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$images[0]->filename.'.txt');
$zip->addString($c->l('Unable to find the image: it has been deleted.'), 'images/'.$image->filename.'.txt');
next;
} else {
$zip->addString($c->l('Image not found.'), 'images/'.$short.'.txt');
next;
}
}
}
my ($fh, $zipfile) = Archive::Zip::tempFile();
unless ($zip->writeToFileNamed($zipfile) == AZ_OK) {
$c->flash(
msg => $c->l('Something went wrong when creating the zip file. Try again later or contact the administrator (%1).', $c->config('contact'))
my ($fh, $zipfile) = Archive::Zip::tempFile();
unless ($zip->writeToFileNamed($zipfile) == AZ_OK) {
$c->flash(
msg => $c->l('Something went wrong when creating the zip file. Try again later or contact the administrator (%1).', $c->config('contact'))
);
return $c->redirect_to('/');
}
$c->res->content->headers->content_type('application/zip;name=images.zip');
$c->res->content->headers->content_disposition('attachment;filename=images.zip');;
my $asset = Mojo::Asset::File->new(path => $zipfile);
$c->res->content->asset($asset);
$c->res->content->headers->content_length($asset->size);
unlink $zipfile;
return $c->rendered(200);
} else {
my $i = -1;
my @urls = ();
my @esc_imgs = map { my $e = $_; $e = url_escape($e); $e =~ s#%2F#/#g; $e } @{$imgs};
while (++$i < $img_nb) {
my $stop = ($i + $max_zip - 1 < $img_nb) ? $i + $max_zip - 1 : $img_nb - 1;
push @urls, $c->url_for('/zip')->to_abs->to_string.'?i='.join('&i=', @esc_imgs[$i..$stop]);
$i = $stop;
}
$c->render(
template => 'zip',
urls => \@urls
);
return $c->redirect_to('/');
}
$c->res->content->headers->content_type('application/zip;name=images.zip');
$c->res->content->headers->content_disposition('attachment;filename=images.zip');;
my $asset = Mojo::Asset::File->new(path => $zipfile);
$c->res->content->asset($asset);
$c->res->content->headers->content_length($asset->size);
unlink $zipfile;
return $c->rendered(200);
}
1;
+332
View File
@@ -0,0 +1,332 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package Lutim::DB::Image;
use Mojo::Base -base;
has 'short';
has 'path';
has 'footprint';
has 'enabled';
has 'mediatype';
has 'filename';
has 'counter' => 0;
has 'delete_at_first_view';
has 'delete_at_day';
has 'created_at';
has 'created_by';
has 'last_access_at';
has 'mod_token';
has 'width';
has 'height';
has 'app';
=head1 NAME
Lutim::DB::Image - DB abstraction layer for Lutim images
=head1 Contributing
When creating a new database accessor, make sure that it provides the following subroutines.
After that, modify this file and modify the C<new> subroutine to allow to use your accessor.
Have a look at Lutim::DB::Image::SQLite's code: it's simple and may be more understandable that this doc.
=head1 Attributes
=over 1
=item B<short> : random string
=item B<path> : string, path to the image, relative to lutim's installation directory
=item B<footprint> : string, sha512 checksum of the image
=item B<enabled> : boolean, is the image accessible?
=item B<mediatype> : string, mimetype of the image
=item B<filename> : string
=item B<counter> : integer
=item B<delete_at_first_view> : boolean
=item B<delete_at_day> : integer, number of days from image upload to deletion
=item B<created_at> : unix timestamp
=item B<created_by> : unix timestamp
=item B<last_access_at> : unix timestamp
=item B<mod_token> : random string
=item B<width> : integer
=item B<height> : integer
=item B<app> : a mojolicious object
=back
=head1 Sub routines
=head2 new
=over 1
=item B<Usage> : C<$c = Lutim::DB::Image-E<gt>new(app =E<gt> $self);>
=item B<Arguments> : any of the attribute above
=item B<Purpose> : construct a new db accessor object. If the C<short> attribute is provided, it have to load the informations from the database.
=item B<Returns> : the db accessor object
=item B<Info> : the app argument is used by Lutim::DB::Image to choose which db accessor will be used, you don't need to use it in new(), but you can use it to access helpers or configuration settings in the other subroutines
=back
=cut
sub new {
my $c = shift;
$c = $c->SUPER::new(@_);
if (ref($c) eq 'Lutim::DB::Image') {
my $dbtype = $c->app->config('dbtype');
if ($dbtype eq 'sqlite') {
use Lutim::DB::Image::SQLite;
$c = Lutim::DB::Image::SQLite->new(@_);
} elsif ($dbtype eq 'postgresql') {
use Lutim::DB::Image::Pg;
$c = Lutim::DB::Image::Pg->new(@_);
}
}
return $c;
}
sub to_hash {
my $c = shift;
return {
short => $c->short,
path => $c->path,
footprint => $c->footprint,
enabled => $c->enabled,
mediatype => $c->mediatype,
filename => $c->filename,
counter => $c->counter,
delete_at_first_view => $c->delete_at_first_view,
delete_at_day => $c->delete_at_day,
created_at => $c->created_at,
created_by => $c->created_by,
last_access_at => $c->last_access_at,
mod_token => $c->mod_token,
width => $c->width,
height => $c->height
};
}
=head2 accessed
=over 1
=item B<Usage> : C<$c-E<gt>accessed($time)>
=item B<Arguments> : an unix timestamp
=item B<Purpose> : increments the counter attribute by one, set the last_access_at attribute to $time and update the database
=item B<Returns> : the db accessor object
=back
=head2 count_delete_at_day_endis
=over 1
=item B<Usage> : C<$c-E<gt>count_delete_at_day_endis($delete_at_day, $enabled[, $time])>
=item B<Arguments> : two mandatory parameters: one integer, the delete_at_day attribute, a boolean (0 or 1), the enabled attribute
an optional parameter: an unix timestamp
=item B<Purpose> : count how many images there is with the given delete_at_day attribute, and enabled or disabled, depending on the given enabled attribute
if the optional parameter is given, count only images according to the given mandatory parameters that were created before the timestamp
=item B<Returns> : integer
=back
=head2 count_created_before
=over 1
=item B<Usage> : C<$c-E<gt>count_created_before($time)>
=item B<Arguments> : an unix timestamp
=item B<Purpose> : count how many images have been created before the given timestamp
=item B<Returns> : integer
=back
=head2 select_created_after
=over 1
=item B<Usage> : C<$c-E<gt>select_created_after($time)>
=item B<Arguments> : an unix timestamp
=item B<Purpose> : select images created after the given timestamp
=item B<Returns> : a Mojo::Collection object containing the images created after the given timestamp
=back
=head2 select_empty
=over 1
=item B<Usage> : C<$c-E<gt>select_empty>
=item B<Arguments> : none
=item B<Purpose> : select a ready-to-use empty record
=item B<Returns> : a db accessor object
=back
=head2 write
=over 1
=item B<Usage> : C<$c-E<gt>write>
=item B<Arguments> : none
=item B<Purpose> : create or update a record in the database, with the values of the object's attributes
=item B<Returns> : the db accessor object
=back
=head2 count_short
=over 1
=item B<Usage> : C<$c-E<gt>count_short($short)>
=item B<Arguments> : a random string, unique image identifier in the database
=item B<Purpose> : checks that an identifier isn't already used
=item B<Returns> : integer, number of records having this identifier (should be 0 or 1)
=back
=head2 count_empty
=over 1
=item B<Usage> : C<$c-E<gt>count_empty>
=item B<Arguments> : none
=item B<Purpose> : counts the number of record which path is null
=item B<Returns> : integer
=back
=head2 count_not_empty
=over 1
=item B<Usage> : C<$c-E<gt>count_not_empty>
=item B<Arguments> : none
=item B<Purpose> : counts the number of record which path is not null
=item B<Returns> : integer
=back
=head2 clean_ips_until
=over 1
=item B<Usage> : C<$c-E<gt>clean_ips_until($time)>
=item B<Arguments> : unix timestamp
=item B<Purpose> : remove the image's sender information on images created before the given timestamp
=item B<Returns> : the db accessor object
=back
=head2 get_no_longer_viewed_files
=over 1
=item B<Usage> : C<$c-E<gt>get_no_longer_viewed_files($time)>
=item B<Arguments> : unix timestamp
=item B<Purpose> : get images no longer viewed after the given timestamp
=item B<Returns> : a Mojo::Collection object containing the no longer viewed images as Lutim::DB::Image objects
=back
=head2 get_images_to_clean
=over 1
=item B<Usage> : C<$c-E<gt>get_images_to_clean>
=item B<Arguments> : none
=item B<Purpose> : get images that are expired but not marked as it
=item B<Returns> : a Mojo::Collection object containing the images to clean as Lutim::DB::Image objects
=back
=head2 get_50_oldest
=over 1
=item B<Usage> : C<$c-E<gt>get_50_oldest>
=item B<Arguments> : none
=item B<Purpose> : get the 50 oldest enabled images
=item B<Returns> : a Mojo::Collection object containing the 50 oldest enabled images as Lutim::DB::Image objects
=back
=head2 disable
=over 1
=item B<Usage> : C<$c-E<gt>disable>
=item B<Arguments> : none
=item B<Purpose> : change the attribute C<enabled> to false and update the database record
=item B<Returns> : the db accessor object
=back
=cut
1;
+229
View File
@@ -0,0 +1,229 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package Lutim::DB::Image::Pg;
use Mojo::Base 'Lutim::DB::Image';
use Mojo::Collection 'c';
has 'record' => 0;
sub new {
my $c = shift;
$c = $c->SUPER::new(@_);
$c = $c->_slurp if ($c->short);
return $c;
}
sub accessed {
my $c = shift;
my $time = shift;
my $h = $c->app->pg->db->query('UPDATE lutim SET counter = counter + 1, last_access_at = ? WHERE short = ? RETURNING counter, last_access_at', $time, $c->short)->hashes->first;
$c->counter($h->{counter});
$c->last_access_at($h->{last_access_at});
return $c;
}
sub count_delete_at_day_endis {
my $c = shift;
my $day = shift;
my $enabled = shift;
my $created = shift;
if (defined $created) {
return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE path IS NOT NULL AND delete_at_day = ? AND enabled = ? AND created_at < ?', $day, $enabled, $created)->hashes->first->{count};
} else {
return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE path IS NOT NULL AND delete_at_day = ? AND enabled = ?', $day, $enabled)->hashes->first->{count};
}
}
sub count_created_before {
my $c = shift;
my $time = shift;
return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE path IS NOT NULL AND created_at < ?', $time)->hashes->first->{count};
}
sub select_created_after {
my $c = shift;
my $time = shift;
my @images;
my $records = $c->app->pg->db->query('SELECT * FROM lutim WHERE path IS NOT NULL AND created_at >= ?', $time)->hashes;
$records->each(
sub {
my ($e, $num) = @_;
my $i = Lutim::DB::Image->new(app => $c->app);
$i->_slurp($e);
push @images, $i;
}
);
return c(@images);
}
sub select_empty {
my $c = shift;
my $record = $c->app->pg->db->query('SELECT * FROM lutim WHERE path IS NULL LIMIT 1')->hashes->first;
$c = $c->_slurp($record);
return $c;
}
sub write {
my $c = shift;
if ($c->record) {
$c->app->pg->db->query('UPDATE lutim SET counter = ?, created_at = ?, created_by = ?, delete_at_day = ?, delete_at_first_view = ?, enabled = ?, filename = ?, footprint = ?, height = ?, last_access_at = ?, mediatype = ?, mod_token = ?, path = ?, short = ?, width = ? WHERE short = ?', $c->counter, $c->created_at, $c->created_by, $c->delete_at_day, $c->delete_at_first_view, $c->enabled, $c->filename, $c->footprint, $c->height, $c->last_access_at, $c->mediatype, $c->mod_token, $c->path, $c->short, $c->width, $c->short);
} else {
$c->app->pg->db->query('INSERT INTO lutim (counter, created_at, created_by, delete_at_day, delete_at_first_view, enabled, filename, footprint, height, last_access_at, mediatype, mod_token, path, short, width) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', $c->counter, $c->created_at, $c->created_by, $c->delete_at_day, $c->delete_at_first_view, $c->enabled, $c->filename, $c->footprint, $c->height, $c->last_access_at, $c->mediatype, $c->mod_token, $c->path, $c->short, $c->width);
$c->record(1);
}
return $c;
}
sub count_short {
my $c = shift;
my $short = shift;
return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE short = ?', $short)->hashes->first->{count};
}
sub count_empty {
my $c = shift;
return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE path IS NULL')->hashes->first->{count};
}
sub count_not_empty {
my $c = shift;
return $c->app->pg->db->query('SELECT count(short) FROM lutim WHERE path IS NOT NULL')->hashes->first->{count};
}
sub clean_ips_until {
my $c = shift;
my $time = shift;
$c->app->pg->db->query('UPDATE lutim SET created_by = NULL WHERE path IS NOT NULL AND created_at < ?', $time);
return $c;
}
sub get_no_longer_viewed_files {
my $c = shift;
my $time = shift;
my @images;
my $records = $c->app->pg->db->query('SELECT * FROM lutim WHERE enabled = 1 AND last_access_at < ?', $time)->{hashes};
$records->each(
sub {
my ($e, $num) = @_;
my $i = Lutim::DB::Image->new(app => $c->app);
$i->record(1);
$i->_slurp($e);
push @images, $i;
}
);
return c(@images);
}
sub get_images_to_clean {
my $c = shift;
my @images;
my $records = $c->app->pg->db->query('SELECT * FROM lutim WHERE enabled = 1 AND (delete_at_day * 86400) < (? - created_at) AND delete_at_day != 0', time())->hashes;
$records->each(
sub {
my ($e, $num) = @_;
my $i = Lutim::DB::Image->new(app => $c->app);
$i->_slurp($e);
push @images, $i;
}
);
return c(@images);
}
sub get_50_oldest {
my $c = shift;
my @images;
my $records = $c->app->pg->db->query('SELECT * FROM lutim WHERE path IS NOT NULL AND enabled = 1 ORDER BY created_at ASC LIMIT 50')->hashes;
$records->each(
sub {
my ($e, $num) = @_;
my $i = Lutim::DB::Image->new(app => $c->app);
$i->_slurp($e);
push @images, $i;
}
);
return c(@images);
}
sub disable {
my $c = shift;
$c->app->pg->db->query('UPDATE lutim SET enabled = 0 WHERE short = ?', $c->short);
$c->enabled(0);
return $c;
}
sub _slurp {
my $c = shift;
my $r = shift;
my $image;
if (defined $r) {
$image = $r;
} else {
my $images = $c->app->pg->db->query('SELECT * FROM lutim WHERE short = ?', $c->short)->hashes;
if ($images->size) {
$image = $images->first;
}
}
if ($image) {
$c->short($image->{short});
$c->path($image->{path});
$c->footprint($image->{footprint});
$c->enabled($image->{enabled});
$c->mediatype($image->{mediatype});
$c->filename($image->{filename});
$c->counter($image->{counter});
$c->delete_at_first_view($image->{delete_at_first_view});
$c->delete_at_day($image->{delete_at_day});
$c->created_at($image->{created_at});
$c->created_by($image->{created_by});
$c->last_access_at($image->{last_access_at});
$c->mod_token($image->{mod_token});
$c->width($image->{width});
$c->height($image->{height});
$c->record(1);
}
return $c;
}
1;
+259
View File
@@ -0,0 +1,259 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package Lutim::DB::Image::SQLite;
use Mojo::Base 'Lutim::DB::Image';
use Lutim::DB::SQLite;
use Mojo::Collection 'c';
has 'record';
sub new {
my $c = shift;
$c = $c->SUPER::new(@_);
$c = $c->_slurp if ($c->short);
return $c;
}
sub accessed {
my $c = shift;
my $time = shift;
$c->record->update(
counter => $c->counter + 1,
last_access_at => $time
);
$c->counter($c->record->counter);
$c->last_access_at($c->record->last_access_at);
return $c;
}
sub count_delete_at_day_endis {
my $c = shift;
my $day = shift;
my $enabled = shift;
my $created = shift;
if (defined $created) {
return Lutim::DB::SQLite::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = ? AND enabled = ? AND created_at < ?', $day, $enabled, $created);
} else {
return Lutim::DB::SQLite::Lutim->count('WHERE path IS NOT NULL AND delete_at_day = ? AND enabled = ?', $day, $enabled);
}
}
sub count_created_before {
my $c = shift;
my $time = shift;
return Lutim::DB::SQLite::Lutim->count('WHERE path IS NOT NULL AND created_at < ?', $time);
}
sub select_created_after {
my $c = shift;
my $time = shift;
my @images;
my @records = Lutim::DB::SQLite::Lutim->select('WHERE path IS NOT NULL AND created_at >= ?', $time);
for my $e (@records) {
my $i = Lutim::DB::Image->new(app => $c->app);
$i->record($e);
$i->_slurp;
push @images, $i;
}
return c(@images);
}
sub select_empty {
my $c = shift;
my @records = Lutim::DB::SQLite::Lutim->select('WHERE path IS NULL LIMIT 1');
$c->record($records[0]);
$c = $c->_slurp;
return $c;
}
sub write {
my $c = shift;
if ($c->record) {
$c->record->update(
counter => $c->counter,
created_at => $c->created_at,
created_by => $c->created_by,
delete_at_day => $c->delete_at_day,
delete_at_first_view => $c->delete_at_first_view,
enabled => $c->enabled,
filename => $c->filename,
footprint => $c->footprint,
height => $c->height,
last_access_at => $c->last_access_at,
mediatype => $c->mediatype,
mod_token => $c->mod_token,
path => $c->path,
short => $c->short,
width => $c->width
);
} else {
my $record = Lutim::DB::SQLite::Lutim->create(
counter => $c->counter,
created_at => $c->created_at,
created_by => $c->created_by,
delete_at_day => $c->delete_at_day,
delete_at_first_view => $c->delete_at_first_view,
enabled => $c->enabled,
filename => $c->filename,
footprint => $c->footprint,
height => $c->height,
last_access_at => $c->last_access_at,
mediatype => $c->mediatype,
mod_token => $c->mod_token,
path => $c->path,
short => $c->short,
width => $c->width
);
$c->record($record);
}
return $c;
}
sub count_short {
my $c = shift;
my $short = shift;
return Lutim::DB::SQLite::Lutim->count('WHERE short IS ?', $short);
}
sub count_empty {
my $c = shift;
return Lutim::DB::SQLite::Lutim->count('WHERE path IS NULL');
}
sub count_not_empty {
my $c = shift;
return Lutim::DB::SQLite::Lutim->count('WHERE path IS NOT NULL');
}
sub clean_ips_until {
my $c = shift;
my $time = shift;
Lutim::DB::SQLite->do(
'UPDATE lutim SET created_by = "" WHERE path IS NOT NULL AND created_at < ?',
{},
$time
);
return $c;
}
sub get_no_longer_viewed_files {
my $c = shift;
my $time = shift;
my @images;
my @records = Lutim::DB::SQLite::Lutim->select('WHERE enabled = 1 AND last_access_at < ?', $time);
for my $e (@records) {
my $i = Lutim::DB::Image->new(app => $c->app);
$i->record($e);
$i->_slurp;
push @images, $i;
}
return c(@images);
}
sub get_images_to_clean {
my $c = shift;
my @images;
my @records = Lutim::DB::SQLite::Lutim->select('WHERE enabled = 1 AND (delete_at_day * 86400) < (? - created_at) AND delete_at_day != 0', time());
for my $e (@records) {
my $i = Lutim::DB::Image->new(app => $c->app);
$i->record($e);
$i->_slurp;
push @images, $i;
}
return c(@images);
}
sub get_50_oldest {
my $c = shift;
my @images;
my @records = Lutim::DB::SQLite::Lutim->select('WHERE path IS NOT NULL AND enabled = 1 ORDER BY created_at ASC LIMIT 50');
for my $e (@records) {
my $i = Lutim::DB::Image->new(app => $c->app);
$i->record($e);
$i->_slurp;
push @images, $i;
}
return c(@images);
}
sub disable {
my $c = shift;
$c->record->update(enabled => 0);
$c->enabled(0);
return $c;
}
sub _slurp {
my $c = shift;
my @images;
if ($c->record) {
@images = ($c->record);
} elsif ($c->short) {
@images = Lutim::DB::SQLite::Lutim->select('WHERE short = ?', $c->short);
}
if (scalar @images) {
my $image = $images[0];
$c->short($image->short);
$c->path($image->path);
$c->footprint($image->footprint);
$c->enabled($image->enabled);
$c->mediatype($image->mediatype);
$c->filename($image->filename);
$c->counter($image->counter);
$c->delete_at_first_view($image->delete_at_first_view);
$c->delete_at_day($image->delete_at_day);
$c->created_at($image->created_at);
$c->created_by($image->created_by);
$c->last_access_at($image->last_access_at);
$c->mod_token($image->mod_token);
$c->width($image->width);
$c->height($image->height);
$c->record($image) unless $c->record;
}
return $c;
}
1;
+11 -3
View File
@@ -1,13 +1,21 @@
package LutimModel;
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package Lutim::DB::SQLite;
use Mojolicious;
use Mojo::File;
use FindBin qw($Bin);
use File::Spec qw(catfile);
BEGIN {
my $m = Mojolicious->new;
my $cfile = Mojo::File->new($Bin, '..' , 'lutim.conf');
if (defined $ENV{MOJO_CONFIG}) {
$cfile = Mojo::File->new($ENV{MOJO_CONFIG});
unless (-e $cfile->to_abs) {
$cfile = Mojo::File->new($Bin, '..', $ENV{MOJO_CONFIG});
}
}
our $config = $m->plugin('Config' =>
{
file => File::Spec->catfile($Bin, '..' ,'lutim.conf'),
file => $cfile->to_abs->to_string,
default => {
db_path => 'lutim.db'
}
+245
View File
@@ -0,0 +1,245 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package Lutim::Plugin::Helpers;
use Mojo::Base 'Mojolicious::Plugin';
use Mojo::Util qw(quote);
use Crypt::CBC;
use Data::Entropy qw(entropy_source);
sub register {
my ($self, $app) = @_;
$app->plugin('PgURLHelper');
if ($app->config('dbtype') eq 'postgresql') {
use Mojo::Pg;
$app->helper(pg => \&_pg);
# Database migration
my $migrations = Mojo::Pg::Migrations->new(pg => $app->pg);
if ($app->mode eq 'development') {
$migrations->from_file('utilities/migrations.sql')->migrate(0)->migrate(1);
} else {
$migrations->from_file('utilities/migrations.sql')->migrate(1);
}
}
$app->helper(render_file => \&_render_file);
$app->helper(ip => \&_ip);
$app->helper(provisioning => \&_provisioning);
$app->helper(shortener => \&_shortener);
$app->helper(stop_upload => \&_stop_upload);
$app->helper(max_delay => \&_max_delay);
$app->helper(default_delay => \&_default_delay);
$app->helper(is_selected => \&_is_selected);
$app->helper(crypt => \&_crypt);
$app->helper(decrypt => \&_decrypt);
$app->helper(delete_image => \&_delete_image);
}
sub _pg {
my $c = shift;
state $pg = Mojo::Pg->new($c->app->pg_url($c->app->config('pgdb')));
return $pg;
}
sub _render_file {
my $c = shift;
my ($im_loaded, $filename, $path, $mediatype, $dl, $expires, $nocache, $key, $thumb) = @_;
$dl = 'attachment' if ($mediatype =~ m/svg/);
$filename = quote($filename);
my $asset;
unless (-f $path && -r $path) {
$c->app->log->error("Cannot read file [$path]. error [$!]");
$c->flash(
msg => $c->l('Unable to find the image: it has been deleted.')
);
return 500;
}
$mediatype =~ s/x-//;
my $headers = Mojo::Headers->new();
if ($nocache) {
$headers->add('Cache-Control' => 'no-cache, no-store, max-age=0, must-revalidate');
} else {
$headers->add('Expires' => $expires);
}
$headers->add('Content-Type' => $mediatype.';name='.$filename);
$headers->add('Content-Disposition' => $dl.';filename='.$filename);
$c->res->content->headers($headers);
if ($key) {
$asset = $c->decrypt($key, $path);
} else {
$asset = Mojo::Asset::File->new(path => $path);
}
if (defined $thumb && $im_loaded && $mediatype ne 'image/svg+xml' && $mediatype !~ m#image/(x-)?xcf# && $mediatype ne 'image/webp') { # ImageMagick don't work in Debian with svg (for now?)
my $im = Image::Magick->new;
$im->BlobToImage($asset->slurp);
# Create the thumbnail
$im->Resize(geometry=>'x'.$c->config('thumbnail_size'));
# Replace the asset with the thumbnail
$asset = Mojo::Asset::Memory->new->add_chunk($im->ImageToBlob());
}
$c->res->content->asset($asset);
$headers->add('Content-Length' => $asset->size);
return $c->rendered(200);
}
sub _ip {
my $c = shift;
my $ip_only = shift || 0;
my $proxy = $c->req->headers->header('X-Forwarded-For');
my $ip = ($proxy) ? $proxy : $c->tx->remote_address;
my $remote_port = (defined($c->req->headers->header('X-Remote-Port'))) ? $c->req->headers->header('X-Remote-Port') : $c->tx->remote_port;
return ($ip_only) ? $ip : "$ip remote port:$remote_port";
}
sub _provisioning {
my $c = shift;
# Create some short patterns for provisioning
my $img = Lutim::DB::Image->new(app => $c->app);
if ($img->count_empty < $c->app->config('provisioning')) {
for (my $i = 0; $i < $c->app->config('provis_step'); $i++) {
my $short;
do {
$short = $c->shortener($c->app->config('length'));
} while ($img->count_short($short) || $short eq 'about' || $short eq 'stats' || $short eq 'd' || $short eq 'm' || $short eq 'gallery' || $short eq 'zip' || $short eq 'infos');
$img->short($short)
->counter(0)
->enabled(1)
->delete_at_first_view(0)
->delete_at_day(0)
->mod_token($c->shortener($c->app->config('token_length')))
->write;
$img = Lutim::DB::Image->new(app => $c->app);
}
}
}
sub _shortener {
my $c = shift;
my $length = shift;
my @chars = ('a'..'z','A'..'Z','0'..'9');
my $result = '';
foreach (1..$length) {
$result .= $chars[entropy_source->get_int(scalar(@chars))];
}
return $result;
}
sub _stop_upload {
my $c = shift;
if (-f 'stop-upload' || -f 'stop-upload.manual') {
$c->stash(
stop_upload => $c->l('Uploading is currently disabled, please try later or contact the administrator (%1).', $c->app->config('contact'))
);
return 1;
}
return 0;
}
sub _max_delay {
my $c = shift;
return $c->app->config('max_delay') if ($c->app->config('max_delay') >= 0);
warn "max_delay set to a negative value. Default to 0.";
return 0;
}
sub _default_delay {
my $c = shift;
return $c->app->config('default_delay') if ($c->app->config('default_delay') >= 0);
warn "default_delay set to a negative value. Default to 0.";
return 0;
}
sub _is_selected {
my $c = shift;
my $num = shift;
return ($num == $c->default_delay) ? 'selected="selected"' : '';
}
sub _crypt {
my $c = shift;
my $upload = shift;
my $filename = shift;
my $key = $c->shortener($c->config('crypto_key_length'));
my $cipher = Crypt::CBC->new(
-key => $key,
-cipher => 'Blowfish',
-header => 'none',
-iv => 'dupajasi'
);
$cipher->start('encrypting');
my $crypt_asset = Mojo::Asset::File->new;
$crypt_asset->add_chunk($cipher->crypt($upload->slurp));
$crypt_asset->add_chunk($cipher->finish);
my $crypt_upload = Mojo::Upload->new;
$crypt_upload->filename($filename);
$crypt_upload->asset($crypt_asset);
return ($crypt_upload, $key);
}
sub _decrypt {
my $c = shift;
my $key = shift;
my $file = shift;
my $cipher = Crypt::CBC->new(
-key => $key,
-cipher => 'Blowfish',
-header => 'none',
-iv => 'dupajasi'
);
$cipher->start('decrypting');
my $decrypt_asset = Mojo::Asset::File->new;
open(my $f, "<",$file) or die "Unable to read encrypted file: $!";
binmode $f;
while (read($f, my $buffer,1024)) {
$decrypt_asset->add_chunk($cipher->crypt($buffer));
}
$decrypt_asset->add_chunk($cipher->finish) ;
return $decrypt_asset;
}
sub _delete_image {
my $c = shift;
my $img = shift;
unlink $img->path or warn "Could not unlink ".$img->path.": $!";
$img->disable();
}
1;
+16 -1
View File
@@ -1,5 +1,7 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package Mounter;
use Mojo::Base 'Mojolicious';
use Mojo::File;
use FindBin qw($Bin);
use File::Spec qw(catfile);
@@ -9,9 +11,16 @@ sub startup {
push @{$self->commands->namespaces}, 'Lutim::Command';
my $cfile = Mojo::File->new($Bin, '..' , 'lutim.conf');
if (defined $ENV{MOJO_CONFIG}) {
$cfile = Mojo::File->new($ENV{MOJO_CONFIG});
unless (-e $cfile->to_abs) {
$cfile = Mojo::File->new($Bin, '..', $ENV{MOJO_CONFIG});
}
}
my $config = $self->plugin('Config' =>
{
file => File::Spec->catfile($Bin, '..' ,'lutim.conf'),
file => $cfile,
default => {
prefix => '/',
theme => 'default',
@@ -19,6 +28,8 @@ sub startup {
}
);
$self->plugin('Lutim::Plugin::Helpers');
$config->{prefix} = $config->{url_sub_dir} if (defined($config->{url_sub_dir}) && $config->{prefix} eq '/');
$self->app->log->warn('"url_sub_dir" configuration option is deprecated. Use "prefix" instead. "url_sub_dir" will be removed in the future') if (defined($config->{url_sub_dir}));
@@ -31,6 +42,10 @@ sub startup {
}
push @{$self->static->paths}, $self->home->rel_file('themes/default/public');
$self->hook(after_static => sub {
my $c = shift;
$c->res->headers->cache_control('max-age=2592000, must-revalidate');
});
$self->plugin('Mount' => {$config->{prefix} => File::Spec->catfile($Bin, '..', 'script', 'application')});
}
+49
View File
@@ -108,12 +108,53 @@
# optional, defaut is /
#prefix => '/',
# choose what database you want to use
# valid choices are sqlite and postgresql (all lowercase)
# optional, default is sqlite
#dbtype => 'sqlite',
# SQLite ONLY - only used if dbtype is set to sqlite
# define a path to the SQLite database
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is lutim.db
#db_path => 'lutim.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database
# mandatory if you choosed postgresql as dbtype
#pgdb => {
# database => 'lutim',
# host => 'localhost',
# #user => 'DBUSER',
# #pwd => 'DBPASSWORD'
#},
# use Minion instead of directly increase counters
# need to launch a minion worker service if enabled
# optional, Minion is disabled by default
#minion => {
# enabled => 0,
# # Which Minion backend to use?
# # valid values are sqlite and postgresql (all lowercase)
# # mandatory if Minion is enabled, default is sqlite
# dbtype => 'sqlite',
# # SQLite ONLY - only used if if you choose sqlite as Minion backend, define the path to the minion database
# # you can define it relative to lutim directory or set an absolute path
# # remember that it has to be in a directory writable by Lutim user
# # optional, default is minion.db
# db_path => 'minion.db',
# # PostgreSQL ONLY - only used if you choose postgresql as Minion backend
# # these are the credentials to access the Minion's PostgreSQL database
# # mandatory if you choosed postgresql as Minion backend, no default
# pgdb => {
# database => 'lutim_minion',
# host => 'localhost',
# #user => 'DBUSER',
# #pwd => 'DBPASSWORD'
# }
#},
# define the height of the thumbnails generated at users' will
# this is not the height of the thumbnails send after upload,
# we're talking about thumbnails generated when someone asked for
@@ -122,6 +163,14 @@
# optional, default is 100 (pixels)
#thumbnail_size => 100,
# maximum number of files that can be downloaded as a single zip archive
# if too many files are asked, it results a timeout, so Lutim split the zip URL
# in multiple URLs, each with max_file_size images.
# timeout behavior depends heavily on your server ressources (CPU) and if images
# are encrypted
# optional, default is 15
#max_files_in_zip => 15,
##########################
# Lutim cron jobs settings
##########################
-9
View File
@@ -1,9 +0,0 @@
use Mojo::Base -strict;
use Test::More;
use Test::Mojo;
my $t = Test::Mojo->new('Lutim');
$t->get_ok('/')->status_is(200)->content_like(qr/Mojolicious/i);
done_testing();
+4
View File
@@ -0,0 +1,4 @@
CREATE USER lutim WITH PASSWORD 'lutim';
CREATE DATABASE lutimtest OWNER lutim;
CREATE DATABASE lutim_miniontest OWNER lutim;
+202
View File
@@ -0,0 +1,202 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
{
####################
# Hypnotoad settings
####################
# see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings
hypnotoad => {
# array of IP addresses and ports you want to listen to
listen => ['http://127.0.0.1:8080'],
# if you use Lutim behind a reverse proxy like Nginx, you want to set proxy to 1
# if you use Lutim directly, let it commented
#proxy => 1,
},
################
# Lutim settings
################
# put a way to contact you here and uncomment it
# mandatory
contact => 'John Doe, admin[at]example.com',
# random string used to encrypt cookies
# mandatory
secrets => ['fdjsofjoihrei'],
# choose a theme. See the available themes in `themes` directory
# optional, default is 'default'
#theme => 'default',
# length of the images random URL
# optional, default is 8
#length => 8,
# length of the encryption key
# optional, default is 8
#crypto_key_length => 8,
# how many URLs will be provisioned in a batch ?
# optional, default is 5
#provis_step => 5,
# max number of URLs to be provisioned
# optional, default is 100
#provisioning => 100,
# anti-flood protection delay, in seconds
# users won't be able to ask Lutim to download images more than one per anti_flood_delay seconds
# optional, default is 5
#anti_flood_delay => 5,
# twitter account which will appear on twitter cards
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
# optional, default is @framasky
#tweet_card_via => '@framasky',
# max image size, in octets
# you can write it 10*1024*1024
# optional, default is 10485760
max_file_size => 1048576,
# if you want to have piwik statistics, provide a piwik image tracker
# only the image tracker is allowed, no javascript
# optional, no default
#piwik_img => 'https://piwik.example.org/piwik.php?idsite=1&amp;rec=1',
# if you want to include something in the right of the screen, put it here
# here's an example to put the logo of your hoster
# optional, no default
#hosted_by => 'My super hoster <img src="http://hoster.example.com" alt="Hoster logo">',
# DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED
# Lutim now checks if the X-Forwarded-Proto header is present and equal to https.
# set to 1 if you use Lutim behind a secure web server
# optional, default is 0
#https => 0,
# broadcast_message which will displayed on all pages of Lutim (but no in json response)
# optional, no default
broadcast_message => 'test broadcast message',
# array of authorized domains for API calls.
# if you want to authorize everyone to use the API: ['*']
# optional, no domains allowed by default
#allowed_domains => ['http://1.example.com', 'http://2.example.com'],
# default time limit for files
# valid values are 0, 1, 7, 30 and 365
# optional, default is 0 (no limit)
default_delay => 30,
# number of days after which the images will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay)
# a warning message will be displayed on homepage
# optional, default is 0 (no limit)
max_delay => 200,
# if set to 1, all the images will be encrypted and the encryption option will no be displayed
# optional, default is 0
#always_encrypt => 0,
# length of the image's delete token
# optional, default is 24
#token_length => 24,
# URL sub-directory in which you want Lutim to be accessible
# example: you want to have Lutim under https://example.org/lutim/
# => set prefix to '/lutim' or to '/lutim/', it doesn't matter
# optional, defaut is /
#prefix => '/',
# choose what database you want to use
# valid choices are sqlite and postgresql (all lowercase)
# optional, default is sqlite
dbtype => 'postgresql',
# SQLite ONLY - only used if dbtype is set to sqlite
# define a path to the SQLite database
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is lutim.db
#db_path => 'lutim.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database
# mandatory if you choosed postgresql as dbtype
pgdb => {
database => 'lutimtest',
host => 'localhost',
user => 'lutim',
pwd => 'lutim'
},
# use Minion instead of directly increase counters
# need to launch a minion worker service if enabled
# optional, Minion is disabled by default
#minion => {
# enabled => 0,
# # Which Minion backend to use?
# # valid values are sqlite and postgresql (all lowercase)
# # mandatory if Minion is enabled, default is sqlite
# dbtype => 'sqlite',
# # SQLite ONLY - only used if if you choose sqlite as Minion backend, define the path to the minion database
# # you can define it relative to lutim directory or set an absolute path
# # remember that it has to be in a directory writable by Lutim user
# # optional, default is minion.db
# db_path => 'minion.db',
# # PostgreSQL ONLY - only used if you choose postgresql as Minion backend
# # these are the credentials to access the Minion's PostgreSQL database
# # mandatory if you choosed postgresql as Minion backend, no default
# pgdb => {
# database => 'lutim_minion',
# host => 'localhost',
# #user => 'DBUSER',
# #pwd => 'DBPASSWORD'
# }
#},
# define the height of the thumbnails generated at users' will
# this is not the height of the thumbnails send after upload,
# we're talking about thumbnails generated when someone asked for
# https://example.org/lutim/tesrinp?thumb
# this works only if you have ImageMagick
# optional, default is 100 (pixels)
#thumbnail_size => 100,
# maximum number of files that can be downloaded as a single zip archive
# if too many files are asked, it results a timeout, so Lutim split the zip URL
# in multiple URLs, each with max_file_size images.
# timeout behavior depends heavily on your server ressources (CPU) and if images
# are encrypted
# optional, default is 15
#max_files_in_zip => 15,
##########################
# Lutim cron jobs settings
##########################
# number of days shown in /stats page (used with script/lutim cron stats)
# optional, default is 365
#stats_day_num => 365,
# number of days senders' IP addresses are kept in database
# after that delay, they will be deleted from database (used with script/lutim cron cleanbdd)
# optional, default is 365
#keep_ip_during => 365,
# max size of the files directory, in octets
# used by script/lutim cron watch to trigger an action
# optional, no default
max_total_size => 10*1024*1024*1024,
# default action when files directory is over max_total_size (used with script/lutim cron watch)
# valid values are 'warn', 'stop-upload' and 'delete'
# please, see readme
# optional, default is 'warn'
#policy_when_full => 'warn',
# images which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task
# if delete_no_longer_viewed_files is not set, the no longer viewed files will NOT be deleted
# optional, no default
#delete_no_longer_viewed_files => 90
};
+202
View File
@@ -0,0 +1,202 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
{
####################
# Hypnotoad settings
####################
# see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings
hypnotoad => {
# array of IP addresses and ports you want to listen to
listen => ['http://127.0.0.1:8080'],
# if you use Lutim behind a reverse proxy like Nginx, you want to set proxy to 1
# if you use Lutim directly, let it commented
#proxy => 1,
},
################
# Lutim settings
################
# put a way to contact you here and uncomment it
# mandatory
contact => 'John Doe, admin[at]example.com',
# random string used to encrypt cookies
# mandatory
secrets => ['fdjsofjoihrei'],
# choose a theme. See the available themes in `themes` directory
# optional, default is 'default'
#theme => 'default',
# length of the images random URL
# optional, default is 8
#length => 8,
# length of the encryption key
# optional, default is 8
#crypto_key_length => 8,
# how many URLs will be provisioned in a batch ?
# optional, default is 5
#provis_step => 5,
# max number of URLs to be provisioned
# optional, default is 100
#provisioning => 100,
# anti-flood protection delay, in seconds
# users won't be able to ask Lutim to download images more than one per anti_flood_delay seconds
# optional, default is 5
#anti_flood_delay => 5,
# twitter account which will appear on twitter cards
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
# optional, default is @framasky
#tweet_card_via => '@framasky',
# max image size, in octets
# you can write it 10*1024*1024
# optional, default is 10485760
max_file_size => 1048576,
# if you want to have piwik statistics, provide a piwik image tracker
# only the image tracker is allowed, no javascript
# optional, no default
#piwik_img => 'https://piwik.example.org/piwik.php?idsite=1&amp;rec=1',
# if you want to include something in the right of the screen, put it here
# here's an example to put the logo of your hoster
# optional, no default
#hosted_by => 'My super hoster <img src="http://hoster.example.com" alt="Hoster logo">',
# DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED
# Lutim now checks if the X-Forwarded-Proto header is present and equal to https.
# set to 1 if you use Lutim behind a secure web server
# optional, default is 0
#https => 0,
# broadcast_message which will displayed on all pages of Lutim (but no in json response)
# optional, no default
broadcast_message => 'test broadcast message',
# array of authorized domains for API calls.
# if you want to authorize everyone to use the API: ['*']
# optional, no domains allowed by default
#allowed_domains => ['http://1.example.com', 'http://2.example.com'],
# default time limit for files
# valid values are 0, 1, 7, 30 and 365
# optional, default is 0 (no limit)
default_delay => 30,
# number of days after which the images will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay)
# a warning message will be displayed on homepage
# optional, default is 0 (no limit)
max_delay => 200,
# if set to 1, all the images will be encrypted and the encryption option will no be displayed
# optional, default is 0
#always_encrypt => 0,
# length of the image's delete token
# optional, default is 24
#token_length => 24,
# URL sub-directory in which you want Lutim to be accessible
# example: you want to have Lutim under https://example.org/lutim/
# => set prefix to '/lutim' or to '/lutim/', it doesn't matter
# optional, defaut is /
#prefix => '/',
# choose what database you want to use
# valid choices are sqlite and postgresql (all lowercase)
# optional, default is sqlite
dbtype => 'postgresql',
# SQLite ONLY - only used if dbtype is set to sqlite
# define a path to the SQLite database
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is lutim.db
db_path => 'testpg2.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database
# mandatory if you choosed postgresql as dbtype
pgdb => {
database => 'lutimtest',
host => 'localhost',
user => 'lutim',
pwd => 'lutim'
},
# use Minion instead of directly increase counters
# need to launch a minion worker service if enabled
# optional, Minion is disabled by default
minion => {
enabled => 1,
# # Which Minion backend to use?
# # valid values are sqlite and postgresql (all lowercase)
# # mandatory if Minion is enabled, default is sqlite
# dbtype => 'sqlite',
# # SQLite ONLY - only used if if you choose sqlite as Minion backend, define the path to the minion database
# # you can define it relative to lutim directory or set an absolute path
# # remember that it has to be in a directory writable by Lutim user
# # optional, default is minion.db
# db_path => 'minion.db',
# # PostgreSQL ONLY - only used if you choose postgresql as Minion backend
# # these are the credentials to access the Minion's PostgreSQL database
# # mandatory if you choosed postgresql as Minion backend, no default
# pgdb => {
# database => 'lutim_minion',
# host => 'localhost',
# #user => 'DBUSER',
# #pwd => 'DBPASSWORD'
# }
},
# define the height of the thumbnails generated at users' will
# this is not the height of the thumbnails send after upload,
# we're talking about thumbnails generated when someone asked for
# https://example.org/lutim/tesrinp?thumb
# this works only if you have ImageMagick
# optional, default is 100 (pixels)
#thumbnail_size => 100,
# maximum number of files that can be downloaded as a single zip archive
# if too many files are asked, it results a timeout, so Lutim split the zip URL
# in multiple URLs, each with max_file_size images.
# timeout behavior depends heavily on your server ressources (CPU) and if images
# are encrypted
# optional, default is 15
#max_files_in_zip => 15,
##########################
# Lutim cron jobs settings
##########################
# number of days shown in /stats page (used with script/lutim cron stats)
# optional, default is 365
#stats_day_num => 365,
# number of days senders' IP addresses are kept in database
# after that delay, they will be deleted from database (used with script/lutim cron cleanbdd)
# optional, default is 365
#keep_ip_during => 365,
# max size of the files directory, in octets
# used by script/lutim cron watch to trigger an action
# optional, no default
max_total_size => 10*1024*1024*1024,
# default action when files directory is over max_total_size (used with script/lutim cron watch)
# valid values are 'warn', 'stop-upload' and 'delete'
# please, see readme
# optional, default is 'warn'
#policy_when_full => 'warn',
# images which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task
# if delete_no_longer_viewed_files is not set, the no longer viewed files will NOT be deleted
# optional, no default
#delete_no_longer_viewed_files => 90
};
+202
View File
@@ -0,0 +1,202 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
{
####################
# Hypnotoad settings
####################
# see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings
hypnotoad => {
# array of IP addresses and ports you want to listen to
listen => ['http://127.0.0.1:8080'],
# if you use Lutim behind a reverse proxy like Nginx, you want to set proxy to 1
# if you use Lutim directly, let it commented
#proxy => 1,
},
################
# Lutim settings
################
# put a way to contact you here and uncomment it
# mandatory
contact => 'John Doe, admin[at]example.com',
# random string used to encrypt cookies
# mandatory
secrets => ['fdjsofjoihrei'],
# choose a theme. See the available themes in `themes` directory
# optional, default is 'default'
#theme => 'default',
# length of the images random URL
# optional, default is 8
#length => 8,
# length of the encryption key
# optional, default is 8
#crypto_key_length => 8,
# how many URLs will be provisioned in a batch ?
# optional, default is 5
#provis_step => 5,
# max number of URLs to be provisioned
# optional, default is 100
#provisioning => 100,
# anti-flood protection delay, in seconds
# users won't be able to ask Lutim to download images more than one per anti_flood_delay seconds
# optional, default is 5
#anti_flood_delay => 5,
# twitter account which will appear on twitter cards
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
# optional, default is @framasky
#tweet_card_via => '@framasky',
# max image size, in octets
# you can write it 10*1024*1024
# optional, default is 10485760
max_file_size => 1048576,
# if you want to have piwik statistics, provide a piwik image tracker
# only the image tracker is allowed, no javascript
# optional, no default
#piwik_img => 'https://piwik.example.org/piwik.php?idsite=1&amp;rec=1',
# if you want to include something in the right of the screen, put it here
# here's an example to put the logo of your hoster
# optional, no default
#hosted_by => 'My super hoster <img src="http://hoster.example.com" alt="Hoster logo">',
# DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED
# Lutim now checks if the X-Forwarded-Proto header is present and equal to https.
# set to 1 if you use Lutim behind a secure web server
# optional, default is 0
#https => 0,
# broadcast_message which will displayed on all pages of Lutim (but no in json response)
# optional, no default
broadcast_message => 'test broadcast message',
# array of authorized domains for API calls.
# if you want to authorize everyone to use the API: ['*']
# optional, no domains allowed by default
#allowed_domains => ['http://1.example.com', 'http://2.example.com'],
# default time limit for files
# valid values are 0, 1, 7, 30 and 365
# optional, default is 0 (no limit)
default_delay => 30,
# number of days after which the images will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay)
# a warning message will be displayed on homepage
# optional, default is 0 (no limit)
max_delay => 200,
# if set to 1, all the images will be encrypted and the encryption option will no be displayed
# optional, default is 0
#always_encrypt => 0,
# length of the image's delete token
# optional, default is 24
#token_length => 24,
# URL sub-directory in which you want Lutim to be accessible
# example: you want to have Lutim under https://example.org/lutim/
# => set prefix to '/lutim' or to '/lutim/', it doesn't matter
# optional, defaut is /
#prefix => '/',
# choose what database you want to use
# valid choices are sqlite and postgresql (all lowercase)
# optional, default is sqlite
dbtype => 'postgresql',
# SQLite ONLY - only used if dbtype is set to sqlite
# define a path to the SQLite database
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is lutim.db
db_path => 'testpg3.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database
# mandatory if you choosed postgresql as dbtype
pgdb => {
database => 'lutimtest',
host => 'localhost',
user => 'lutim',
pwd => 'lutim'
},
# use Minion instead of directly increase counters
# need to launch a minion worker service if enabled
# optional, Minion is disabled by default
minion => {
enabled => 1,
# Which Minion backend to use?
# valid values are sqlite and postgresql (all lowercase)
# mandatory if Minion is enabled, default is sqlite
dbtype => 'postgresql',
# SQLite ONLY - only used if if you choose sqlite as Minion backend, define the path to the minion database
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is minion.db
db_path => 'minion.db',
# PostgreSQL ONLY - only used if you choose postgresql as Minion backend
# these are the credentials to access the Minion's PostgreSQL database
# mandatory if you choosed postgresql as Minion backend, no default
pgdb => {
database => 'lutim_miniontest',
host => 'localhost',
user => 'lutim',
pwd => 'lutim'
}
},
# define the height of the thumbnails generated at users' will
# this is not the height of the thumbnails send after upload,
# we're talking about thumbnails generated when someone asked for
# https://example.org/lutim/tesrinp?thumb
# this works only if you have ImageMagick
# optional, default is 100 (pixels)
#thumbnail_size => 100,
# maximum number of files that can be downloaded as a single zip archive
# if too many files are asked, it results a timeout, so Lutim split the zip URL
# in multiple URLs, each with max_file_size images.
# timeout behavior depends heavily on your server ressources (CPU) and if images
# are encrypted
# optional, default is 15
#max_files_in_zip => 15,
##########################
# Lutim cron jobs settings
##########################
# number of days shown in /stats page (used with script/lutim cron stats)
# optional, default is 365
#stats_day_num => 365,
# number of days senders' IP addresses are kept in database
# after that delay, they will be deleted from database (used with script/lutim cron cleanbdd)
# optional, default is 365
#keep_ip_during => 365,
# max size of the files directory, in octets
# used by script/lutim cron watch to trigger an action
# optional, no default
max_total_size => 10*1024*1024*1024,
# default action when files directory is over max_total_size (used with script/lutim cron watch)
# valid values are 'warn', 'stop-upload' and 'delete'
# please, see readme
# optional, default is 'warn'
#policy_when_full => 'warn',
# images which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task
# if delete_no_longer_viewed_files is not set, the no longer viewed files will NOT be deleted
# optional, no default
#delete_no_longer_viewed_files => 90
};
+202
View File
@@ -0,0 +1,202 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
{
####################
# Hypnotoad settings
####################
# see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings
hypnotoad => {
# array of IP addresses and ports you want to listen to
listen => ['http://127.0.0.1:8080'],
# if you use Lutim behind a reverse proxy like Nginx, you want to set proxy to 1
# if you use Lutim directly, let it commented
#proxy => 1,
},
################
# Lutim settings
################
# put a way to contact you here and uncomment it
# mandatory
contact => 'John Doe, admin[at]example.com',
# random string used to encrypt cookies
# mandatory
secrets => ['fdjsofjoihrei'],
# choose a theme. See the available themes in `themes` directory
# optional, default is 'default'
#theme => 'default',
# length of the images random URL
# optional, default is 8
#length => 8,
# length of the encryption key
# optional, default is 8
#crypto_key_length => 8,
# how many URLs will be provisioned in a batch ?
# optional, default is 5
#provis_step => 5,
# max number of URLs to be provisioned
# optional, default is 100
#provisioning => 100,
# anti-flood protection delay, in seconds
# users won't be able to ask Lutim to download images more than one per anti_flood_delay seconds
# optional, default is 5
#anti_flood_delay => 5,
# twitter account which will appear on twitter cards
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
# optional, default is @framasky
#tweet_card_via => '@framasky',
# max image size, in octets
# you can write it 10*1024*1024
# optional, default is 10485760
max_file_size => 1048576,
# if you want to have piwik statistics, provide a piwik image tracker
# only the image tracker is allowed, no javascript
# optional, no default
#piwik_img => 'https://piwik.example.org/piwik.php?idsite=1&amp;rec=1',
# if you want to include something in the right of the screen, put it here
# here's an example to put the logo of your hoster
# optional, no default
#hosted_by => 'My super hoster <img src="http://hoster.example.com" alt="Hoster logo">',
# DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED
# Lutim now checks if the X-Forwarded-Proto header is present and equal to https.
# set to 1 if you use Lutim behind a secure web server
# optional, default is 0
#https => 0,
# broadcast_message which will displayed on all pages of Lutim (but no in json response)
# optional, no default
broadcast_message => 'test broadcast message',
# array of authorized domains for API calls.
# if you want to authorize everyone to use the API: ['*']
# optional, no domains allowed by default
#allowed_domains => ['http://1.example.com', 'http://2.example.com'],
# default time limit for files
# valid values are 0, 1, 7, 30 and 365
# optional, default is 0 (no limit)
default_delay => 30,
# number of days after which the images will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay)
# a warning message will be displayed on homepage
# optional, default is 0 (no limit)
max_delay => 200,
# if set to 1, all the images will be encrypted and the encryption option will no be displayed
# optional, default is 0
#always_encrypt => 0,
# length of the image's delete token
# optional, default is 24
#token_length => 24,
# URL sub-directory in which you want Lutim to be accessible
# example: you want to have Lutim under https://example.org/lutim/
# => set prefix to '/lutim' or to '/lutim/', it doesn't matter
# optional, defaut is /
#prefix => '/',
# choose what database you want to use
# valid choices are sqlite and postgresql (all lowercase)
# optional, default is sqlite
dbtype => 'sqlite',
# SQLite ONLY - only used if dbtype is set to sqlite
# define a path to the SQLite database
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is lutim.db
db_path => 'testdqlite1.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database
# mandatory if you choosed postgresql as dbtype
#pgdb => {
# database => 'lutim',
# host => 'localhost',
# #user => 'DBUSER',
# #pwd => 'DBPASSWORD'
#},
# use Minion instead of directly increase counters
# need to launch a minion worker service if enabled
# optional, Minion is disabled by default
#minion => {
# enabled => 0,
# # Which Minion backend to use?
# # valid values are sqlite and postgresql (all lowercase)
# # mandatory if Minion is enabled, default is sqlite
# dbtype => 'sqlite',
# # SQLite ONLY - only used if if you choose sqlite as Minion backend, define the path to the minion database
# # you can define it relative to lutim directory or set an absolute path
# # remember that it has to be in a directory writable by Lutim user
# # optional, default is minion.db
# db_path => 'minion.db',
# # PostgreSQL ONLY - only used if you choose postgresql as Minion backend
# # these are the credentials to access the Minion's PostgreSQL database
# # mandatory if you choosed postgresql as Minion backend, no default
# pgdb => {
# database => 'lutim_minion',
# host => 'localhost',
# #user => 'DBUSER',
# #pwd => 'DBPASSWORD'
# }
#},
# define the height of the thumbnails generated at users' will
# this is not the height of the thumbnails send after upload,
# we're talking about thumbnails generated when someone asked for
# https://example.org/lutim/tesrinp?thumb
# this works only if you have ImageMagick
# optional, default is 100 (pixels)
#thumbnail_size => 100,
# maximum number of files that can be downloaded as a single zip archive
# if too many files are asked, it results a timeout, so Lutim split the zip URL
# in multiple URLs, each with max_file_size images.
# timeout behavior depends heavily on your server ressources (CPU) and if images
# are encrypted
# optional, default is 15
#max_files_in_zip => 15,
##########################
# Lutim cron jobs settings
##########################
# number of days shown in /stats page (used with script/lutim cron stats)
# optional, default is 365
#stats_day_num => 365,
# number of days senders' IP addresses are kept in database
# after that delay, they will be deleted from database (used with script/lutim cron cleanbdd)
# optional, default is 365
#keep_ip_during => 365,
# max size of the files directory, in octets
# used by script/lutim cron watch to trigger an action
# optional, no default
max_total_size => 10*1024*1024*1024,
# default action when files directory is over max_total_size (used with script/lutim cron watch)
# valid values are 'warn', 'stop-upload' and 'delete'
# please, see readme
# optional, default is 'warn'
#policy_when_full => 'warn',
# images which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task
# if delete_no_longer_viewed_files is not set, the no longer viewed files will NOT be deleted
# optional, no default
#delete_no_longer_viewed_files => 90
};
+202
View File
@@ -0,0 +1,202 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
{
####################
# Hypnotoad settings
####################
# see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings
hypnotoad => {
# array of IP addresses and ports you want to listen to
listen => ['http://127.0.0.1:8080'],
# if you use Lutim behind a reverse proxy like Nginx, you want to set proxy to 1
# if you use Lutim directly, let it commented
#proxy => 1,
},
################
# Lutim settings
################
# put a way to contact you here and uncomment it
# mandatory
contact => 'John Doe, admin[at]example.com',
# random string used to encrypt cookies
# mandatory
secrets => ['fdjsofjoihrei'],
# choose a theme. See the available themes in `themes` directory
# optional, default is 'default'
#theme => 'default',
# length of the images random URL
# optional, default is 8
#length => 8,
# length of the encryption key
# optional, default is 8
#crypto_key_length => 8,
# how many URLs will be provisioned in a batch ?
# optional, default is 5
#provis_step => 5,
# max number of URLs to be provisioned
# optional, default is 100
#provisioning => 100,
# anti-flood protection delay, in seconds
# users won't be able to ask Lutim to download images more than one per anti_flood_delay seconds
# optional, default is 5
#anti_flood_delay => 5,
# twitter account which will appear on twitter cards
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
# optional, default is @framasky
#tweet_card_via => '@framasky',
# max image size, in octets
# you can write it 10*1024*1024
# optional, default is 10485760
max_file_size => 1048576,
# if you want to have piwik statistics, provide a piwik image tracker
# only the image tracker is allowed, no javascript
# optional, no default
#piwik_img => 'https://piwik.example.org/piwik.php?idsite=1&amp;rec=1',
# if you want to include something in the right of the screen, put it here
# here's an example to put the logo of your hoster
# optional, no default
#hosted_by => 'My super hoster <img src="http://hoster.example.com" alt="Hoster logo">',
# DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED
# Lutim now checks if the X-Forwarded-Proto header is present and equal to https.
# set to 1 if you use Lutim behind a secure web server
# optional, default is 0
#https => 0,
# broadcast_message which will displayed on all pages of Lutim (but no in json response)
# optional, no default
broadcast_message => 'test broadcast message',
# array of authorized domains for API calls.
# if you want to authorize everyone to use the API: ['*']
# optional, no domains allowed by default
#allowed_domains => ['http://1.example.com', 'http://2.example.com'],
# default time limit for files
# valid values are 0, 1, 7, 30 and 365
# optional, default is 0 (no limit)
default_delay => 30,
# number of days after which the images will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay)
# a warning message will be displayed on homepage
# optional, default is 0 (no limit)
max_delay => 200,
# if set to 1, all the images will be encrypted and the encryption option will no be displayed
# optional, default is 0
#always_encrypt => 0,
# length of the image's delete token
# optional, default is 24
#token_length => 24,
# URL sub-directory in which you want Lutim to be accessible
# example: you want to have Lutim under https://example.org/lutim/
# => set prefix to '/lutim' or to '/lutim/', it doesn't matter
# optional, defaut is /
#prefix => '/',
# choose what database you want to use
# valid choices are sqlite and postgresql (all lowercase)
# optional, default is sqlite
dbtype => 'sqlite',
# SQLite ONLY - only used if dbtype is set to sqlite
# define a path to the SQLite database
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is lutim.db
db_path => 'testsqlite2.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database
# mandatory if you choosed postgresql as dbtype
#pgdb => {
# database => 'lutim',
# host => 'localhost',
# #user => 'DBUSER',
# #pwd => 'DBPASSWORD'
#},
# use Minion instead of directly increase counters
# need to launch a minion worker service if enabled
# optional, Minion is disabled by default
minion => {
enabled => 1,
# # Which Minion backend to use?
# # valid values are sqlite and postgresql (all lowercase)
# # mandatory if Minion is enabled, default is sqlite
# dbtype => 'sqlite',
# # SQLite ONLY - only used if if you choose sqlite as Minion backend, define the path to the minion database
# # you can define it relative to lutim directory or set an absolute path
# # remember that it has to be in a directory writable by Lutim user
# # optional, default is minion.db
# db_path => 'minion.db',
# # PostgreSQL ONLY - only used if you choose postgresql as Minion backend
# # these are the credentials to access the Minion's PostgreSQL database
# # mandatory if you choosed postgresql as Minion backend, no default
# pgdb => {
# database => 'lutim_minion',
# host => 'localhost',
# #user => 'DBUSER',
# #pwd => 'DBPASSWORD'
# }
},
# define the height of the thumbnails generated at users' will
# this is not the height of the thumbnails send after upload,
# we're talking about thumbnails generated when someone asked for
# https://example.org/lutim/tesrinp?thumb
# this works only if you have ImageMagick
# optional, default is 100 (pixels)
#thumbnail_size => 100,
# maximum number of files that can be downloaded as a single zip archive
# if too many files are asked, it results a timeout, so Lutim split the zip URL
# in multiple URLs, each with max_file_size images.
# timeout behavior depends heavily on your server ressources (CPU) and if images
# are encrypted
# optional, default is 15
#max_files_in_zip => 15,
##########################
# Lutim cron jobs settings
##########################
# number of days shown in /stats page (used with script/lutim cron stats)
# optional, default is 365
#stats_day_num => 365,
# number of days senders' IP addresses are kept in database
# after that delay, they will be deleted from database (used with script/lutim cron cleanbdd)
# optional, default is 365
#keep_ip_during => 365,
# max size of the files directory, in octets
# used by script/lutim cron watch to trigger an action
# optional, no default
max_total_size => 10*1024*1024*1024,
# default action when files directory is over max_total_size (used with script/lutim cron watch)
# valid values are 'warn', 'stop-upload' and 'delete'
# please, see readme
# optional, default is 'warn'
#policy_when_full => 'warn',
# images which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task
# if delete_no_longer_viewed_files is not set, the no longer viewed files will NOT be deleted
# optional, no default
#delete_no_longer_viewed_files => 90
};
+202
View File
@@ -0,0 +1,202 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
{
####################
# Hypnotoad settings
####################
# see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings
hypnotoad => {
# array of IP addresses and ports you want to listen to
listen => ['http://127.0.0.1:8080'],
# if you use Lutim behind a reverse proxy like Nginx, you want to set proxy to 1
# if you use Lutim directly, let it commented
#proxy => 1,
},
################
# Lutim settings
################
# put a way to contact you here and uncomment it
# mandatory
contact => 'John Doe, admin[at]example.com',
# random string used to encrypt cookies
# mandatory
secrets => ['fdjsofjoihrei'],
# choose a theme. See the available themes in `themes` directory
# optional, default is 'default'
#theme => 'default',
# length of the images random URL
# optional, default is 8
#length => 8,
# length of the encryption key
# optional, default is 8
#crypto_key_length => 8,
# how many URLs will be provisioned in a batch ?
# optional, default is 5
#provis_step => 5,
# max number of URLs to be provisioned
# optional, default is 100
#provisioning => 100,
# anti-flood protection delay, in seconds
# users won't be able to ask Lutim to download images more than one per anti_flood_delay seconds
# optional, default is 5
#anti_flood_delay => 5,
# twitter account which will appear on twitter cards
# see https://dev.twitter.com/docs/cards/validation/validator to register your Lutim instance on twitter
# optional, default is @framasky
#tweet_card_via => '@framasky',
# max image size, in octets
# you can write it 10*1024*1024
# optional, default is 10485760
max_file_size => 1048576,
# if you want to have piwik statistics, provide a piwik image tracker
# only the image tracker is allowed, no javascript
# optional, no default
#piwik_img => 'https://piwik.example.org/piwik.php?idsite=1&amp;rec=1',
# if you want to include something in the right of the screen, put it here
# here's an example to put the logo of your hoster
# optional, no default
#hosted_by => 'My super hoster <img src="http://hoster.example.com" alt="Hoster logo">',
# DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED
# Lutim now checks if the X-Forwarded-Proto header is present and equal to https.
# set to 1 if you use Lutim behind a secure web server
# optional, default is 0
#https => 0,
# broadcast_message which will displayed on all pages of Lutim (but no in json response)
# optional, no default
broadcast_message => 'test broadcast message',
# array of authorized domains for API calls.
# if you want to authorize everyone to use the API: ['*']
# optional, no domains allowed by default
#allowed_domains => ['http://1.example.com', 'http://2.example.com'],
# default time limit for files
# valid values are 0, 1, 7, 30 and 365
# optional, default is 0 (no limit)
default_delay => 30,
# number of days after which the images will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay)
# a warning message will be displayed on homepage
# optional, default is 0 (no limit)
max_delay => 200,
# if set to 1, all the images will be encrypted and the encryption option will no be displayed
# optional, default is 0
#always_encrypt => 0,
# length of the image's delete token
# optional, default is 24
#token_length => 24,
# URL sub-directory in which you want Lutim to be accessible
# example: you want to have Lutim under https://example.org/lutim/
# => set prefix to '/lutim' or to '/lutim/', it doesn't matter
# optional, defaut is /
#prefix => '/',
# choose what database you want to use
# valid choices are sqlite and postgresql (all lowercase)
# optional, default is sqlite
dbtype => 'sqlite',
# SQLite ONLY - only used if dbtype is set to sqlite
# define a path to the SQLite database
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is lutim.db
db_path => 'testsqlite3.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database
# mandatory if you choosed postgresql as dbtype
#pgdb => {
# database => 'lutim',
# host => 'localhost',
# #user => 'DBUSER',
# #pwd => 'DBPASSWORD'
#},
# use Minion instead of directly increase counters
# need to launch a minion worker service if enabled
# optional, Minion is disabled by default
minion => {
enabled => 1,
# Which Minion backend to use?
# valid values are sqlite and postgresql (all lowercase)
# mandatory if Minion is enabled, default is sqlite
dbtype => 'postgresql',
# SQLite ONLY - only used if if you choose sqlite as Minion backend, define the path to the minion database
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is minion.db
db_path => 'minion.db',
# PostgreSQL ONLY - only used if you choose postgresql as Minion backend
# these are the credentials to access the Minion's PostgreSQL database
# mandatory if you choosed postgresql as Minion backend, no default
pgdb => {
database => 'lutim_miniontest',
host => 'localhost',
user => 'lutim',
pwd => 'lutim'
}
},
# define the height of the thumbnails generated at users' will
# this is not the height of the thumbnails send after upload,
# we're talking about thumbnails generated when someone asked for
# https://example.org/lutim/tesrinp?thumb
# this works only if you have ImageMagick
# optional, default is 100 (pixels)
#thumbnail_size => 100,
# maximum number of files that can be downloaded as a single zip archive
# if too many files are asked, it results a timeout, so Lutim split the zip URL
# in multiple URLs, each with max_file_size images.
# timeout behavior depends heavily on your server ressources (CPU) and if images
# are encrypted
# optional, default is 15
#max_files_in_zip => 15,
##########################
# Lutim cron jobs settings
##########################
# number of days shown in /stats page (used with script/lutim cron stats)
# optional, default is 365
#stats_day_num => 365,
# number of days senders' IP addresses are kept in database
# after that delay, they will be deleted from database (used with script/lutim cron cleanbdd)
# optional, default is 365
#keep_ip_during => 365,
# max size of the files directory, in octets
# used by script/lutim cron watch to trigger an action
# optional, no default
max_total_size => 10*1024*1024*1024,
# default action when files directory is over max_total_size (used with script/lutim cron watch)
# valid values are 'warn', 'stop-upload' and 'delete'
# please, see readme
# optional, default is 'warn'
#policy_when_full => 'warn',
# images which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task
# if delete_no_longer_viewed_files is not set, the no longer viewed files will NOT be deleted
# optional, no default
#delete_no_longer_viewed_files => 90
};
+108
View File
@@ -0,0 +1,108 @@
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
use Mojo::Base -strict;
use Mojo::File;
use Mojo::JSON qw(true false);
use Mojolicious;
use Test::More;
use Test::Mojo;
use FindBin qw($Bin);
use Digest::file qw(digest_file_hex);
my ($m, $cfile);
BEGIN {
use lib 'lib';
$m = Mojolicious->new;
$cfile = Mojo::File->new($Bin, '..' , 'lutim.conf');
if (defined $ENV{MOJO_CONFIG}) {
$cfile = Mojo::File->new($ENV{MOJO_CONFIG});
unless (-e $cfile->to_abs) {
$cfile = Mojo::File->new($Bin, '..', $ENV{MOJO_CONFIG});
}
}
my $config = $m->plugin('Config' =>
{
file => $cfile->to_abs->to_string,
default => {
dbtype => 'sqlite'
}
}
);
$m->plugin('Lutim::Plugin::Helpers');
$m->plugin('DebugDumperHelper');
}
# Home page
my $t = Test::Mojo->new('Lutim');
$t->get_ok('/')
->status_is(200)
->content_like(qr/Let's Upload That IMage/i);
# Instance settings informations
$t->get_ok('/infos')
->status_is(200)
->json_has('image_magick')
->json_is(
'/always_encrypt' => false,
'/broadcast_message' => 'test broadcast message',
'/contact' => 'John Doe, admin[at]example.com',
'/default_delay' => 30,
'/max_delay' => 200,
'/max_file_size' => 1048576
);
# Post image
my $image = Mojo::File->new($Bin, '..', 'themes', 'default', 'public', 'img', 'Lutim.png')->to_string;
$t->post_ok('/' => form => { file => { file => $image }, format => 'json' })
->status_is(200)
->json_has('msg', 'success')
->json_is('/success' => true, '/msg/filename' => 'Lutim.png')
->json_like('/msg/short' => qr#[-_a-zA-Z0-9]{8}#, '/msg/real_short' => qr#[-_a-zA-Z0-9]{8}#, '/msg/token' => qr#[-_a-zA-Z0-9]{24}#);
# Post delete-at-first-view image
my $raw = $t->ua->post('/' => form => { file => { file => $image }, 'first-view' => 1, format => 'json' })->res;
my $short = $raw->json('/msg/short');
$t->get_ok('/'.$short)
->status_is(200);
$t->get_ok('/'.$short)
->status_is(302);
# Delete image with token
$raw = $t->ua->post('/' => form => { file => { file => $image }, format => 'json' })->res;
my $rshort = $raw->json('/msg/real_short');
my $token = $raw->json('/msg/token');
$t->get_ok('/'.$rshort)
->status_is(200);
$t->get_ok('/d/'.$rshort.'/'.$token, form => { format => 'json' })
->status_is('200')
->json_is(
{
success => true,
msg => 'The image Lutim.png has been successfully deleted'
}
);
$t->get_ok('/'.$rshort)
->status_is(302);
# Needed if we use Minion with sqlite for increasing counters
sleep 8;
# Get image counter
$t->post_ok('/c', form => { short => $rshort, token => $token })
->status_is(200)
->json_is(
{
success => true,
counter => 1,
enabled => false
}
);
done_testing();
+104 -143
View File
@@ -18,19 +18,11 @@ msgstr ""
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. ($delay)
#. (config('max_delay')
#. (7)
#. (30)
#: lib/Lutim/Command/cron/stats.pm:100
#: lib/Lutim/Command/cron/stats.pm:110
#: lib/Lutim/Command/cron/stats.pm:111
#: lib/Lutim/Command/cron/stats.pm:127
#: lib/Lutim/Command/cron/stats.pm:128
#: lib/Lutim/Command/cron/stats.pm:99
#: themes/default/templates/partial/lutim.js.ep:235
#: themes/default/templates/partial/lutim.js.ep:244
#: themes/default/templates/partial/lutim.js.ep:245
#. ($delay)
#. (config('max_delay')
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:138 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
msgid "%1 days"
msgstr "%1 Tage"
@@ -43,41 +35,35 @@ msgstr "%1 Bilder wurden bisher über diese Instanz versendet."
msgid "-or-"
msgstr "-oder-"
#: lib/Lutim/Command/cron/stats.pm:101
#: lib/Lutim/Command/cron/stats.pm:112
#: lib/Lutim/Command/cron/stats.pm:129
#: themes/default/templates/index.html.ep:5
#: lib/Lutim.pm:192 lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
msgid "1 year"
msgstr "1 Jahr"
#: lib/Lutim/Command/cron/stats.pm:109
#: lib/Lutim/Command/cron/stats.pm:126
#: lib/Lutim/Command/cron/stats.pm:98
#: themes/default/templates/index.html.ep:4
#: themes/default/templates/partial/lutim.js.ep:244
#: lib/Lutim.pm:191 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
msgid "24 hours"
msgstr "24 Stunden"
#: themes/default/templates/myfiles.html.ep:79
#: themes/default/templates/partial/myfiles.js.ep:57
msgid ": Error while trying to get the counter."
msgstr ":Fehler beim Abrufen des Zählers."
#: lib/Lutim/Command/cron/stats.pm:94
#: lib/Lutim/Command/cron/stats.pm:144 themes/default/templates/raw.html.ep:3
msgid "Active images"
msgstr ""
#: lib/Lutim/Controller.pm:286
#: lib/Lutim/Controller.pm:288
msgid "An error occured while downloading the image."
msgstr "Beim Herunterladen des Bildes ist ein Fehler aufgetreten."
#: themes/default/templates/about.html.ep:41
#: themes/default/templates/myfiles.html.ep:27
#: themes/default/templates/stats.html.ep:25
#: themes/default/templates/zip.html.ep:2
msgid "Archives download"
msgstr ""
#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:64 themes/default/templates/stats.html.ep:25
msgid "Back to homepage"
msgstr "Zurück zur Hauptseite"
#: themes/default/templates/index.html.ep:193
#: themes/default/templates/index.html.ep:194
#: themes/default/templates/index.html.ep:193 themes/default/templates/index.html.ep:194
msgid "Click to open the file browser"
msgstr "Klicken um den Dateibrowser zu öffnen"
@@ -85,27 +71,15 @@ msgstr "Klicken um den Dateibrowser zu öffnen"
msgid "Contributors"
msgstr "Mitwirkende"
#: themes/default/templates/partial/lutim.js.ep:310
#: themes/default/templates/partial/lutim.js.ep:359
#: themes/default/templates/partial/lutim.js.ep:437
#: themes/default/templates/partial/lutim.js.ep:214 themes/default/templates/partial/lutim.js.ep:268 themes/default/templates/partial/lutim.js.ep:346
msgid "Copy all view links to clipboard"
msgstr "Alle Links zum Anschauen in die Zwischenablage kopieren"
#: themes/default/templates/index.html.ep:18
#: themes/default/templates/index.html.ep:36
#: themes/default/templates/index.html.ep:69
#: themes/default/templates/index.html.ep:77
#: themes/default/templates/index.html.ep:85
#: themes/default/templates/index.html.ep:93
#: themes/default/templates/partial/common.js.ep:45
#: themes/default/templates/partial/lutim.js.ep:176
#: themes/default/templates/partial/lutim.js.ep:188
#: themes/default/templates/partial/lutim.js.ep:202
#: themes/default/templates/partial/lutim.js.ep:217
#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:150 themes/default/templates/partial/lutim.js.ep:105 themes/default/templates/partial/lutim.js.ep:120 themes/default/templates/partial/lutim.js.ep:79 themes/default/templates/partial/lutim.js.ep:91
msgid "Copy to clipboard"
msgstr "In die Zwischenablage kopieren"
#: themes/default/templates/myfiles.html.ep:15
#: themes/default/templates/myfiles.html.ep:52
msgid "Counter"
msgstr "Zähler"
@@ -117,26 +91,19 @@ msgstr ""
msgid "Delay repartition chart for enabled images"
msgstr ""
#: themes/default/templates/index.html.ep:115
#: themes/default/templates/index.html.ep:147
#: themes/default/templates/index.html.ep:178
#: themes/default/templates/myfiles.html.ep:16
#: themes/default/templates/partial/lutim.js.ep:256
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:159
msgid "Delete at first view?"
msgstr "Nach erstem Aufruf löschen?"
#: lib/Lutim/Command/cron/stats.pm:95
#: lib/Lutim/Command/cron/stats.pm:145 themes/default/templates/raw.html.ep:4
msgid "Deleted images"
msgstr ""
#: lib/Lutim/Command/cron/stats.pm:96
#: lib/Lutim/Command/cron/stats.pm:146 themes/default/templates/raw.html.ep:5
msgid "Deleted images in 30 days"
msgstr ""
#: themes/default/templates/index.html.ep:98
#: themes/default/templates/myfiles.html.ep:19
#: themes/default/templates/partial/common.js.ep:37
#: themes/default/templates/partial/common.js.ep:40
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:142 themes/default/templates/partial/common.js.ep:145
msgid "Deletion link"
msgstr "Link zum Löschen"
@@ -144,15 +111,11 @@ msgstr "Link zum Löschen"
msgid "Download all images"
msgstr "Laden Sie alle Bilder"
#: themes/default/templates/index.html.ep:81
#: themes/default/templates/index.html.ep:83
#: themes/default/templates/partial/lutim.js.ep:194
#: themes/default/templates/partial/lutim.js.ep:198
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:101 themes/default/templates/partial/lutim.js.ep:97
msgid "Download link"
msgstr "Link zum Herunterladen"
#: themes/default/templates/index.html.ep:28
#: themes/default/templates/index.html.ep:31
#: themes/default/templates/index.html.ep:28 themes/default/templates/index.html.ep:31 themes/default/templates/myfiles.html.ep:30 themes/default/templates/myfiles.html.ep:33
msgid "Download zip link"
msgstr "Link zum Archivbilder"
@@ -164,12 +127,11 @@ msgstr "Bilder hierher ziehen"
msgid "Drag and drop an image in the appropriate area or use the traditional way to send files and Lutim will provide you four URLs. One to view the image, an other to directly download it, one you can use on social networks and a last to delete the image when you want."
msgstr "Ziehe Bilder in den dafür vorgesehenen Bereich und Lutim wird vier URLs generieren. Eine zum Anschauen, eine zum direkten Herunterladen, eine zum Nutzen in sozialen Netzwerken und eine letzte um das Bild zu löschen."
#: themes/default/templates/index.html.ep:150
#: themes/default/templates/index.html.ep:181
#: themes/default/templates/index.html.ep:150 themes/default/templates/index.html.ep:181
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Verschlüssle das Bild (Lutim behält den Key nicht)"
#: themes/default/templates/partial/lutim.js.ep:72
#: themes/default/templates/partial/lutim.js.ep:44
msgid "Error while trying to modify the image."
msgstr "Beim bearbeiten des Bildes ist ein Fehler aufgetreten."
@@ -177,11 +139,11 @@ msgstr "Beim bearbeiten des Bildes ist ein Fehler aufgetreten."
msgid "Evolution of total files"
msgstr "Entwicklung der Anzahl an Dateien"
#: themes/default/templates/myfiles.html.ep:18
#: themes/default/templates/myfiles.html.ep:55
msgid "Expires at"
msgstr "Läuft ab am"
#: themes/default/templates/myfiles.html.ep:13
#: themes/default/templates/myfiles.html.ep:50
msgid "File name"
msgstr "Dateiname"
@@ -189,21 +151,19 @@ msgstr "Dateiname"
msgid "For more details, see the <a href=\"https://framagit.org/luc/lutim\">homepage of the project</a>."
msgstr "Besuche für mehr Details die <a href=\"https://framagit.org/luc/lutim\">Homepage des Projekts</a>."
#: themes/default/templates/layouts/default.html.ep:50
#: themes/default/templates/layouts/default.html.ep:55
msgid "Fork me!"
msgstr "Fork me!"
#: themes/default/templates/index.html.ep:10
#: themes/default/templates/index.html.ep:13
#: themes/default/templates/index.html.ep:10 themes/default/templates/index.html.ep:13 themes/default/templates/myfiles.html.ep:12 themes/default/templates/myfiles.html.ep:15
msgid "Gallery link"
msgstr "Link zur Galerie"
#: themes/default/templates/partial/lutim.js.ep:125
#: themes/default/templates/partial/lutim.js.ep:142
#: themes/default/templates/partial/common.js.ep:104 themes/default/templates/partial/common.js.ep:87
msgid "Hit Ctrl+C, then Enter to copy the short link"
msgstr "Drücke STRG+C und dann Enter um den Kurz-Link zu kopieren."
#: themes/default/templates/layouts/default.html.ep:45
#: themes/default/templates/layouts/default.html.ep:50
msgid "Homepage"
msgstr "Webseite"
@@ -223,27 +183,30 @@ msgstr "Wie kann ich ein Bild melden?"
msgid "If the files are deleted if you ask it while posting it, their SHA512 footprint are retained."
msgstr "Wenn du versuchst, ein Bild während dem Hochladen zu löschen, wird die SHA512-Summe des Bildes behalten."
#: themes/default/templates/index.html.ep:163
#: themes/default/templates/index.html.ep:203
#: themes/default/templates/index.html.ep:163 themes/default/templates/index.html.ep:203
msgid "Image URL"
msgstr "Bild-URL"
#: lib/Lutim/Command/cron/stats.pm:93
#: lib/Lutim/Command/cron/stats.pm:143 themes/default/templates/raw.html.ep:2
msgid "Image delay"
msgstr ""
#: lib/Lutim/Controller.pm:715
#: lib/Lutim/Controller.pm:710
msgid "Image not found."
msgstr "Bild nicht gefunden"
#: themes/default/templates/layouts/default.html.ep:49
#: themes/default/templates/layouts/default.html.ep:54
msgid "Informations"
msgstr "Informationen"
#: themes/default/templates/layouts/default.html.ep:55
#: themes/default/templates/layouts/default.html.ep:62
msgid "Install webapp"
msgstr "Installiere die Webapp"
#: themes/default/templates/layouts/default.html.ep:61
msgid "Instance's statistics"
msgstr ""
#: themes/default/templates/about.html.ep:11
msgid "Is it really anonymous?"
msgstr "Ist es wirklich anonym?"
@@ -256,29 +219,30 @@ msgstr "Is es wirklich kostenlos?"
msgid "Juste like you pronounce the French word <a href=\"https://fr.wikipedia.org/wiki/Lutin\">lutin</a> (/ly.tɛ̃/)."
msgstr "Genauso wie das französische Wort <a href=\"https://fr.wikipedia.org/wiki/Lutin\">lutin</a> (/ly.tɛ̃/)."
#: themes/default/templates/index.html.ep:153
#: themes/default/templates/index.html.ep:184
#: themes/default/templates/index.html.ep:153 themes/default/templates/index.html.ep:184
msgid "Keep EXIF tags"
msgstr "Behalte EXIF-Daten"
#: themes/default/templates/index.html.ep:118
#: themes/default/templates/index.html.ep:166
#: themes/default/templates/index.html.ep:206
#: themes/default/templates/partial/lutim.js.ep:260
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:163
msgid "Let's go!"
msgstr "Los gehts!"
#: themes/default/templates/layouts/default.html.ep:48
#: themes/default/templates/layouts/default.html.ep:58
msgid "Liberapay button"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:53
msgid "License:"
msgstr "Lizenz:"
#: themes/default/templates/index.html.ep:89
#: themes/default/templates/index.html.ep:91
#: themes/default/templates/partial/lutim.js.ep:208
#: themes/default/templates/partial/lutim.js.ep:212
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:111 themes/default/templates/partial/lutim.js.ep:115
msgid "Link for share on social networks"
msgstr "Links zum teilen auf sozialen Netzwerken"
#: themes/default/templates/zip.html.ep:7
msgid "Lutim can't zip so many images at once, so it splitted your demand in multiple URLs."
msgstr ""
#: themes/default/templates/about.html.ep:4
msgid "Lutim is a free (as in free beer) and anonymous image hosting service. It's also the name of the free (as in free speech) software which provides this service."
msgstr ""
@@ -289,24 +253,19 @@ msgstr ""
msgid "Main developers"
msgstr "Haupt-Entwickler"
#: themes/default/templates/index.html.ep:73
#: themes/default/templates/index.html.ep:75
#: themes/default/templates/partial/lutim.js.ep:182
#: themes/default/templates/partial/lutim.js.ep:185
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:85 themes/default/templates/partial/lutim.js.ep:88
msgid "Markdown syntax"
msgstr "Markdown Syntax"
#: themes/default/templates/layouts/default.html.ep:54
#: themes/default/templates/myfiles.html.ep:2
#: themes/default/templates/layouts/default.html.ep:60 themes/default/templates/myfiles.html.ep:2
msgid "My images"
msgstr "Meine Bilder"
#: themes/default/templates/myfiles.html.ep:39
#: themes/default/templates/partial/myfiles.js.ep:19
msgid "No limit"
msgstr "Keine Begrenzung"
#: themes/default/templates/index.html.ep:165
#: themes/default/templates/index.html.ep:198
#: themes/default/templates/index.html.ep:165 themes/default/templates/index.html.ep:198
msgid "Only images are allowed"
msgstr "Es sind nur Bilder erlaubt"
@@ -318,6 +277,10 @@ msgstr "Nur die Bilder, die über diesen Browser versendet wurden, werden hier a
msgid "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
msgstr "Nur der Hochladende (natürlich nur, wenn er vorher auch Rechteinhaber des Bildes war)"
#: themes/default/templates/zip.html.ep:12
msgid "Please click on each URL to download the different zip files."
msgstr ""
#. (config('contact')
#: themes/default/templates/about.html.ep:19
msgid "Please contact the administrator: %1"
@@ -331,24 +294,31 @@ msgstr ""
msgid "Send an image"
msgstr "Sende ein Bild"
#: themes/default/templates/partial/lutim.js.ep:51
#: themes/default/templates/partial/lutim.js.ep:20
msgid "Share it!"
msgstr "Teile es!"
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:56
msgid "Share on Twitter"
msgstr "Teile es auf Twitter"
#: themes/default/templates/index.html.ep:133
#: themes/default/templates/partial/lutim.js.ep:271
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:174
msgid "Something bad happened"
msgstr "Es ist ein Fehler aufgetreten"
#. ($c->config('contact')
#: lib/Lutim/Controller.pm:723
#: lib/Lutim/Controller.pm:717
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
msgstr "Es ist ein Fehler aufgetreten. Versuche es erneut oder kontaktiere den Administrator (%1)."
#: themes/default/templates/layouts/default.html.ep:58
msgid "Support the author on Liberapay"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:57
msgid "Support the author on Tipeee"
msgstr ""
#: themes/default/templates/about.html.ep:13
msgid "The IP address of the image's sender is retained for a delay which depends of the administrator's choice (for the official instance, which is located in France, it's one year)."
msgstr "Die IP-Adresse des Nutzers wird für eine bestimmte Zeit gespeichert. Diese kann der Administrator frei wählen (für die offizielle Instanz, die in Frankreich gehostet ist, liegt diese Zeit bei einem Jahr)"
@@ -357,26 +327,27 @@ msgstr "Die IP-Adresse des Nutzers wird für eine bestimmte Zeit gespeichert. Di
msgid "The Lutim software is a <a href=\"http://en.wikipedia.org/wiki/Free_software\">free software</a>, which allows you to download and install it on you own server. Have a look at the <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> to see what you can do."
msgstr "Lutim ist <a href=\"https://de.wikipedia.org/wiki/Freie_Software\">freie Software</a>, was dir erlaubt sie herunterzuladen und sie auf deinem eigenem Server zu installieren. Schau dir die <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> an um deine Recht zu sehen."
#: lib/Lutim/Controller.pm:305
#: lib/Lutim/Controller.pm:307
msgid "The URL is not valid."
msgstr "Die URL ist nicht gültig."
#: lib/Lutim/Controller.pm:117
#: lib/Lutim/Controller.pm:186
#: themes/default/templates/zip.html.ep:16
msgid "The automatic download process will open a tab in your browser for each link. You need to allow popups for Lutim."
msgstr ""
#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188
msgid "The delete token is invalid."
msgstr "Das Token zum Löschen ist ungültig."
#. ($upload->filename)
#: lib/Lutim/Controller.pm:449
#: lib/Lutim/Controller.pm:445
msgid "The file %1 is not an image."
msgstr "Die Datei %1 ist kein Bild."
#. ($max_file_size)
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#: lib/Lutim/Controller.pm:269
#: lib/Lutim/Controller.pm:338
#: themes/default/templates/partial/lutim.js.ep:332
#. (config('max_file_size')
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:240
msgid "The file exceed the size limit (%1)"
msgstr "Die Datei überschreitet die Größenbeschränkung (%1)"
@@ -385,17 +356,16 @@ msgid "The graph's datas are not updated in real-time."
msgstr "Die Daten des Graphs werden nicht in Echtzeit aktualisiert."
#. ($image->filename)
#: lib/Lutim/Controller.pm:188
#: lib/Lutim/Controller.pm:190
msgid "The image %1 has already been deleted."
msgstr "Das Bild %1 wurde schon gelöscht."
#. ($image->filename)
#: lib/Lutim/Controller.pm:197
#: lib/Lutim/Controller.pm:202
#: lib/Lutim/Controller.pm:199 lib/Lutim/Controller.pm:204
msgid "The image %1 has been successfully deleted"
msgstr "Das Bild %1 wurde erfolgreich gelöscht."
#: lib/Lutim/Controller.pm:125
#: lib/Lutim/Controller.pm:128
msgid "The image's delay has been successfully modified"
msgstr "Die Zeit bis zum Löschen des Bildes wurde erfolgreich geändert."
@@ -408,37 +378,32 @@ msgid "The images you post on Lutim can be stored indefinitely or be deleted at
msgstr "Die Bilder, die du auf Lutim hochlädst, können entweder nie, nach dem ersten Aufruf oder nach einer bestimmten Zeit gelöscht werden."
#. ($c->config->{contact})
#: lib/Lutim/Controller.pm:444
#: lib/Lutim/Controller.pm:442
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "Es sind keine URLs mehr verfügbar. Versuche es erneut oder kontaktiere den Administrator. %1"
#: lib/Lutim/Command/cron/stats.pm:102
#: themes/default/templates/layouts/default.html.ep:57
msgid "Tipeee button"
msgstr ""
#: lib/Lutim/Command/cron/stats.pm:152 themes/default/templates/raw.html.ep:11
msgid "Total"
msgstr ""
#: themes/default/templates/index.html.ep:60
#: themes/default/templates/partial/lutim.js.ep:45
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:14
msgid "Tweet it!"
msgstr "Twittere es!"
#. ($short)
#: lib/Lutim/Controller.pm:159
#: lib/Lutim/Controller.pm:231
#: lib/Lutim/Controller.pm:162 lib/Lutim/Controller.pm:233
msgid "Unable to find the image %1."
msgstr "Konnte das Bild %1 nicht finden."
#: lib/Lutim.pm:85
#: lib/Lutim/Controller.pm:534
#: lib/Lutim/Controller.pm:580
#: lib/Lutim/Controller.pm:624
#: lib/Lutim/Controller.pm:664
#: lib/Lutim/Controller.pm:676
#: lib/Lutim/Controller.pm:687
#: lib/Lutim/Controller.pm:712
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:616 lib/Lutim/Controller.pm:659 lib/Lutim/Controller.pm:671 lib/Lutim/Controller.pm:682 lib/Lutim/Controller.pm:707 lib/Lutim/Plugin/Helpers.pm:57
msgid "Unable to find the image: it has been deleted."
msgstr "Dieses Bild wurde gelöscht."
#: lib/Lutim/Controller.pm:101
#: lib/Lutim/Controller.pm:105
msgid "Unable to get counter"
msgstr "Konnte den Zähler nicht abrufen"
@@ -446,12 +411,11 @@ msgstr "Konnte den Zähler nicht abrufen"
msgid "Unlike many image sharing services, you don't give us rights on uploaded images."
msgstr "Im Gegensatz zu anderen Bild-Hosting-Diensten, überträgst du uns nicht die Rechte an hochgeladenen Bildern."
#: themes/default/templates/index.html.ep:162
#: themes/default/templates/index.html.ep:201
#: themes/default/templates/index.html.ep:162 themes/default/templates/index.html.ep:201
msgid "Upload an image with its URL"
msgstr "Lade ein Bild über seine URL hoch"
#: themes/default/templates/myfiles.html.ep:17
#: themes/default/templates/myfiles.html.ep:54
msgid "Uploaded at"
msgstr "Hochgeladen am"
@@ -459,16 +423,12 @@ msgstr "Hochgeladen am"
msgid "Uploaded files by days"
msgstr "Hochgeladene Bilder pro Tag"
#. ($config->{contact})
#: lib/Lutim.pm:189
#. ($c->app->config('contact')
#: lib/Lutim/Plugin/Helpers.pm:152
msgid "Uploading is currently disabled, please try later or contact the administrator (%1)."
msgstr "Hochladen ist momentan deaktiviert. Versuche es später erneut oder kontaktiere den Administrator (%1)."
#: themes/default/templates/index.html.ep:65
#: themes/default/templates/index.html.ep:67
#: themes/default/templates/myfiles.html.ep:14
#: themes/default/templates/partial/lutim.js.ep:168
#: themes/default/templates/partial/lutim.js.ep:172
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:71 themes/default/templates/partial/lutim.js.ep:75
msgid "View link"
msgstr "Link ansehen"
@@ -492,6 +452,10 @@ msgstr "Ja, ist es! Auf der anderen Seite wird deine IP-Adresse, wegen rechtlich
msgid "Yes, it is! On the other side, if you want to support the developer, you can do it via <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> or via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
msgstr "Ja, ist es! Auf der anderen Seite kannst du den Entwickler via <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> oder <a href=\"https://liberapay.com/sky/\">Liberapay</a> unterstützen."
#: themes/default/templates/zip.html.ep:6
msgid "You asked to download a zip archive for too much files."
msgstr ""
#: themes/default/templates/about.html.ep:8
msgid "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
msgstr "Du kannst Bilder, die du auf Lutim hochlädst, entweder nach dem ernsten Ansehen (oder Herunterladen) oder nach einem der vorgeschlagenen Zeiten löschen lassen."
@@ -504,10 +468,7 @@ msgstr "und auf"
msgid "core developer"
msgstr "Haupt-Entwickler"
#: lib/Lutim/Command/cron/stats.pm:108
#: lib/Lutim/Command/cron/stats.pm:125
#: lib/Lutim/Command/cron/stats.pm:97
#: themes/default/templates/index.html.ep:3
#: lib/Lutim.pm:190 lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
msgid "no time limit"
msgstr "keine Zeit-Begrenzung"
+105 -143
View File
@@ -16,19 +16,11 @@ msgstr ""
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. ($delay)
#. (config('max_delay')
#. (7)
#. (30)
#: lib/Lutim/Command/cron/stats.pm:100
#: lib/Lutim/Command/cron/stats.pm:110
#: lib/Lutim/Command/cron/stats.pm:111
#: lib/Lutim/Command/cron/stats.pm:127
#: lib/Lutim/Command/cron/stats.pm:128
#: lib/Lutim/Command/cron/stats.pm:99
#: themes/default/templates/partial/lutim.js.ep:235
#: themes/default/templates/partial/lutim.js.ep:244
#: themes/default/templates/partial/lutim.js.ep:245
#. ($delay)
#. (config('max_delay')
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:138 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
msgid "%1 days"
msgstr ""
@@ -41,41 +33,35 @@ msgstr "%1 sent images on this instance from beginning."
msgid "-or-"
msgstr "-or-"
#: lib/Lutim/Command/cron/stats.pm:101
#: lib/Lutim/Command/cron/stats.pm:112
#: lib/Lutim/Command/cron/stats.pm:129
#: themes/default/templates/index.html.ep:5
#: lib/Lutim.pm:192 lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
msgid "1 year"
msgstr "1 year"
#: lib/Lutim/Command/cron/stats.pm:109
#: lib/Lutim/Command/cron/stats.pm:126
#: lib/Lutim/Command/cron/stats.pm:98
#: themes/default/templates/index.html.ep:4
#: themes/default/templates/partial/lutim.js.ep:244
#: lib/Lutim.pm:191 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
msgid "24 hours"
msgstr "24 hours"
#: themes/default/templates/myfiles.html.ep:79
#: themes/default/templates/partial/myfiles.js.ep:57
msgid ": Error while trying to get the counter."
msgstr ""
#: lib/Lutim/Command/cron/stats.pm:94
#: lib/Lutim/Command/cron/stats.pm:144 themes/default/templates/raw.html.ep:3
msgid "Active images"
msgstr ""
#: lib/Lutim/Controller.pm:286
#: lib/Lutim/Controller.pm:288
msgid "An error occured while downloading the image."
msgstr "An error occured while downloading the image."
#: themes/default/templates/about.html.ep:41
#: themes/default/templates/myfiles.html.ep:27
#: themes/default/templates/stats.html.ep:25
#: themes/default/templates/zip.html.ep:2
msgid "Archives download"
msgstr ""
#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:64 themes/default/templates/stats.html.ep:25
msgid "Back to homepage"
msgstr "Back to homepage"
#: themes/default/templates/index.html.ep:193
#: themes/default/templates/index.html.ep:194
#: themes/default/templates/index.html.ep:193 themes/default/templates/index.html.ep:194
msgid "Click to open the file browser"
msgstr "Click to open the file browser"
@@ -83,27 +69,15 @@ msgstr "Click to open the file browser"
msgid "Contributors"
msgstr "Contributors"
#: themes/default/templates/partial/lutim.js.ep:310
#: themes/default/templates/partial/lutim.js.ep:359
#: themes/default/templates/partial/lutim.js.ep:437
#: themes/default/templates/partial/lutim.js.ep:214 themes/default/templates/partial/lutim.js.ep:268 themes/default/templates/partial/lutim.js.ep:346
msgid "Copy all view links to clipboard"
msgstr ""
#: themes/default/templates/index.html.ep:18
#: themes/default/templates/index.html.ep:36
#: themes/default/templates/index.html.ep:69
#: themes/default/templates/index.html.ep:77
#: themes/default/templates/index.html.ep:85
#: themes/default/templates/index.html.ep:93
#: themes/default/templates/partial/common.js.ep:45
#: themes/default/templates/partial/lutim.js.ep:176
#: themes/default/templates/partial/lutim.js.ep:188
#: themes/default/templates/partial/lutim.js.ep:202
#: themes/default/templates/partial/lutim.js.ep:217
#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:150 themes/default/templates/partial/lutim.js.ep:105 themes/default/templates/partial/lutim.js.ep:120 themes/default/templates/partial/lutim.js.ep:79 themes/default/templates/partial/lutim.js.ep:91
msgid "Copy to clipboard"
msgstr "Copy to clipboard"
#: themes/default/templates/myfiles.html.ep:15
#: themes/default/templates/myfiles.html.ep:52
msgid "Counter"
msgstr ""
@@ -115,26 +89,19 @@ msgstr ""
msgid "Delay repartition chart for enabled images"
msgstr ""
#: themes/default/templates/index.html.ep:115
#: themes/default/templates/index.html.ep:147
#: themes/default/templates/index.html.ep:178
#: themes/default/templates/myfiles.html.ep:16
#: themes/default/templates/partial/lutim.js.ep:256
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:159
msgid "Delete at first view?"
msgstr "Delete at first view?"
#: lib/Lutim/Command/cron/stats.pm:95
#: lib/Lutim/Command/cron/stats.pm:145 themes/default/templates/raw.html.ep:4
msgid "Deleted images"
msgstr ""
#: lib/Lutim/Command/cron/stats.pm:96
#: lib/Lutim/Command/cron/stats.pm:146 themes/default/templates/raw.html.ep:5
msgid "Deleted images in 30 days"
msgstr ""
#: themes/default/templates/index.html.ep:98
#: themes/default/templates/myfiles.html.ep:19
#: themes/default/templates/partial/common.js.ep:37
#: themes/default/templates/partial/common.js.ep:40
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:142 themes/default/templates/partial/common.js.ep:145
msgid "Deletion link"
msgstr "Deletion link"
@@ -142,15 +109,11 @@ msgstr "Deletion link"
msgid "Download all images"
msgstr ""
#: themes/default/templates/index.html.ep:81
#: themes/default/templates/index.html.ep:83
#: themes/default/templates/partial/lutim.js.ep:194
#: themes/default/templates/partial/lutim.js.ep:198
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:101 themes/default/templates/partial/lutim.js.ep:97
msgid "Download link"
msgstr "Download link"
#: themes/default/templates/index.html.ep:28
#: themes/default/templates/index.html.ep:31
#: themes/default/templates/index.html.ep:28 themes/default/templates/index.html.ep:31 themes/default/templates/myfiles.html.ep:30 themes/default/templates/myfiles.html.ep:33
msgid "Download zip link"
msgstr ""
@@ -162,12 +125,11 @@ msgstr "Drag & drop images here"
msgid "Drag and drop an image in the appropriate area or use the traditional way to send files and Lutim will provide you four URLs. One to view the image, an other to directly download it, one you can use on social networks and a last to delete the image when you want."
msgstr "Drag and drop an image in the appropriate area or use the traditional way to send files and Lutim will provide you four URLs. One to view the image, an other to directly download it, one you can use on social networks and a last to delete the image when you want."
#: themes/default/templates/index.html.ep:150
#: themes/default/templates/index.html.ep:181
#: themes/default/templates/index.html.ep:150 themes/default/templates/index.html.ep:181
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Encrypt the image (Lutim does not keep the key)."
#: themes/default/templates/partial/lutim.js.ep:72
#: themes/default/templates/partial/lutim.js.ep:44
msgid "Error while trying to modify the image."
msgstr ""
@@ -175,11 +137,11 @@ msgstr ""
msgid "Evolution of total files"
msgstr "Evolution of total files"
#: themes/default/templates/myfiles.html.ep:18
#: themes/default/templates/myfiles.html.ep:55
msgid "Expires at"
msgstr ""
#: themes/default/templates/myfiles.html.ep:13
#: themes/default/templates/myfiles.html.ep:50
msgid "File name"
msgstr ""
@@ -187,21 +149,19 @@ msgstr ""
msgid "For more details, see the <a href=\"https://framagit.org/luc/lutim\">homepage of the project</a>."
msgstr "For more details, see the <a href=\"https://framagit.org/luc/lutim\">homepage of the project</a>."
#: themes/default/templates/layouts/default.html.ep:50
#: themes/default/templates/layouts/default.html.ep:55
msgid "Fork me!"
msgstr "Fork me!"
#: themes/default/templates/index.html.ep:10
#: themes/default/templates/index.html.ep:13
#: themes/default/templates/index.html.ep:10 themes/default/templates/index.html.ep:13 themes/default/templates/myfiles.html.ep:12 themes/default/templates/myfiles.html.ep:15
msgid "Gallery link"
msgstr ""
#: themes/default/templates/partial/lutim.js.ep:125
#: themes/default/templates/partial/lutim.js.ep:142
#: themes/default/templates/partial/common.js.ep:104 themes/default/templates/partial/common.js.ep:87
msgid "Hit Ctrl+C, then Enter to copy the short link"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:45
#: themes/default/templates/layouts/default.html.ep:50
msgid "Homepage"
msgstr "Homepage"
@@ -221,27 +181,30 @@ msgstr "How to report an image?"
msgid "If the files are deleted if you ask it while posting it, their SHA512 footprint are retained."
msgstr "If the files are deleted if you ask it while posting it, their SHA512 footprint are retained."
#: themes/default/templates/index.html.ep:163
#: themes/default/templates/index.html.ep:203
#: themes/default/templates/index.html.ep:163 themes/default/templates/index.html.ep:203
msgid "Image URL"
msgstr "Image URL"
#: lib/Lutim/Command/cron/stats.pm:93
#: lib/Lutim/Command/cron/stats.pm:143 themes/default/templates/raw.html.ep:2
msgid "Image delay"
msgstr ""
#: lib/Lutim/Controller.pm:715
#: lib/Lutim/Controller.pm:710
msgid "Image not found."
msgstr ""
#: themes/default/templates/layouts/default.html.ep:49
#: themes/default/templates/layouts/default.html.ep:54
msgid "Informations"
msgstr "Informations"
#: themes/default/templates/layouts/default.html.ep:55
#: themes/default/templates/layouts/default.html.ep:62
msgid "Install webapp"
msgstr "Install webapp"
#: themes/default/templates/layouts/default.html.ep:61
msgid "Instance's statistics"
msgstr ""
#: themes/default/templates/about.html.ep:11
msgid "Is it really anonymous?"
msgstr "Is it really anonymous?"
@@ -254,29 +217,30 @@ msgstr "Is it really free (as in free beer)?"
msgid "Juste like you pronounce the French word <a href=\"https://fr.wikipedia.org/wiki/Lutin\">lutin</a> (/ly.tɛ̃/)."
msgstr "Juste like you pronounce the French word <a href=\"https://fr.wikipedia.org/wiki/Lutin\">lutin</a> (/ly.tɛ̃/)."
#: themes/default/templates/index.html.ep:153
#: themes/default/templates/index.html.ep:184
#: themes/default/templates/index.html.ep:153 themes/default/templates/index.html.ep:184
msgid "Keep EXIF tags"
msgstr "Keep EXIF tags"
#: themes/default/templates/index.html.ep:118
#: themes/default/templates/index.html.ep:166
#: themes/default/templates/index.html.ep:206
#: themes/default/templates/partial/lutim.js.ep:260
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:163
msgid "Let's go!"
msgstr "Let's go!"
#: themes/default/templates/layouts/default.html.ep:48
#: themes/default/templates/layouts/default.html.ep:58
msgid "Liberapay button"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:53
msgid "License:"
msgstr "License:"
#: themes/default/templates/index.html.ep:89
#: themes/default/templates/index.html.ep:91
#: themes/default/templates/partial/lutim.js.ep:208
#: themes/default/templates/partial/lutim.js.ep:212
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:111 themes/default/templates/partial/lutim.js.ep:115
msgid "Link for share on social networks"
msgstr "Link for share on social networks"
#: themes/default/templates/zip.html.ep:7
msgid "Lutim can't zip so many images at once, so it splitted your demand in multiple URLs."
msgstr ""
#: themes/default/templates/about.html.ep:4
msgid "Lutim is a free (as in free beer) and anonymous image hosting service. It's also the name of the free (as in free speech) software which provides this service."
msgstr "Lutim is a free (as in free beer) and anonymous image hosting service. It's also the name of the free (as in free speech) software which provides this service."
@@ -285,24 +249,19 @@ msgstr "Lutim is a free (as in free beer) and anonymous image hosting service. I
msgid "Main developers"
msgstr "Main developers"
#: themes/default/templates/index.html.ep:73
#: themes/default/templates/index.html.ep:75
#: themes/default/templates/partial/lutim.js.ep:182
#: themes/default/templates/partial/lutim.js.ep:185
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:85 themes/default/templates/partial/lutim.js.ep:88
msgid "Markdown syntax"
msgstr "Markdown syntax"
#: themes/default/templates/layouts/default.html.ep:54
#: themes/default/templates/myfiles.html.ep:2
#: themes/default/templates/layouts/default.html.ep:60 themes/default/templates/myfiles.html.ep:2
msgid "My images"
msgstr ""
#: themes/default/templates/myfiles.html.ep:39
#: themes/default/templates/partial/myfiles.js.ep:19
msgid "No limit"
msgstr ""
#: themes/default/templates/index.html.ep:165
#: themes/default/templates/index.html.ep:198
#: themes/default/templates/index.html.ep:165 themes/default/templates/index.html.ep:198
msgid "Only images are allowed"
msgstr "Only images are allowed"
@@ -314,6 +273,10 @@ msgstr ""
msgid "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
msgstr "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
#: themes/default/templates/zip.html.ep:12
msgid "Please click on each URL to download the different zip files."
msgstr ""
#. (config('contact')
#: themes/default/templates/about.html.ep:19
msgid "Please contact the administrator: %1"
@@ -327,24 +290,31 @@ msgstr ""
msgid "Send an image"
msgstr "Send an image"
#: themes/default/templates/partial/lutim.js.ep:51
#: themes/default/templates/partial/lutim.js.ep:20
msgid "Share it!"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:56
msgid "Share on Twitter"
msgstr "Share on Twitter"
#: themes/default/templates/index.html.ep:133
#: themes/default/templates/partial/lutim.js.ep:271
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:174
msgid "Something bad happened"
msgstr "Something bad happened"
#. ($c->config('contact')
#: lib/Lutim/Controller.pm:723
#: lib/Lutim/Controller.pm:717
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
msgstr ""
#: themes/default/templates/layouts/default.html.ep:58
msgid "Support the author on Liberapay"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:57
msgid "Support the author on Tipeee"
msgstr ""
#: themes/default/templates/about.html.ep:13
msgid "The IP address of the image's sender is retained for a delay which depends of the administrator's choice (for the official instance, which is located in France, it's one year)."
msgstr "The IP address of the image's sender is retained for a delay which depends of the administrator's choice (for the official instance, which is located in France, it's one year)."
@@ -353,26 +323,27 @@ msgstr "The IP address of the image's sender is retained for a delay which depen
msgid "The Lutim software is a <a href=\"http://en.wikipedia.org/wiki/Free_software\">free software</a>, which allows you to download and install it on you own server. Have a look at the <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> to see what you can do."
msgstr "The Lutim software is a <a href=\"http://en.wikipedia.org/wiki/Free_software\">free software</a>, which allows you to download and install it on you own server. Have a look at the <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> to see what you can do."
#: lib/Lutim/Controller.pm:305
#: lib/Lutim/Controller.pm:307
msgid "The URL is not valid."
msgstr "The URL is not valid."
#: lib/Lutim/Controller.pm:117
#: lib/Lutim/Controller.pm:186
#: themes/default/templates/zip.html.ep:16
msgid "The automatic download process will open a tab in your browser for each link. You need to allow popups for Lutim."
msgstr ""
#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188
msgid "The delete token is invalid."
msgstr "The delete token is invalid."
#. ($upload->filename)
#: lib/Lutim/Controller.pm:449
#: lib/Lutim/Controller.pm:445
msgid "The file %1 is not an image."
msgstr "The file %1 is not an image."
#. ($max_file_size)
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#: lib/Lutim/Controller.pm:269
#: lib/Lutim/Controller.pm:338
#: themes/default/templates/partial/lutim.js.ep:332
#. (config('max_file_size')
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:240
msgid "The file exceed the size limit (%1)"
msgstr "The file exceed the size limit (%1)"
@@ -381,17 +352,16 @@ msgid "The graph's datas are not updated in real-time."
msgstr "The graph's datas are not updated in real-time."
#. ($image->filename)
#: lib/Lutim/Controller.pm:188
#: lib/Lutim/Controller.pm:190
msgid "The image %1 has already been deleted."
msgstr "The image %1 has already been deleted."
#. ($image->filename)
#: lib/Lutim/Controller.pm:197
#: lib/Lutim/Controller.pm:202
#: lib/Lutim/Controller.pm:199 lib/Lutim/Controller.pm:204
msgid "The image %1 has been successfully deleted"
msgstr "The image %1 has been successfully deleted"
#: lib/Lutim/Controller.pm:125
#: lib/Lutim/Controller.pm:128
msgid "The image's delay has been successfully modified"
msgstr "The image's delay has been successfully modified"
@@ -404,37 +374,32 @@ msgid "The images you post on Lutim can be stored indefinitely or be deleted at
msgstr "The images you post on Lutim can be stored indefinitely or be deleted at first view or after a delay selected from those proposed."
#. ($c->config->{contact})
#: lib/Lutim/Controller.pm:444
#: lib/Lutim/Controller.pm:442
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "There is no more available URL. Retry or contact the administrator. %1"
#: lib/Lutim/Command/cron/stats.pm:102
#: themes/default/templates/layouts/default.html.ep:57
msgid "Tipeee button"
msgstr ""
#: lib/Lutim/Command/cron/stats.pm:152 themes/default/templates/raw.html.ep:11
msgid "Total"
msgstr ""
#: themes/default/templates/index.html.ep:60
#: themes/default/templates/partial/lutim.js.ep:45
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:14
msgid "Tweet it!"
msgstr "Tweet it!"
#. ($short)
#: lib/Lutim/Controller.pm:159
#: lib/Lutim/Controller.pm:231
#: lib/Lutim/Controller.pm:162 lib/Lutim/Controller.pm:233
msgid "Unable to find the image %1."
msgstr "Unable to find the image %1."
#: lib/Lutim.pm:85
#: lib/Lutim/Controller.pm:534
#: lib/Lutim/Controller.pm:580
#: lib/Lutim/Controller.pm:624
#: lib/Lutim/Controller.pm:664
#: lib/Lutim/Controller.pm:676
#: lib/Lutim/Controller.pm:687
#: lib/Lutim/Controller.pm:712
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:616 lib/Lutim/Controller.pm:659 lib/Lutim/Controller.pm:671 lib/Lutim/Controller.pm:682 lib/Lutim/Controller.pm:707 lib/Lutim/Plugin/Helpers.pm:57
msgid "Unable to find the image: it has been deleted."
msgstr "Unable to find the image: it has been deleted."
#: lib/Lutim/Controller.pm:101
#: lib/Lutim/Controller.pm:105
msgid "Unable to get counter"
msgstr ""
@@ -442,12 +407,11 @@ msgstr ""
msgid "Unlike many image sharing services, you don't give us rights on uploaded images."
msgstr "Unlike many image sharing services, you don't give us rights on uploaded images."
#: themes/default/templates/index.html.ep:162
#: themes/default/templates/index.html.ep:201
#: themes/default/templates/index.html.ep:162 themes/default/templates/index.html.ep:201
msgid "Upload an image with its URL"
msgstr "Upload an image with its URL"
#: themes/default/templates/myfiles.html.ep:17
#: themes/default/templates/myfiles.html.ep:54
msgid "Uploaded at"
msgstr ""
@@ -455,16 +419,12 @@ msgstr ""
msgid "Uploaded files by days"
msgstr "Uploaded files by days"
#. ($config->{contact})
#: lib/Lutim.pm:189
#. ($c->app->config('contact')
#: lib/Lutim/Plugin/Helpers.pm:152
msgid "Uploading is currently disabled, please try later or contact the administrator (%1)."
msgstr "Uploading is currently disabled, please try later or contact the administrator (%1)."
#: themes/default/templates/index.html.ep:65
#: themes/default/templates/index.html.ep:67
#: themes/default/templates/myfiles.html.ep:14
#: themes/default/templates/partial/lutim.js.ep:168
#: themes/default/templates/partial/lutim.js.ep:172
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:71 themes/default/templates/partial/lutim.js.ep:75
msgid "View link"
msgstr "View link"
@@ -484,6 +444,7 @@ msgstr "Who owns rights on images uploaded on Lutim?"
msgid "Yes, it is! On the other side, for legal reasons, your IP address will be stored when you send an image. Don't panic, it is normally the case of all sites on which you send files!"
msgstr "Yes, it is! On the other side, for legal reasons, your IP address will be stored when you send an image. Don't panic, it is normally the case of all sites on which you send files!"
#:
msgid "Yes, it is! On the other side, if you want to support the developer, you can do it via <a href=\"https://flattr.com/submit/auto?user_id=_SKy_&amp;url=%1&amp;title=Lutim&amp;category=software\">Flattr</a> or with <a href=\"bitcoin:1JCEtmx9pyzWfitMQj2pKAk8GNgyix7RmA?label=lutim\">BitCoin</a>."
msgstr "Yes, it is! On the other side, if you want to support the developer, you can do it via <a href=\"https://flattr.com/submit/auto?user_id=_SKy_&amp;url=%1&amp;title=Lutim&amp;category=software\">Flattr</a> or with <a href=\"bitcoin:1JCEtmx9pyzWfitMQj2pKAk8GNgyix7RmA?label=lutim\">BitCoin</a>."
@@ -491,6 +452,10 @@ msgstr "Yes, it is! On the other side, if you want to support the developer, you
msgid "Yes, it is! On the other side, if you want to support the developer, you can do it via <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> or via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
msgstr ""
#: themes/default/templates/zip.html.ep:6
msgid "You asked to download a zip archive for too much files."
msgstr ""
#: themes/default/templates/about.html.ep:8
msgid "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
msgstr "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
@@ -503,10 +468,7 @@ msgstr "and on"
msgid "core developer"
msgstr "core developer"
#: lib/Lutim/Command/cron/stats.pm:108
#: lib/Lutim/Command/cron/stats.pm:125
#: lib/Lutim/Command/cron/stats.pm:97
#: themes/default/templates/index.html.ep:3
#: lib/Lutim.pm:190 lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
msgid "no time limit"
msgstr "no time limit"
+104 -143
View File
@@ -18,19 +18,11 @@ msgstr ""
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. ($delay)
#. (config('max_delay')
#. (7)
#. (30)
#: lib/Lutim/Command/cron/stats.pm:100
#: lib/Lutim/Command/cron/stats.pm:110
#: lib/Lutim/Command/cron/stats.pm:111
#: lib/Lutim/Command/cron/stats.pm:127
#: lib/Lutim/Command/cron/stats.pm:128
#: lib/Lutim/Command/cron/stats.pm:99
#: themes/default/templates/partial/lutim.js.ep:235
#: themes/default/templates/partial/lutim.js.ep:244
#: themes/default/templates/partial/lutim.js.ep:245
#. ($delay)
#. (config('max_delay')
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:138 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
msgid "%1 days"
msgstr "%1 días"
@@ -43,41 +35,35 @@ msgstr "%1 imágenes enviadas a esta instancia desde el inicio."
msgid "-or-"
msgstr "-o-"
#: lib/Lutim/Command/cron/stats.pm:101
#: lib/Lutim/Command/cron/stats.pm:112
#: lib/Lutim/Command/cron/stats.pm:129
#: themes/default/templates/index.html.ep:5
#: lib/Lutim.pm:192 lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
msgid "1 year"
msgstr "1 año"
#: lib/Lutim/Command/cron/stats.pm:109
#: lib/Lutim/Command/cron/stats.pm:126
#: lib/Lutim/Command/cron/stats.pm:98
#: themes/default/templates/index.html.ep:4
#: themes/default/templates/partial/lutim.js.ep:244
#: lib/Lutim.pm:191 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
msgid "24 hours"
msgstr "24 horas"
#: themes/default/templates/myfiles.html.ep:79
#: themes/default/templates/partial/myfiles.js.ep:57
msgid ": Error while trying to get the counter."
msgstr ": Error al intentar obtener el contador."
#: lib/Lutim/Command/cron/stats.pm:94
#: lib/Lutim/Command/cron/stats.pm:144 themes/default/templates/raw.html.ep:3
msgid "Active images"
msgstr ""
#: lib/Lutim/Controller.pm:286
#: lib/Lutim/Controller.pm:288
msgid "An error occured while downloading the image."
msgstr "Error al intentar modificar la imagen."
#: themes/default/templates/about.html.ep:41
#: themes/default/templates/myfiles.html.ep:27
#: themes/default/templates/stats.html.ep:25
#: themes/default/templates/zip.html.ep:2
msgid "Archives download"
msgstr ""
#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:64 themes/default/templates/stats.html.ep:25
msgid "Back to homepage"
msgstr "Volver a la página inicial"
#: themes/default/templates/index.html.ep:193
#: themes/default/templates/index.html.ep:194
#: themes/default/templates/index.html.ep:193 themes/default/templates/index.html.ep:194
msgid "Click to open the file browser"
msgstr "Clic para abrir el explorador de archivos"
@@ -85,27 +71,15 @@ msgstr "Clic para abrir el explorador de archivos"
msgid "Contributors"
msgstr "Contribuidores"
#: themes/default/templates/partial/lutim.js.ep:310
#: themes/default/templates/partial/lutim.js.ep:359
#: themes/default/templates/partial/lutim.js.ep:437
#: themes/default/templates/partial/lutim.js.ep:214 themes/default/templates/partial/lutim.js.ep:268 themes/default/templates/partial/lutim.js.ep:346
msgid "Copy all view links to clipboard"
msgstr "Copiar todos los enlaces de visualización al portapapeles"
#: themes/default/templates/index.html.ep:18
#: themes/default/templates/index.html.ep:36
#: themes/default/templates/index.html.ep:69
#: themes/default/templates/index.html.ep:77
#: themes/default/templates/index.html.ep:85
#: themes/default/templates/index.html.ep:93
#: themes/default/templates/partial/common.js.ep:45
#: themes/default/templates/partial/lutim.js.ep:176
#: themes/default/templates/partial/lutim.js.ep:188
#: themes/default/templates/partial/lutim.js.ep:202
#: themes/default/templates/partial/lutim.js.ep:217
#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:150 themes/default/templates/partial/lutim.js.ep:105 themes/default/templates/partial/lutim.js.ep:120 themes/default/templates/partial/lutim.js.ep:79 themes/default/templates/partial/lutim.js.ep:91
msgid "Copy to clipboard"
msgstr "Copiar al portapapeles"
#: themes/default/templates/myfiles.html.ep:15
#: themes/default/templates/myfiles.html.ep:52
msgid "Counter"
msgstr "Contador"
@@ -117,26 +91,19 @@ msgstr ""
msgid "Delay repartition chart for enabled images"
msgstr ""
#: themes/default/templates/index.html.ep:115
#: themes/default/templates/index.html.ep:147
#: themes/default/templates/index.html.ep:178
#: themes/default/templates/myfiles.html.ep:16
#: themes/default/templates/partial/lutim.js.ep:256
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:159
msgid "Delete at first view?"
msgstr "¿Borrar en la primera vista?"
#: lib/Lutim/Command/cron/stats.pm:95
#: lib/Lutim/Command/cron/stats.pm:145 themes/default/templates/raw.html.ep:4
msgid "Deleted images"
msgstr ""
#: lib/Lutim/Command/cron/stats.pm:96
#: lib/Lutim/Command/cron/stats.pm:146 themes/default/templates/raw.html.ep:5
msgid "Deleted images in 30 days"
msgstr ""
#: themes/default/templates/index.html.ep:98
#: themes/default/templates/myfiles.html.ep:19
#: themes/default/templates/partial/common.js.ep:37
#: themes/default/templates/partial/common.js.ep:40
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:142 themes/default/templates/partial/common.js.ep:145
msgid "Deletion link"
msgstr "Enlace para borrar"
@@ -144,15 +111,11 @@ msgstr "Enlace para borrar"
msgid "Download all images"
msgstr "Descargar todas las imágenes"
#: themes/default/templates/index.html.ep:81
#: themes/default/templates/index.html.ep:83
#: themes/default/templates/partial/lutim.js.ep:194
#: themes/default/templates/partial/lutim.js.ep:198
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:101 themes/default/templates/partial/lutim.js.ep:97
msgid "Download link"
msgstr "Enlace de descarga"
#: themes/default/templates/index.html.ep:28
#: themes/default/templates/index.html.ep:31
#: themes/default/templates/index.html.ep:28 themes/default/templates/index.html.ep:31 themes/default/templates/myfiles.html.ep:30 themes/default/templates/myfiles.html.ep:33
msgid "Download zip link"
msgstr "Enlace de descarga del archivo de las imágenes"
@@ -164,12 +127,11 @@ msgstr "Arrastre y suelte imágenes aquí"
msgid "Drag and drop an image in the appropriate area or use the traditional way to send files and Lutim will provide you four URLs. One to view the image, an other to directly download it, one you can use on social networks and a last to delete the image when you want."
msgstr "Arrastre y suelte una imagen en el área apropiada, o use el método tradicional para enviar ficheros, y Lutim proporcionará cuatro URLs. Una para ver la imagen, otra para descargarla directamente, una que upede usar en redes sociales, y una última para borrar la imagen cuando lo desee."
#: themes/default/templates/index.html.ep:150
#: themes/default/templates/index.html.ep:181
#: themes/default/templates/index.html.ep:150 themes/default/templates/index.html.ep:181
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Las imágenes se cifran en el servidor (Lutim no guarda la clave)."
#: themes/default/templates/partial/lutim.js.ep:72
#: themes/default/templates/partial/lutim.js.ep:44
msgid "Error while trying to modify the image."
msgstr "Error al intentar modificar la imagen."
@@ -177,11 +139,11 @@ msgstr "Error al intentar modificar la imagen."
msgid "Evolution of total files"
msgstr "Evolución de archivos en total"
#: themes/default/templates/myfiles.html.ep:18
#: themes/default/templates/myfiles.html.ep:55
msgid "Expires at"
msgstr "Expira"
#: themes/default/templates/myfiles.html.ep:13
#: themes/default/templates/myfiles.html.ep:50
msgid "File name"
msgstr "Nombre de archivo"
@@ -189,21 +151,19 @@ msgstr "Nombre de archivo"
msgid "For more details, see the <a href=\"https://framagit.org/luc/lutim\">homepage of the project</a>."
msgstr "Para más detalles, vea la <a href=\"https://framagit.org/luc/lutim\">página del proyecto</a>."
#: themes/default/templates/layouts/default.html.ep:50
#: themes/default/templates/layouts/default.html.ep:55
msgid "Fork me!"
msgstr "¡Clóname!"
#: themes/default/templates/index.html.ep:10
#: themes/default/templates/index.html.ep:13
#: themes/default/templates/index.html.ep:10 themes/default/templates/index.html.ep:13 themes/default/templates/myfiles.html.ep:12 themes/default/templates/myfiles.html.ep:15
msgid "Gallery link"
msgstr "Enlace a la galería"
#: themes/default/templates/partial/lutim.js.ep:125
#: themes/default/templates/partial/lutim.js.ep:142
#: themes/default/templates/partial/common.js.ep:104 themes/default/templates/partial/common.js.ep:87
msgid "Hit Ctrl+C, then Enter to copy the short link"
msgstr "Presione Ctrl + C, entonces Ingresar para copiar el enlace"
#: themes/default/templates/layouts/default.html.ep:45
#: themes/default/templates/layouts/default.html.ep:50
msgid "Homepage"
msgstr "Página inicial"
@@ -223,27 +183,30 @@ msgstr "¿Cómo informar sobre una imagen?"
msgid "If the files are deleted if you ask it while posting it, their SHA512 footprint are retained."
msgstr "Si los ficheros se borran por haberlo solicitado al enviarlos, se retiene su huella digital SHA512."
#: themes/default/templates/index.html.ep:163
#: themes/default/templates/index.html.ep:203
#: themes/default/templates/index.html.ep:163 themes/default/templates/index.html.ep:203
msgid "Image URL"
msgstr "URL de la imagen"
#: lib/Lutim/Command/cron/stats.pm:93
#: lib/Lutim/Command/cron/stats.pm:143 themes/default/templates/raw.html.ep:2
msgid "Image delay"
msgstr ""
#: lib/Lutim/Controller.pm:715
#: lib/Lutim/Controller.pm:710
msgid "Image not found."
msgstr "Imagen no encontrada."
#: themes/default/templates/layouts/default.html.ep:49
#: themes/default/templates/layouts/default.html.ep:54
msgid "Informations"
msgstr "Informaciones"
#: themes/default/templates/layouts/default.html.ep:55
#: themes/default/templates/layouts/default.html.ep:62
msgid "Install webapp"
msgstr "Instalar webapp"
#: themes/default/templates/layouts/default.html.ep:61
msgid "Instance's statistics"
msgstr ""
#: themes/default/templates/about.html.ep:11
msgid "Is it really anonymous?"
msgstr "¿Es realmente anónimo?"
@@ -256,29 +219,30 @@ msgstr "¿Es realmente gratis?"
msgid "Juste like you pronounce the French word <a href=\"https://fr.wikipedia.org/wiki/Lutin\">lutin</a> (/ly.tɛ̃/)."
msgstr "Tal y como se pronuncia la palabra francesa <a href=\"https://fr.wikipedia.org/wiki/Lutin\">lutin</a> (/ly.tɛ̃/)."
#: themes/default/templates/index.html.ep:153
#: themes/default/templates/index.html.ep:184
#: themes/default/templates/index.html.ep:153 themes/default/templates/index.html.ep:184
msgid "Keep EXIF tags"
msgstr "Mantener las etiquetas EXIF"
#: themes/default/templates/index.html.ep:118
#: themes/default/templates/index.html.ep:166
#: themes/default/templates/index.html.ep:206
#: themes/default/templates/partial/lutim.js.ep:260
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:163
msgid "Let's go!"
msgstr "¡Vamos allá!"
#: themes/default/templates/layouts/default.html.ep:48
#: themes/default/templates/layouts/default.html.ep:58
msgid "Liberapay button"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:53
msgid "License:"
msgstr "Licencia:"
#: themes/default/templates/index.html.ep:89
#: themes/default/templates/index.html.ep:91
#: themes/default/templates/partial/lutim.js.ep:208
#: themes/default/templates/partial/lutim.js.ep:212
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:111 themes/default/templates/partial/lutim.js.ep:115
msgid "Link for share on social networks"
msgstr "Enlace para compartir en redes sociales"
#: themes/default/templates/zip.html.ep:7
msgid "Lutim can't zip so many images at once, so it splitted your demand in multiple URLs."
msgstr ""
#: themes/default/templates/about.html.ep:4
msgid "Lutim is a free (as in free beer) and anonymous image hosting service. It's also the name of the free (as in free speech) software which provides this service."
msgstr "Lutim es un servicio de alojamiento de imágenes anónimo y gratuito. También es el nombre del software libre que proporciona este servicio."
@@ -287,24 +251,19 @@ msgstr "Lutim es un servicio de alojamiento de imágenes anónimo y gratuito. Ta
msgid "Main developers"
msgstr "Desarrolladores principales"
#: themes/default/templates/index.html.ep:73
#: themes/default/templates/index.html.ep:75
#: themes/default/templates/partial/lutim.js.ep:182
#: themes/default/templates/partial/lutim.js.ep:185
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:85 themes/default/templates/partial/lutim.js.ep:88
msgid "Markdown syntax"
msgstr "Sintaxis de Markdown"
#: themes/default/templates/layouts/default.html.ep:54
#: themes/default/templates/myfiles.html.ep:2
#: themes/default/templates/layouts/default.html.ep:60 themes/default/templates/myfiles.html.ep:2
msgid "My images"
msgstr "Mis Imágenes"
#: themes/default/templates/myfiles.html.ep:39
#: themes/default/templates/partial/myfiles.js.ep:19
msgid "No limit"
msgstr "Sin fecha de caducidad"
#: themes/default/templates/index.html.ep:165
#: themes/default/templates/index.html.ep:198
#: themes/default/templates/index.html.ep:165 themes/default/templates/index.html.ep:198
msgid "Only images are allowed"
msgstr "Sólo se admiten imágenes"
@@ -316,6 +275,10 @@ msgstr "Sólo se enumeran aquí las imágenes enviadas con este navegador. Las i
msgid "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
msgstr "¡Sólo el usuario! (bueno, sólo si él/ela es el único titular de los derechos de las imágenes antes de subirlas)"
#: themes/default/templates/zip.html.ep:12
msgid "Please click on each URL to download the different zip files."
msgstr ""
#. (config('contact')
#: themes/default/templates/about.html.ep:19
msgid "Please contact the administrator: %1"
@@ -329,24 +292,31 @@ msgstr ""
msgid "Send an image"
msgstr "Enviar una imagen"
#: themes/default/templates/partial/lutim.js.ep:51
#: themes/default/templates/partial/lutim.js.ep:20
msgid "Share it!"
msgstr "¡Compártelo!"
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:56
msgid "Share on Twitter"
msgstr "Compartir en Twitter"
#: themes/default/templates/index.html.ep:133
#: themes/default/templates/partial/lutim.js.ep:271
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:174
msgid "Something bad happened"
msgstr "Algo malo ha pasado"
#. ($c->config('contact')
#: lib/Lutim/Controller.pm:723
#: lib/Lutim/Controller.pm:717
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
msgstr "Algo malo ha pasado. Inténtelo de nuevo más tarde o contacte con el administrador (%1)."
#: themes/default/templates/layouts/default.html.ep:58
msgid "Support the author on Liberapay"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:57
msgid "Support the author on Tipeee"
msgstr ""
#: themes/default/templates/about.html.ep:13
msgid "The IP address of the image's sender is retained for a delay which depends of the administrator's choice (for the official instance, which is located in France, it's one year)."
msgstr "La dirección IP del remitente de la imagen se retiene durante un tiempo, que depende de lo que elija el administrador (para la instancia oficial, que está localizada en Francia, es un año)."
@@ -355,26 +325,27 @@ msgstr "La dirección IP del remitente de la imagen se retiene durante un tiempo
msgid "The Lutim software is a <a href=\"http://en.wikipedia.org/wiki/Free_software\">free software</a>, which allows you to download and install it on you own server. Have a look at the <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> to see what you can do."
msgstr "El software Lutim es <a href=\"http://es.wikipedia.org/wiki/Software_libre\">software libre</a>, lo que le permite descargarlo e instalarlo en su propio servidor. Eche un vistazo a la licencia <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> para ver qué puede hacer."
#: lib/Lutim/Controller.pm:305
#: lib/Lutim/Controller.pm:307
msgid "The URL is not valid."
msgstr "La URL no es válida."
#: lib/Lutim/Controller.pm:117
#: lib/Lutim/Controller.pm:186
#: themes/default/templates/zip.html.ep:16
msgid "The automatic download process will open a tab in your browser for each link. You need to allow popups for Lutim."
msgstr ""
#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188
msgid "The delete token is invalid."
msgstr "El código de borrado no es válido."
#. ($upload->filename)
#: lib/Lutim/Controller.pm:449
#: lib/Lutim/Controller.pm:445
msgid "The file %1 is not an image."
msgstr "El archivo %1 no es una imagen."
#. ($max_file_size)
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#: lib/Lutim/Controller.pm:269
#: lib/Lutim/Controller.pm:338
#: themes/default/templates/partial/lutim.js.ep:332
#. (config('max_file_size')
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:240
msgid "The file exceed the size limit (%1)"
msgstr "El archivo supera el límite de tamaño (%1)"
@@ -383,17 +354,16 @@ msgid "The graph's datas are not updated in real-time."
msgstr "Los datos del gráfico no se actualizan en tiempo real."
#. ($image->filename)
#: lib/Lutim/Controller.pm:188
#: lib/Lutim/Controller.pm:190
msgid "The image %1 has already been deleted."
msgstr "La imagen %1 ya se ha borrado."
#. ($image->filename)
#: lib/Lutim/Controller.pm:197
#: lib/Lutim/Controller.pm:202
#: lib/Lutim/Controller.pm:199 lib/Lutim/Controller.pm:204
msgid "The image %1 has been successfully deleted"
msgstr "La imagen %1 se ha borrado correctamente"
#: lib/Lutim/Controller.pm:125
#: lib/Lutim/Controller.pm:128
msgid "The image's delay has been successfully modified"
msgstr "Se ha modificado correctamente el tiempo de la imagen"
@@ -406,37 +376,32 @@ msgid "The images you post on Lutim can be stored indefinitely or be deleted at
msgstr "Puede, opcionalmente, solicitar que la imagen publicada en Lutim se elimine con la primera vista (o descarga) o tras un tiempo seleccionado de entre varios propuestos."
#. ($c->config->{contact})
#: lib/Lutim/Controller.pm:444
#: lib/Lutim/Controller.pm:442
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "No más URL disponibles. Inténtelo de nuevo o contacte con el administrador. %1"
#: lib/Lutim/Command/cron/stats.pm:102
#: themes/default/templates/layouts/default.html.ep:57
msgid "Tipeee button"
msgstr ""
#: lib/Lutim/Command/cron/stats.pm:152 themes/default/templates/raw.html.ep:11
msgid "Total"
msgstr ""
#: themes/default/templates/index.html.ep:60
#: themes/default/templates/partial/lutim.js.ep:45
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:14
msgid "Tweet it!"
msgstr "¡Tuitéalo!"
#. ($short)
#: lib/Lutim/Controller.pm:159
#: lib/Lutim/Controller.pm:231
#: lib/Lutim/Controller.pm:162 lib/Lutim/Controller.pm:233
msgid "Unable to find the image %1."
msgstr "No se ha podido encontrar la imagen %1."
#: lib/Lutim.pm:85
#: lib/Lutim/Controller.pm:534
#: lib/Lutim/Controller.pm:580
#: lib/Lutim/Controller.pm:624
#: lib/Lutim/Controller.pm:664
#: lib/Lutim/Controller.pm:676
#: lib/Lutim/Controller.pm:687
#: lib/Lutim/Controller.pm:712
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:616 lib/Lutim/Controller.pm:659 lib/Lutim/Controller.pm:671 lib/Lutim/Controller.pm:682 lib/Lutim/Controller.pm:707 lib/Lutim/Plugin/Helpers.pm:57
msgid "Unable to find the image: it has been deleted."
msgstr "No se ha podido encontrar la imagen: ha sido borrada."
#: lib/Lutim/Controller.pm:101
#: lib/Lutim/Controller.pm:105
msgid "Unable to get counter"
msgstr "Imposible recuperar el contador"
@@ -444,12 +409,11 @@ msgstr "Imposible recuperar el contador"
msgid "Unlike many image sharing services, you don't give us rights on uploaded images."
msgstr "A diferencia de muchos servicios de compartición de imágenes, usted no cede los derechos de las imágenes que sube."
#: themes/default/templates/index.html.ep:162
#: themes/default/templates/index.html.ep:201
#: themes/default/templates/index.html.ep:162 themes/default/templates/index.html.ep:201
msgid "Upload an image with its URL"
msgstr "Subir una imagen con la URL"
#: themes/default/templates/myfiles.html.ep:17
#: themes/default/templates/myfiles.html.ep:54
msgid "Uploaded at"
msgstr "Enviado el"
@@ -457,16 +421,12 @@ msgstr "Enviado el"
msgid "Uploaded files by days"
msgstr "Archivos enviados por día"
#. ($config->{contact})
#: lib/Lutim.pm:189
#. ($c->app->config('contact')
#: lib/Lutim/Plugin/Helpers.pm:152
msgid "Uploading is currently disabled, please try later or contact the administrator (%1)."
msgstr "La carga está deshabilitada en estos momentos, por favor inténtelo más tarde o contacte con el administrador (%1)."
#: themes/default/templates/index.html.ep:65
#: themes/default/templates/index.html.ep:67
#: themes/default/templates/myfiles.html.ep:14
#: themes/default/templates/partial/lutim.js.ep:168
#: themes/default/templates/partial/lutim.js.ep:172
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:71 themes/default/templates/partial/lutim.js.ep:75
msgid "View link"
msgstr "Enlace de visualización"
@@ -490,6 +450,10 @@ msgstr "¡Sí, lo es! Por otro lado, por razones legales, se almacena la direcci
msgid "Yes, it is! On the other side, if you want to support the developer, you can do it via <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> or via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
msgstr "¡Sí, lo es! Por otro lado, si quiere ayudar a apoyar al desarrollador, puede hacerlo vía <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> o con <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
#: themes/default/templates/zip.html.ep:6
msgid "You asked to download a zip archive for too much files."
msgstr ""
#: themes/default/templates/about.html.ep:8
msgid "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
msgstr "Puede, opcionalmente, solicitar que la imagen publicada en Lutim se elimine con la primera vista (o descarga) o tras un tiempo seleccionado de entre varios propuestos."
@@ -502,10 +466,7 @@ msgstr "y en"
msgid "core developer"
msgstr "desarrollador principal"
#: lib/Lutim/Command/cron/stats.pm:108
#: lib/Lutim/Command/cron/stats.pm:125
#: lib/Lutim/Command/cron/stats.pm:97
#: themes/default/templates/index.html.ep:3
#: lib/Lutim.pm:190 lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
msgid "no time limit"
msgstr "Sin tiempo límite"
+105 -144
View File
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Lutim\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2015-09-17 22:02+0000\n"
"PO-Revision-Date: 2017-06-05 15:54+0000\n"
"Last-Translator: Luc Didry <luc@didry.org>\n"
"Language-Team: French (http://www.transifex.com/fiat-tux/lutim/language/fr/)\n"
"MIME-Version: 1.0\n"
@@ -18,19 +18,11 @@ msgstr ""
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. ($delay)
#. (config('max_delay')
#. (7)
#. (30)
#: lib/Lutim/Command/cron/stats.pm:100
#: lib/Lutim/Command/cron/stats.pm:110
#: lib/Lutim/Command/cron/stats.pm:111
#: lib/Lutim/Command/cron/stats.pm:127
#: lib/Lutim/Command/cron/stats.pm:128
#: lib/Lutim/Command/cron/stats.pm:99
#: themes/default/templates/partial/lutim.js.ep:235
#: themes/default/templates/partial/lutim.js.ep:244
#: themes/default/templates/partial/lutim.js.ep:245
#. ($delay)
#. (config('max_delay')
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:138 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
msgid "%1 days"
msgstr "%1 jours"
@@ -43,41 +35,35 @@ msgstr "%1 images envoyées sur cette instance depuis le début."
msgid "-or-"
msgstr "-ou-"
#: lib/Lutim/Command/cron/stats.pm:101
#: lib/Lutim/Command/cron/stats.pm:112
#: lib/Lutim/Command/cron/stats.pm:129
#: themes/default/templates/index.html.ep:5
#: lib/Lutim.pm:192 lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
msgid "1 year"
msgstr "1 an"
#: lib/Lutim/Command/cron/stats.pm:109
#: lib/Lutim/Command/cron/stats.pm:126
#: lib/Lutim/Command/cron/stats.pm:98
#: themes/default/templates/index.html.ep:4
#: themes/default/templates/partial/lutim.js.ep:244
#: lib/Lutim.pm:191 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
msgid "24 hours"
msgstr "24 heures"
#: themes/default/templates/myfiles.html.ep:79
#: themes/default/templates/partial/myfiles.js.ep:57
msgid ": Error while trying to get the counter."
msgstr " : Erreur en essayant de récupérer le compteur."
#: lib/Lutim/Command/cron/stats.pm:94
#: lib/Lutim/Command/cron/stats.pm:144 themes/default/templates/raw.html.ep:3
msgid "Active images"
msgstr "Images actives"
#: lib/Lutim/Controller.pm:286
#: lib/Lutim/Controller.pm:288
msgid "An error occured while downloading the image."
msgstr "Une erreur est survenue lors du téléchargement de limage."
#: themes/default/templates/about.html.ep:41
#: themes/default/templates/myfiles.html.ep:27
#: themes/default/templates/stats.html.ep:25
#: themes/default/templates/zip.html.ep:2
msgid "Archives download"
msgstr "Téléchargement darchives"
#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:64 themes/default/templates/stats.html.ep:25
msgid "Back to homepage"
msgstr "Retour à la page daccueil"
#: themes/default/templates/index.html.ep:193
#: themes/default/templates/index.html.ep:194
#: themes/default/templates/index.html.ep:193 themes/default/templates/index.html.ep:194
msgid "Click to open the file browser"
msgstr "Cliquez pour utiliser le navigateur de fichier"
@@ -85,27 +71,15 @@ msgstr "Cliquez pour utiliser le navigateur de fichier"
msgid "Contributors"
msgstr "Contributeurs"
#: themes/default/templates/partial/lutim.js.ep:310
#: themes/default/templates/partial/lutim.js.ep:359
#: themes/default/templates/partial/lutim.js.ep:437
#: themes/default/templates/partial/lutim.js.ep:214 themes/default/templates/partial/lutim.js.ep:268 themes/default/templates/partial/lutim.js.ep:346
msgid "Copy all view links to clipboard"
msgstr "Copier tous les liens de visualisation dans le presse-papier"
#: themes/default/templates/index.html.ep:18
#: themes/default/templates/index.html.ep:36
#: themes/default/templates/index.html.ep:69
#: themes/default/templates/index.html.ep:77
#: themes/default/templates/index.html.ep:85
#: themes/default/templates/index.html.ep:93
#: themes/default/templates/partial/common.js.ep:45
#: themes/default/templates/partial/lutim.js.ep:176
#: themes/default/templates/partial/lutim.js.ep:188
#: themes/default/templates/partial/lutim.js.ep:202
#: themes/default/templates/partial/lutim.js.ep:217
#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:150 themes/default/templates/partial/lutim.js.ep:105 themes/default/templates/partial/lutim.js.ep:120 themes/default/templates/partial/lutim.js.ep:79 themes/default/templates/partial/lutim.js.ep:91
msgid "Copy to clipboard"
msgstr "Copier dans le presse-papier"
#: themes/default/templates/myfiles.html.ep:15
#: themes/default/templates/myfiles.html.ep:52
msgid "Counter"
msgstr "Compteur"
@@ -117,26 +91,19 @@ msgstr "Graphe de répartition des délais pour les images supprimées"
msgid "Delay repartition chart for enabled images"
msgstr "Graphe de répartition des délais pour les images actives"
#: themes/default/templates/index.html.ep:115
#: themes/default/templates/index.html.ep:147
#: themes/default/templates/index.html.ep:178
#: themes/default/templates/myfiles.html.ep:16
#: themes/default/templates/partial/lutim.js.ep:256
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:159
msgid "Delete at first view?"
msgstr "Supprimer au premier accès ?"
#: lib/Lutim/Command/cron/stats.pm:95
#: lib/Lutim/Command/cron/stats.pm:145 themes/default/templates/raw.html.ep:4
msgid "Deleted images"
msgstr "Images supprimées"
#: lib/Lutim/Command/cron/stats.pm:96
#: lib/Lutim/Command/cron/stats.pm:146 themes/default/templates/raw.html.ep:5
msgid "Deleted images in 30 days"
msgstr "Images supprimées dans 30 jours"
#: themes/default/templates/index.html.ep:98
#: themes/default/templates/myfiles.html.ep:19
#: themes/default/templates/partial/common.js.ep:37
#: themes/default/templates/partial/common.js.ep:40
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:142 themes/default/templates/partial/common.js.ep:145
msgid "Deletion link"
msgstr "Lien de suppression"
@@ -144,15 +111,11 @@ msgstr "Lien de suppression"
msgid "Download all images"
msgstr "Télécharger toutes les images"
#: themes/default/templates/index.html.ep:81
#: themes/default/templates/index.html.ep:83
#: themes/default/templates/partial/lutim.js.ep:194
#: themes/default/templates/partial/lutim.js.ep:198
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:101 themes/default/templates/partial/lutim.js.ep:97
msgid "Download link"
msgstr "Lien de téléchargement"
#: themes/default/templates/index.html.ep:28
#: themes/default/templates/index.html.ep:31
#: themes/default/templates/index.html.ep:28 themes/default/templates/index.html.ep:31 themes/default/templates/myfiles.html.ep:30 themes/default/templates/myfiles.html.ep:33
msgid "Download zip link"
msgstr "Lien de téléchargement de larchive des images"
@@ -164,12 +127,11 @@ msgstr "Déposez vos images ici"
msgid "Drag and drop an image in the appropriate area or use the traditional way to send files and Lutim will provide you four URLs. One to view the image, an other to directly download it, one you can use on social networks and a last to delete the image when you want."
msgstr "Faites glisser des images dans la zone prévue à cet effet ou sélectionnez un fichier de façon classique et Lutim vous fournira quatre URLs en retour. Une pour afficher limage, une autre pour la télécharger directement, une pour lutiliser sur les réseaux sociaux et une dernière pour supprimer votre image quand vous le souhaitez"
#: themes/default/templates/index.html.ep:150
#: themes/default/templates/index.html.ep:181
#: themes/default/templates/index.html.ep:150 themes/default/templates/index.html.ep:181
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Chiffrer limage (Lutim ne stocke pas la clé)."
#: themes/default/templates/partial/lutim.js.ep:72
#: themes/default/templates/partial/lutim.js.ep:44
msgid "Error while trying to modify the image."
msgstr "Une erreur est survenue en essayant de modifier limage."
@@ -177,11 +139,11 @@ msgstr "Une erreur est survenue en essayant de modifier limage."
msgid "Evolution of total files"
msgstr "Évolution du nombre total de fichiers"
#: themes/default/templates/myfiles.html.ep:18
#: themes/default/templates/myfiles.html.ep:55
msgid "Expires at"
msgstr "Expire le"
#: themes/default/templates/myfiles.html.ep:13
#: themes/default/templates/myfiles.html.ep:50
msgid "File name"
msgstr "Nom du fichier"
@@ -189,21 +151,19 @@ msgstr "Nom du fichier"
msgid "For more details, see the <a href=\"https://framagit.org/luc/lutim\">homepage of the project</a>."
msgstr "Pour plus de détails, consultez la page <a href=\"https://framagit.org/luc/lutim\">Github</a> du projet."
#: themes/default/templates/layouts/default.html.ep:50
#: themes/default/templates/layouts/default.html.ep:55
msgid "Fork me!"
msgstr "Créez un fork !"
#: themes/default/templates/index.html.ep:10
#: themes/default/templates/index.html.ep:13
#: themes/default/templates/index.html.ep:10 themes/default/templates/index.html.ep:13 themes/default/templates/myfiles.html.ep:12 themes/default/templates/myfiles.html.ep:15
msgid "Gallery link"
msgstr "Lien vers la galerie"
#: themes/default/templates/partial/lutim.js.ep:125
#: themes/default/templates/partial/lutim.js.ep:142
#: themes/default/templates/partial/common.js.ep:104 themes/default/templates/partial/common.js.ep:87
msgid "Hit Ctrl+C, then Enter to copy the short link"
msgstr "Faites Ctrl+C puis appuyez sur la touche Entrée pour copier le lien"
#: themes/default/templates/layouts/default.html.ep:45
#: themes/default/templates/layouts/default.html.ep:50
msgid "Homepage"
msgstr "Accueil"
@@ -223,27 +183,30 @@ msgstr "Comment peut-on faire pour signaler une image ?"
msgid "If the files are deleted if you ask it while posting it, their SHA512 footprint are retained."
msgstr "Si les fichiers sont bien supprimés si vous en avez exprimé le choix, leur empreinte SHA512 est toutefois conservée."
#: themes/default/templates/index.html.ep:163
#: themes/default/templates/index.html.ep:203
#: themes/default/templates/index.html.ep:163 themes/default/templates/index.html.ep:203
msgid "Image URL"
msgstr "URL de limage"
#: lib/Lutim/Command/cron/stats.pm:93
#: lib/Lutim/Command/cron/stats.pm:143 themes/default/templates/raw.html.ep:2
msgid "Image delay"
msgstr "Durée de rétention de limage"
#: lib/Lutim/Controller.pm:715
#: lib/Lutim/Controller.pm:710
msgid "Image not found."
msgstr "Image non trouvée."
#: themes/default/templates/layouts/default.html.ep:49
#: themes/default/templates/layouts/default.html.ep:54
msgid "Informations"
msgstr "Informations"
#: themes/default/templates/layouts/default.html.ep:55
#: themes/default/templates/layouts/default.html.ep:62
msgid "Install webapp"
msgstr "Installer la webapp"
#: themes/default/templates/layouts/default.html.ep:61
msgid "Instance's statistics"
msgstr "Statistiques de linstance"
#: themes/default/templates/about.html.ep:11
msgid "Is it really anonymous?"
msgstr "Cest vraiment anonyme ?"
@@ -256,29 +219,30 @@ msgstr "Cest vraiment gratuit ?"
msgid "Juste like you pronounce the French word <a href=\"https://fr.wikipedia.org/wiki/Lutin\">lutin</a> (/ly.tɛ̃/)."
msgstr "Comme on prononce <a href=\"https://fr.wikipedia.org/wiki/Lutin\">lutin</a> (/ly.tɛ̃/)."
#: themes/default/templates/index.html.ep:153
#: themes/default/templates/index.html.ep:184
#: themes/default/templates/index.html.ep:153 themes/default/templates/index.html.ep:184
msgid "Keep EXIF tags"
msgstr "Conserver les données EXIF"
#: themes/default/templates/index.html.ep:118
#: themes/default/templates/index.html.ep:166
#: themes/default/templates/index.html.ep:206
#: themes/default/templates/partial/lutim.js.ep:260
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:163
msgid "Let's go!"
msgstr "Allons-y !"
#: themes/default/templates/layouts/default.html.ep:48
#: themes/default/templates/layouts/default.html.ep:58
msgid "Liberapay button"
msgstr "Bouton Liberapay"
#: themes/default/templates/layouts/default.html.ep:53
msgid "License:"
msgstr "Licence :"
#: themes/default/templates/index.html.ep:89
#: themes/default/templates/index.html.ep:91
#: themes/default/templates/partial/lutim.js.ep:208
#: themes/default/templates/partial/lutim.js.ep:212
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:111 themes/default/templates/partial/lutim.js.ep:115
msgid "Link for share on social networks"
msgstr "Lien pour partager sur les réseaux sociaux"
#: themes/default/templates/zip.html.ep:7
msgid "Lutim can't zip so many images at once, so it splitted your demand in multiple URLs."
msgstr "Lutim ne peut zipper autant dimages à la fois, votre demande a donc été découpée en plusieurs URL."
#: themes/default/templates/about.html.ep:4
msgid "Lutim is a free (as in free beer) and anonymous image hosting service. It's also the name of the free (as in free speech) software which provides this service."
msgstr "Lutim est un service gratuit et anonyme dhébergement dimages. Il sagit aussi du nom du logiciel (libre) qui fournit ce service."
@@ -287,24 +251,19 @@ msgstr "Lutim est un service gratuit et anonyme dhébergement dimages. Il
msgid "Main developers"
msgstr "Développeurs de lapplication"
#: themes/default/templates/index.html.ep:73
#: themes/default/templates/index.html.ep:75
#: themes/default/templates/partial/lutim.js.ep:182
#: themes/default/templates/partial/lutim.js.ep:185
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:85 themes/default/templates/partial/lutim.js.ep:88
msgid "Markdown syntax"
msgstr "Syntaxe Markdown"
#: themes/default/templates/layouts/default.html.ep:54
#: themes/default/templates/myfiles.html.ep:2
#: themes/default/templates/layouts/default.html.ep:60 themes/default/templates/myfiles.html.ep:2
msgid "My images"
msgstr "Mes images"
#: themes/default/templates/myfiles.html.ep:39
#: themes/default/templates/partial/myfiles.js.ep:19
msgid "No limit"
msgstr "Pas de date dexpiration"
#: themes/default/templates/index.html.ep:165
#: themes/default/templates/index.html.ep:198
#: themes/default/templates/index.html.ep:165 themes/default/templates/index.html.ep:198
msgid "Only images are allowed"
msgstr "Seules les images sont acceptées"
@@ -316,6 +275,10 @@ msgstr "Seules les images envoyées avec ce navigateur seront listées ici. Les
msgid "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
msgstr "Seulement lenvoyeur ! (enfin, seulement sil possède des droits exclusifs sur les images avant de les envoyer)"
#: themes/default/templates/zip.html.ep:12
msgid "Please click on each URL to download the different zip files."
msgstr "Veuillez cliquer sur chaque URL pour télécharger les différents fichiers zip."
#. (config('contact')
#: themes/default/templates/about.html.ep:19
msgid "Please contact the administrator: %1"
@@ -329,24 +292,31 @@ msgstr "Statistiques brutes"
msgid "Send an image"
msgstr "Envoyer une image"
#: themes/default/templates/partial/lutim.js.ep:51
#: themes/default/templates/partial/lutim.js.ep:20
msgid "Share it!"
msgstr "Partagez !"
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:56
msgid "Share on Twitter"
msgstr "Partager sur Twitter"
#: themes/default/templates/index.html.ep:133
#: themes/default/templates/partial/lutim.js.ep:271
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:174
msgid "Something bad happened"
msgstr "Un problème est survenu"
#. ($c->config('contact')
#: lib/Lutim/Controller.pm:723
#: lib/Lutim/Controller.pm:717
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
msgstr "Quelque chose sest mal passé lors de la création de larchive. Veuillez réessayer plus tard ou contactez ladministrateur (%1)."
#: themes/default/templates/layouts/default.html.ep:58
msgid "Support the author on Liberapay"
msgstr "Supporter lauteur sur Liberapay"
#: themes/default/templates/layouts/default.html.ep:57
msgid "Support the author on Tipeee"
msgstr "Supporter lauteur sur Tipeee"
#: themes/default/templates/about.html.ep:13
msgid "The IP address of the image's sender is retained for a delay which depends of the administrator's choice (for the official instance, which is located in France, it's one year)."
msgstr ""
@@ -357,26 +327,27 @@ msgstr ""
msgid "The Lutim software is a <a href=\"http://en.wikipedia.org/wiki/Free_software\">free software</a>, which allows you to download and install it on you own server. Have a look at the <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> to see what you can do."
msgstr "Le logiciel Lutim est un <a href=\"https://fr.wikipedia.org/wiki/Logiciel_libre\">logiciel libre</a>, ce qui vous permet de le télécharger et de linstaller sur votre propre serveur. Jetez un coup d’œil à l<a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> pour voir quels sont vos droits"
#: lib/Lutim/Controller.pm:305
#: lib/Lutim/Controller.pm:307
msgid "The URL is not valid."
msgstr "LURL nest pas valide."
#: lib/Lutim/Controller.pm:117
#: lib/Lutim/Controller.pm:186
#: themes/default/templates/zip.html.ep:16
msgid "The automatic download process will open a tab in your browser for each link. You need to allow popups for Lutim."
msgstr "Le processus de téléchargement automatique va ouvrir un onglet dans votre navigateur pour chaque lien. Vous devez autoriser les fenêtres popup pour Lutim."
#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188
msgid "The delete token is invalid."
msgstr "Le jeton de suppression est invalide."
#. ($upload->filename)
#: lib/Lutim/Controller.pm:449
#: lib/Lutim/Controller.pm:445
msgid "The file %1 is not an image."
msgstr "Le fichier %1 nest pas une image."
#. ($max_file_size)
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#: lib/Lutim/Controller.pm:269
#: lib/Lutim/Controller.pm:338
#: themes/default/templates/partial/lutim.js.ep:332
#. (config('max_file_size')
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:240
msgid "The file exceed the size limit (%1)"
msgstr "Le fichier dépasse la limite de taille (%1)"
@@ -385,17 +356,16 @@ msgid "The graph's datas are not updated in real-time."
msgstr "Les données du graphique ne sont pas mises à jour en temps réél."
#. ($image->filename)
#: lib/Lutim/Controller.pm:188
#: lib/Lutim/Controller.pm:190
msgid "The image %1 has already been deleted."
msgstr "Limage %1 a déjà été supprimée."
#. ($image->filename)
#: lib/Lutim/Controller.pm:197
#: lib/Lutim/Controller.pm:202
#: lib/Lutim/Controller.pm:199 lib/Lutim/Controller.pm:204
msgid "The image %1 has been successfully deleted"
msgstr "Limage %1 a été supprimée avec succès."
#: lib/Lutim/Controller.pm:125
#: lib/Lutim/Controller.pm:128
msgid "The image's delay has been successfully modified"
msgstr "Le délai de limage a été modifié avec succès."
@@ -408,37 +378,32 @@ msgid "The images you post on Lutim can be stored indefinitely or be deleted at
msgstr "Les images déposées sur Lutim peuvent être stockées indéfiniment, ou seffacer dès le premier affichage ou au bout du délai choisi parmi ceux proposés."
#. ($c->config->{contact})
#: lib/Lutim/Controller.pm:444
#: lib/Lutim/Controller.pm:442
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "Il ny a plus dURL disponible. Veuillez réessayer ou contacter ladministrateur. %1."
#: lib/Lutim/Command/cron/stats.pm:102
#: themes/default/templates/layouts/default.html.ep:57
msgid "Tipeee button"
msgstr "Bouton Tipeee"
#: lib/Lutim/Command/cron/stats.pm:152 themes/default/templates/raw.html.ep:11
msgid "Total"
msgstr "Total"
#: themes/default/templates/index.html.ep:60
#: themes/default/templates/partial/lutim.js.ep:45
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:14
msgid "Tweet it!"
msgstr "Tweetez !"
#. ($short)
#: lib/Lutim/Controller.pm:159
#: lib/Lutim/Controller.pm:231
#: lib/Lutim/Controller.pm:162 lib/Lutim/Controller.pm:233
msgid "Unable to find the image %1."
msgstr "Impossible de trouver limage %1."
#: lib/Lutim.pm:85
#: lib/Lutim/Controller.pm:534
#: lib/Lutim/Controller.pm:580
#: lib/Lutim/Controller.pm:624
#: lib/Lutim/Controller.pm:664
#: lib/Lutim/Controller.pm:676
#: lib/Lutim/Controller.pm:687
#: lib/Lutim/Controller.pm:712
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:616 lib/Lutim/Controller.pm:659 lib/Lutim/Controller.pm:671 lib/Lutim/Controller.pm:682 lib/Lutim/Controller.pm:707 lib/Lutim/Plugin/Helpers.pm:57
msgid "Unable to find the image: it has been deleted."
msgstr "Impossible de trouver limage : elle a été supprimée."
#: lib/Lutim/Controller.pm:101
#: lib/Lutim/Controller.pm:105
msgid "Unable to get counter"
msgstr "Impossible de récupérer le compteur"
@@ -446,12 +411,11 @@ msgstr "Impossible de récupérer le compteur"
msgid "Unlike many image sharing services, you don't give us rights on uploaded images."
msgstr "Au contraire de la majorité des services de partages dimage, vous ne nous cédez aucun droit sur les images envoyées."
#: themes/default/templates/index.html.ep:162
#: themes/default/templates/index.html.ep:201
#: themes/default/templates/index.html.ep:162 themes/default/templates/index.html.ep:201
msgid "Upload an image with its URL"
msgstr "Déposer une image par son URL"
#: themes/default/templates/myfiles.html.ep:17
#: themes/default/templates/myfiles.html.ep:54
msgid "Uploaded at"
msgstr "Envoyé le"
@@ -459,16 +423,12 @@ msgstr "Envoyé le"
msgid "Uploaded files by days"
msgstr "Fichiers envoyés, par jour"
#. ($config->{contact})
#: lib/Lutim.pm:189
#. ($c->app->config('contact')
#: lib/Lutim/Plugin/Helpers.pm:152
msgid "Uploading is currently disabled, please try later or contact the administrator (%1)."
msgstr "Lenvoi dimages est actuellement désactivé, veuillez réessayer plus tard ou contacter ladministrateur (%1)."
#: themes/default/templates/index.html.ep:65
#: themes/default/templates/index.html.ep:67
#: themes/default/templates/myfiles.html.ep:14
#: themes/default/templates/partial/lutim.js.ep:168
#: themes/default/templates/partial/lutim.js.ep:172
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:71 themes/default/templates/partial/lutim.js.ep:75
msgid "View link"
msgstr "Lien daffichage"
@@ -492,6 +452,10 @@ msgstr "Oui, ça lest ! Par contre, pour des raisons légales, votre adresse
msgid "Yes, it is! On the other side, if you want to support the developer, you can do it via <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> or via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
msgstr "Oui, ça lest ! Par contre, si vous avez envie de soutenir le développeur, vous pouvez faire un microdon avec <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> ou via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
#: themes/default/templates/zip.html.ep:6
msgid "You asked to download a zip archive for too much files."
msgstr "Vous avez demandé de télécharger une archive zip pour trop de fichiers."
#: themes/default/templates/about.html.ep:8
msgid "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
msgstr "Vous pouvez, de façon facultative, demander à ce que la ou les images déposées sur Lutim soient supprimées après leur premier affichage (ou téléchargement) ou au bout dun délai choisi parmi ceux proposés."
@@ -504,10 +468,7 @@ msgstr "et sur"
msgid "core developer"
msgstr "développeur principal"
#: lib/Lutim/Command/cron/stats.pm:108
#: lib/Lutim/Command/cron/stats.pm:125
#: lib/Lutim/Command/cron/stats.pm:97
#: themes/default/templates/index.html.ep:3
#: lib/Lutim.pm:190 lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
msgid "no time limit"
msgstr "Pas de limitation de durée"
+111 -150
View File
@@ -17,19 +17,11 @@ msgstr ""
"Language: oc\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. ($delay)
#. (config('max_delay')
#. (7)
#. (30)
#: lib/Lutim/Command/cron/stats.pm:100
#: lib/Lutim/Command/cron/stats.pm:110
#: lib/Lutim/Command/cron/stats.pm:111
#: lib/Lutim/Command/cron/stats.pm:127
#: lib/Lutim/Command/cron/stats.pm:128
#: lib/Lutim/Command/cron/stats.pm:99
#: themes/default/templates/partial/lutim.js.ep:235
#: themes/default/templates/partial/lutim.js.ep:244
#: themes/default/templates/partial/lutim.js.ep:245
#. ($delay)
#. (config('max_delay')
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:138 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
msgid "%1 days"
msgstr "%1 jorns"
@@ -42,69 +34,51 @@ msgstr "%1 imatges mandats sus aquesta instància dempuèi lo començament."
msgid "-or-"
msgstr "-o-"
#: lib/Lutim/Command/cron/stats.pm:101
#: lib/Lutim/Command/cron/stats.pm:112
#: lib/Lutim/Command/cron/stats.pm:129
#: themes/default/templates/index.html.ep:5
#: lib/Lutim.pm:192 lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
msgid "1 year"
msgstr "1 an"
#: lib/Lutim/Command/cron/stats.pm:109
#: lib/Lutim/Command/cron/stats.pm:126
#: lib/Lutim/Command/cron/stats.pm:98
#: themes/default/templates/index.html.ep:4
#: themes/default/templates/partial/lutim.js.ep:244
#: lib/Lutim.pm:191 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
msgid "24 hours"
msgstr "24 oras"
#: themes/default/templates/myfiles.html.ep:79
#: themes/default/templates/partial/myfiles.js.ep:57
msgid ": Error while trying to get the counter."
msgstr " : Error al moment de recuperar lo comptador."
#: lib/Lutim/Command/cron/stats.pm:94
#: lib/Lutim/Command/cron/stats.pm:144 themes/default/templates/raw.html.ep:3
msgid "Active images"
msgstr "Imatges actius"
#: lib/Lutim/Controller.pm:286
#: lib/Lutim/Controller.pm:288
msgid "An error occured while downloading the image."
msgstr "Una error es apareguda pendent lo telecargament de l'imatge."
#: themes/default/templates/about.html.ep:41
#: themes/default/templates/myfiles.html.ep:27
#: themes/default/templates/stats.html.ep:25
#: themes/default/templates/zip.html.ep:2
msgid "Archives download"
msgstr "Telecargar los archius"
#: themes/default/templates/about.html.ep:41 themes/default/templates/myfiles.html.ep:64 themes/default/templates/stats.html.ep:25
msgid "Back to homepage"
msgstr "Tornar a la pagina d'acuèlh"
#: themes/default/templates/index.html.ep:193
#: themes/default/templates/index.html.ep:194
#: themes/default/templates/index.html.ep:193 themes/default/templates/index.html.ep:194
msgid "Click to open the file browser"
msgstr "Clicatz per utilizar lo navigador de fichièr"
msgstr "Clicatz per utilizar lo navigator de fichièr"
#: themes/default/templates/about.html.ep:30
msgid "Contributors"
msgstr "Contributors"
msgstr "Contribudors"
#: themes/default/templates/partial/lutim.js.ep:310
#: themes/default/templates/partial/lutim.js.ep:359
#: themes/default/templates/partial/lutim.js.ep:437
#: themes/default/templates/partial/lutim.js.ep:214 themes/default/templates/partial/lutim.js.ep:268 themes/default/templates/partial/lutim.js.ep:346
msgid "Copy all view links to clipboard"
msgstr "Copiar totes los ligams de visualizacion dins lo quichapapièrs"
#: themes/default/templates/index.html.ep:18
#: themes/default/templates/index.html.ep:36
#: themes/default/templates/index.html.ep:69
#: themes/default/templates/index.html.ep:77
#: themes/default/templates/index.html.ep:85
#: themes/default/templates/index.html.ep:93
#: themes/default/templates/partial/common.js.ep:45
#: themes/default/templates/partial/lutim.js.ep:176
#: themes/default/templates/partial/lutim.js.ep:188
#: themes/default/templates/partial/lutim.js.ep:202
#: themes/default/templates/partial/lutim.js.ep:217
#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:150 themes/default/templates/partial/lutim.js.ep:105 themes/default/templates/partial/lutim.js.ep:120 themes/default/templates/partial/lutim.js.ep:79 themes/default/templates/partial/lutim.js.ep:91
msgid "Copy to clipboard"
msgstr "Copiar dins lo quichapapièrs"
#: themes/default/templates/myfiles.html.ep:15
#: themes/default/templates/myfiles.html.ep:52
msgid "Counter"
msgstr "Comptador"
@@ -116,26 +90,19 @@ msgstr "Grafic de despartiment dels delais pels imatges desactivats"
msgid "Delay repartition chart for enabled images"
msgstr "Grafic de despartiment dels delais pels imatges activats"
#: themes/default/templates/index.html.ep:115
#: themes/default/templates/index.html.ep:147
#: themes/default/templates/index.html.ep:178
#: themes/default/templates/myfiles.html.ep:16
#: themes/default/templates/partial/lutim.js.ep:256
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:159
msgid "Delete at first view?"
msgstr "Suprimir al primièr accès ?"
#: lib/Lutim/Command/cron/stats.pm:95
#: lib/Lutim/Command/cron/stats.pm:145 themes/default/templates/raw.html.ep:4
msgid "Deleted images"
msgstr "Imatges suprimits"
#: lib/Lutim/Command/cron/stats.pm:96
#: lib/Lutim/Command/cron/stats.pm:146 themes/default/templates/raw.html.ep:5
msgid "Deleted images in 30 days"
msgstr "Imatges per èsser suprimits dins 30 jorns"
#: themes/default/templates/index.html.ep:98
#: themes/default/templates/myfiles.html.ep:19
#: themes/default/templates/partial/common.js.ep:37
#: themes/default/templates/partial/common.js.ep:40
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:142 themes/default/templates/partial/common.js.ep:145
msgid "Deletion link"
msgstr "Ligam de supression"
@@ -143,15 +110,11 @@ msgstr "Ligam de supression"
msgid "Download all images"
msgstr "Telecargar totes los imatges"
#: themes/default/templates/index.html.ep:81
#: themes/default/templates/index.html.ep:83
#: themes/default/templates/partial/lutim.js.ep:194
#: themes/default/templates/partial/lutim.js.ep:198
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:101 themes/default/templates/partial/lutim.js.ep:97
msgid "Download link"
msgstr "Ligam de telecargament"
#: themes/default/templates/index.html.ep:28
#: themes/default/templates/index.html.ep:31
#: themes/default/templates/index.html.ep:28 themes/default/templates/index.html.ep:31 themes/default/templates/myfiles.html.ep:30 themes/default/templates/myfiles.html.ep:33
msgid "Download zip link"
msgstr "Ligam de telecargament de l'archiu dels imatges"
@@ -163,12 +126,11 @@ msgstr "Lisatz e depausatz vòstres imatges aquí"
msgid "Drag and drop an image in the appropriate area or use the traditional way to send files and Lutim will provide you four URLs. One to view the image, an other to directly download it, one you can use on social networks and a last to delete the image when you want."
msgstr "Depausatz vòstres imatges dins la zòna prevista per aquò o seleccionatz un fichièr d'un biais classic e Lutim vos donarà quatre URLs en torna. Una per afichar l'imatge, una mai per lo telecargar dirèctament, una per l'utilizar suls malhums socials e una darrièra per suprimir vòstre imatge quand volguèssetz."
#: themes/default/templates/index.html.ep:150
#: themes/default/templates/index.html.ep:181
#: themes/default/templates/index.html.ep:150 themes/default/templates/index.html.ep:181
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Chifrar l'imatge (Lutim garda pas la clau)."
#: themes/default/templates/partial/lutim.js.ep:72
#: themes/default/templates/partial/lutim.js.ep:44
msgid "Error while trying to modify the image."
msgstr "Una error es apareguda al moment de modificar l'imatge."
@@ -176,11 +138,11 @@ msgstr "Una error es apareguda al moment de modificar l'imatge."
msgid "Evolution of total files"
msgstr "Evolucion del nombre total de fichièrs"
#: themes/default/templates/myfiles.html.ep:18
#: themes/default/templates/myfiles.html.ep:55
msgid "Expires at"
msgstr "Expira lo"
msgstr "S'acaba lo"
#: themes/default/templates/myfiles.html.ep:13
#: themes/default/templates/myfiles.html.ep:50
msgid "File name"
msgstr "Nom del fichièr"
@@ -188,21 +150,19 @@ msgstr "Nom del fichièr"
msgid "For more details, see the <a href=\"https://framagit.org/luc/lutim\">homepage of the project</a>."
msgstr "Per mai de detalhs, consultatz la pagina <a href=\"https://framagit.org/luc/lutim\">Github</a> del projècte."
#: themes/default/templates/layouts/default.html.ep:50
#: themes/default/templates/layouts/default.html.ep:55
msgid "Fork me!"
msgstr "Creatz un fork !"
msgstr "Tustatz-me !"
#: themes/default/templates/index.html.ep:10
#: themes/default/templates/index.html.ep:13
#: themes/default/templates/index.html.ep:10 themes/default/templates/index.html.ep:13 themes/default/templates/myfiles.html.ep:12 themes/default/templates/myfiles.html.ep:15
msgid "Gallery link"
msgstr "Ligam cap a la galariá"
#: themes/default/templates/partial/lutim.js.ep:125
#: themes/default/templates/partial/lutim.js.ep:142
#: themes/default/templates/partial/common.js.ep:104 themes/default/templates/partial/common.js.ep:87
msgid "Hit Ctrl+C, then Enter to copy the short link"
msgstr "Fasètz Ctrl+C puèi picatz Entrada per copiar lo ligam"
#: themes/default/templates/layouts/default.html.ep:45
#: themes/default/templates/layouts/default.html.ep:50
msgid "Homepage"
msgstr "Acuèlh"
@@ -222,27 +182,30 @@ msgstr "Qué far per senhalar un imatge ?"
msgid "If the files are deleted if you ask it while posting it, their SHA512 footprint are retained."
msgstr "Se los fichièrs son ben estats suprimits se o avètz demandat, lors signaturas SHA512 son gardadas."
#: themes/default/templates/index.html.ep:163
#: themes/default/templates/index.html.ep:203
#: themes/default/templates/index.html.ep:163 themes/default/templates/index.html.ep:203
msgid "Image URL"
msgstr "URL de l'imatge"
#: lib/Lutim/Command/cron/stats.pm:93
#: lib/Lutim/Command/cron/stats.pm:143 themes/default/templates/raw.html.ep:2
msgid "Image delay"
msgstr "Delai de l'imatge"
#: lib/Lutim/Controller.pm:715
#: lib/Lutim/Controller.pm:710
msgid "Image not found."
msgstr "Imatge pas trobat."
#: themes/default/templates/layouts/default.html.ep:49
#: themes/default/templates/layouts/default.html.ep:54
msgid "Informations"
msgstr "Informacions"
#: themes/default/templates/layouts/default.html.ep:55
#: themes/default/templates/layouts/default.html.ep:62
msgid "Install webapp"
msgstr "Installar la webapp"
#: themes/default/templates/layouts/default.html.ep:61
msgid "Instance's statistics"
msgstr "Estatisticas de l'instància"
#: themes/default/templates/about.html.ep:11
msgid "Is it really anonymous?"
msgstr "Es vertadièrament anonim ?"
@@ -255,29 +218,30 @@ msgstr "Es vertadièrament gratuit ?"
msgid "Juste like you pronounce the French word <a href=\"https://fr.wikipedia.org/wiki/Lutin\">lutin</a> (/ly.tɛ̃/)."
msgstr "Òm pronóncia coma en occitan lengadocian, LU-TI-N, amb una M finala que sona N, o coma la paraula francesa lutin (/ly.tɛ̃/)."
#: themes/default/templates/index.html.ep:153
#: themes/default/templates/index.html.ep:184
#: themes/default/templates/index.html.ep:153 themes/default/templates/index.html.ep:184
msgid "Keep EXIF tags"
msgstr "Conservar las donadas EXIF"
#: themes/default/templates/index.html.ep:118
#: themes/default/templates/index.html.ep:166
#: themes/default/templates/index.html.ep:206
#: themes/default/templates/partial/lutim.js.ep:260
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:163
msgid "Let's go!"
msgstr "Zo !"
#: themes/default/templates/layouts/default.html.ep:48
#: themes/default/templates/layouts/default.html.ep:58
msgid "Liberapay button"
msgstr "Boton Liberapay"
#: themes/default/templates/layouts/default.html.ep:53
msgid "License:"
msgstr "Licéncia :"
#: themes/default/templates/index.html.ep:89
#: themes/default/templates/index.html.ep:91
#: themes/default/templates/partial/lutim.js.ep:208
#: themes/default/templates/partial/lutim.js.ep:212
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:111 themes/default/templates/partial/lutim.js.ep:115
msgid "Link for share on social networks"
msgstr "Ligam per partejar suls malhums socials"
#: themes/default/templates/zip.html.ep:7
msgid "Lutim can't zip so many images at once, so it splitted your demand in multiple URLs."
msgstr "Lutim pòt pas comprimir tan d'imatge d'un còp, a doncas trocejat vòstra demanda en multiplas URLs"
#: themes/default/templates/about.html.ep:4
msgid "Lutim is a free (as in free beer) and anonymous image hosting service. It's also the name of the free (as in free speech) software which provides this service."
msgstr "Lutim es un servici gratuit e anonim dalbergament dimatges. Sagís tanben del nom del logicial (liure) que fornís aqueste servici."
@@ -286,24 +250,19 @@ msgstr "Lutim es un servici gratuit e anonim dalbergament dimatges. Sag
msgid "Main developers"
msgstr "Desvolopaires de l'aplicacion"
#: themes/default/templates/index.html.ep:73
#: themes/default/templates/index.html.ep:75
#: themes/default/templates/partial/lutim.js.ep:182
#: themes/default/templates/partial/lutim.js.ep:185
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:85 themes/default/templates/partial/lutim.js.ep:88
msgid "Markdown syntax"
msgstr "Sintaxi Markdown"
#: themes/default/templates/layouts/default.html.ep:54
#: themes/default/templates/myfiles.html.ep:2
#: themes/default/templates/layouts/default.html.ep:60 themes/default/templates/myfiles.html.ep:2
msgid "My images"
msgstr "Mos imatges"
#: themes/default/templates/myfiles.html.ep:39
#: themes/default/templates/partial/myfiles.js.ep:19
msgid "No limit"
msgstr "Pas cap de data d'expiracion"
#: themes/default/templates/index.html.ep:165
#: themes/default/templates/index.html.ep:198
#: themes/default/templates/index.html.ep:165 themes/default/templates/index.html.ep:198
msgid "Only images are allowed"
msgstr "Solament son acceptats los imatges"
@@ -315,6 +274,10 @@ msgstr "Solament los imatges mandats amb aqueste navigador seràn listats aquí.
msgid "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
msgstr "Solament lo qu'a mandat ! (ben, solament se ten los dreits exclusius dels imatges abans de los mandar)"
#: themes/default/templates/zip.html.ep:12
msgid "Please click on each URL to download the different zip files."
msgstr "Mercés de clicar sus cada URL per telecargar los diferents archius ZIP."
#. (config('contact')
#: themes/default/templates/about.html.ep:19
msgid "Please contact the administrator: %1"
@@ -322,30 +285,37 @@ msgstr "Mercés de contactar l'administrator : %1"
#: themes/default/templates/stats.html.ep:22
msgid "Raw stats"
msgstr "Estatisticas bruts"
msgstr "Estatisticas brutas"
#: themes/default/templates/index.html.ep:158
msgid "Send an image"
msgstr "Mandar un imatge"
#: themes/default/templates/partial/lutim.js.ep:51
#: themes/default/templates/partial/lutim.js.ep:20
msgid "Share it!"
msgstr "Partejatz !"
msgstr "Partejatz-lo !"
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:56
msgid "Share on Twitter"
msgstr "Partejar sus Twitter"
#: themes/default/templates/index.html.ep:133
#: themes/default/templates/partial/lutim.js.ep:271
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:174
msgid "Something bad happened"
msgstr "Un problèma es aparegut"
#. ($c->config('contact')
#: lib/Lutim/Controller.pm:723
#: lib/Lutim/Controller.pm:717
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
msgstr "Quicòm a trucat pendent la creacion de l'archiu. Mercés de tornar ensajar pus tard o de contactar l'administrator (%1)."
#: themes/default/templates/layouts/default.html.ep:58
msgid "Support the author on Liberapay"
msgstr "Sostenir l'autor sus Liberapay"
#: themes/default/templates/layouts/default.html.ep:57
msgid "Support the author on Tipeee"
msgstr "Sostenir l'autor sus Tipeee"
#: themes/default/templates/about.html.ep:13
msgid "The IP address of the image's sender is retained for a delay which depends of the administrator's choice (for the official instance, which is located in France, it's one year)."
msgstr "LIP de la persona que mandèt l'imatge es gardada pendent un delai que depend de l'administrator de l'instància (per l'instància oficiala que lo servidor es en França, es un delai d'un an)."
@@ -354,26 +324,27 @@ msgstr "LIP de la persona que mandèt l'imatge es gardada pendent un delai qu
msgid "The Lutim software is a <a href=\"http://en.wikipedia.org/wiki/Free_software\">free software</a>, which allows you to download and install it on you own server. Have a look at the <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> to see what you can do."
msgstr "Lo logicial Lutim es un <a href=\"https://oc.wikipedia.org/wiki/Logicial_liure\">logicial liure</a>, que permet de lo telecargar e de linstallar sus vòstre pròpri servidor. Gaitatz l<a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> per veire que son vòstres dreits"
#: lib/Lutim/Controller.pm:305
#: lib/Lutim/Controller.pm:307
msgid "The URL is not valid."
msgstr "L'URL n'es pas valida."
#: lib/Lutim/Controller.pm:117
#: lib/Lutim/Controller.pm:186
#: themes/default/templates/zip.html.ep:16
msgid "The automatic download process will open a tab in your browser for each link. You need to allow popups for Lutim."
msgstr "Lo processús automatic de telecargament obrirà un onglet dins lo navigato per cada ligam. Vos cal autorizar las popups per Lutim."
#: lib/Lutim/Controller.pm:120 lib/Lutim/Controller.pm:188
msgid "The delete token is invalid."
msgstr "Lo geton de supression es invalida."
#. ($upload->filename)
#: lib/Lutim/Controller.pm:449
#: lib/Lutim/Controller.pm:445
msgid "The file %1 is not an image."
msgstr "Lo fichièr %1 es pas un imatge."
#. ($max_file_size)
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#: lib/Lutim/Controller.pm:269
#: lib/Lutim/Controller.pm:338
#: themes/default/templates/partial/lutim.js.ep:332
#. (config('max_file_size')
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:240
msgid "The file exceed the size limit (%1)"
msgstr "Lo fichièr depassa lo limit de talha (%1)"
@@ -382,17 +353,16 @@ msgid "The graph's datas are not updated in real-time."
msgstr "Las donadas del grafic son pas mesas a jorn en temps real."
#. ($image->filename)
#: lib/Lutim/Controller.pm:188
#: lib/Lutim/Controller.pm:190
msgid "The image %1 has already been deleted."
msgstr "L'imatge %1 es ja estat suprimit."
#. ($image->filename)
#: lib/Lutim/Controller.pm:197
#: lib/Lutim/Controller.pm:202
#: lib/Lutim/Controller.pm:199 lib/Lutim/Controller.pm:204
msgid "The image %1 has been successfully deleted"
msgstr "L'imatge %1 es estat suprimit amb succès."
#: lib/Lutim/Controller.pm:125
#: lib/Lutim/Controller.pm:128
msgid "The image's delay has been successfully modified"
msgstr "Lo delai de l'imatge es plan estat modificat."
@@ -405,37 +375,32 @@ msgid "The images you post on Lutim can be stored indefinitely or be deleted at
msgstr "Los imatges depausats sus Lutim pòdon èsser gardats sens fin, o sescafar tre lo primièr afichatge o al cap d'un delai causit entre los prepausats."
#. ($c->config->{contact})
#: lib/Lutim/Controller.pm:444
#: lib/Lutim/Controller.pm:442
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "I a pas mai d'URL disponibla. Mercés de tornar ensajar o de contactar l'administrator. %1."
#: lib/Lutim/Command/cron/stats.pm:102
#: themes/default/templates/layouts/default.html.ep:57
msgid "Tipeee button"
msgstr "Boton Tipeee"
#: lib/Lutim/Command/cron/stats.pm:152 themes/default/templates/raw.html.ep:11
msgid "Total"
msgstr "Total"
#: themes/default/templates/index.html.ep:60
#: themes/default/templates/partial/lutim.js.ep:45
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:14
msgid "Tweet it!"
msgstr "Tweetejatz !"
msgstr "Tweetejatz-lo !"
#. ($short)
#: lib/Lutim/Controller.pm:159
#: lib/Lutim/Controller.pm:231
#: lib/Lutim/Controller.pm:162 lib/Lutim/Controller.pm:233
msgid "Unable to find the image %1."
msgstr "Impossible de trobar l'imatge %1."
#: lib/Lutim.pm:85
#: lib/Lutim/Controller.pm:534
#: lib/Lutim/Controller.pm:580
#: lib/Lutim/Controller.pm:624
#: lib/Lutim/Controller.pm:664
#: lib/Lutim/Controller.pm:676
#: lib/Lutim/Controller.pm:687
#: lib/Lutim/Controller.pm:712
#: lib/Lutim/Controller.pm:529 lib/Lutim/Controller.pm:574 lib/Lutim/Controller.pm:616 lib/Lutim/Controller.pm:659 lib/Lutim/Controller.pm:671 lib/Lutim/Controller.pm:682 lib/Lutim/Controller.pm:707 lib/Lutim/Plugin/Helpers.pm:57
msgid "Unable to find the image: it has been deleted."
msgstr "Impossible de trobar l'imatge : es estat suprimit."
#: lib/Lutim/Controller.pm:101
#: lib/Lutim/Controller.pm:105
msgid "Unable to get counter"
msgstr "Impossible de recuperar lo comptador"
@@ -443,12 +408,11 @@ msgstr "Impossible de recuperar lo comptador"
msgid "Unlike many image sharing services, you don't give us rights on uploaded images."
msgstr "A l'invèrse de la màger part dels servicis de partiment d'imatge, daissatz pas cap de dreit suls imatges que mandatz."
#: themes/default/templates/index.html.ep:162
#: themes/default/templates/index.html.ep:201
#: themes/default/templates/index.html.ep:162 themes/default/templates/index.html.ep:201
msgid "Upload an image with its URL"
msgstr "Depausar un imatge per son URL"
#: themes/default/templates/myfiles.html.ep:17
#: themes/default/templates/myfiles.html.ep:54
msgid "Uploaded at"
msgstr "Mandat lo"
@@ -456,16 +420,12 @@ msgstr "Mandat lo"
msgid "Uploaded files by days"
msgstr "Fichièrs mandats per jorn"
#. ($config->{contact})
#: lib/Lutim.pm:189
#. ($c->app->config('contact')
#: lib/Lutim/Plugin/Helpers.pm:152
msgid "Uploading is currently disabled, please try later or contact the administrator (%1)."
msgstr "La mesa en linha es desactivada pel moment, mercés de tornar ensajar mai tard o de contactar l'administrator (%1)."
#: themes/default/templates/index.html.ep:65
#: themes/default/templates/index.html.ep:67
#: themes/default/templates/myfiles.html.ep:14
#: themes/default/templates/partial/lutim.js.ep:168
#: themes/default/templates/partial/lutim.js.ep:172
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:71 themes/default/templates/partial/lutim.js.ep:75
msgid "View link"
msgstr "Ligam d'afichatge"
@@ -489,6 +449,10 @@ msgstr "Òc, es aquò ! Al contrari, per de rasons legalas, vòstra adreça IP s
msgid "Yes, it is! On the other side, if you want to support the developer, you can do it via <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> or via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
msgstr "Òc, o es ! Al contrari, s'avètz enveja de sosténer lo desvolopaire, podètz far un microdon amb <a href=\"https://www.tipeee.com/fiat-tux\">Tipeee</a> o via <a href=\"https://liberapay.com/sky/\">Liberapay</a>."
#: themes/default/templates/zip.html.ep:6
msgid "You asked to download a zip archive for too much files."
msgstr "Avètz demandat de telecargar tròp d'imatges d'un còp dins un archiu ZIP."
#: themes/default/templates/about.html.ep:8
msgid "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
msgstr "Podètz, d'un biais facultatiu, demandar que l'imatge o los imatges depausats sus Lutim sián suprimits aprèp lor primièr afichatge (o telecargament) o al cap d'un delai causit entre las prepausadas."
@@ -501,10 +465,7 @@ msgstr "e sus"
msgid "core developer"
msgstr "desvolopaire màger"
#: lib/Lutim/Command/cron/stats.pm:108
#: lib/Lutim/Command/cron/stats.pm:125
#: lib/Lutim/Command/cron/stats.pm:97
#: themes/default/templates/index.html.ep:3
#: lib/Lutim.pm:190 lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
msgid "no time limit"
msgstr "Pas cap de limitacion de durada"
+17
View File
@@ -66,3 +66,20 @@ label.always-encrypt {
.adjust-addon .btn {
width: 43px;
}
#tipeee-img {
margin-top: -4px;
}
#liberapay-img {
height: 21px;
line-height: 21px;
margin-top: -5.33333px;
}
.pasteZone {
position: absolute;
top: 0;
left: -100px;
z-index: -999;
height: 10000vh;
width: 0;
display: hidden;
}
+5 -5
View File
@@ -1,10 +1,10 @@
@font-face {
font-family: 'markdown';
src:url('../font/markdown.eot?-6fnbp5');
src:url('../font/markdown.eot?#iefix-6fnbp5') format('embedded-opentype'),
url('../font/markdown.woff?-6fnbp5') format('woff'),
url('../font/markdown.ttf?-6fnbp5') format('truetype'),
url('../font/markdown.svg?-6fnbp5#markdown') format('svg');
src:url('../../font/markdown.eot?-6fnbp5');
src:url('../../font/markdown.eot?#iefix-6fnbp5') format('embedded-opentype'),
url('../../font/markdown.woff?-6fnbp5') format('woff'),
url('../../font/markdown.ttf?-6fnbp5') format('truetype'),
url('../../font/markdown.svg?-6fnbp5#markdown') format('svg');
font-weight: normal;
font-style: normal;
}
@@ -95,7 +95,7 @@
height:35px;
width:32px;
height:32px;
background-image:url('../images/loader_skype_trans.gif');
background-image:url('../../gallery/images/loader_skype_trans.gif');
background-repeat:no-repeat;
}
@@ -151,78 +151,78 @@
.ug-slider-preloader.ug-loader1{
width:30px;
height:30px;
background-image:url('../images/loader-white1.gif');
background-image:url('../../gallery/images/loader-white1.gif');
}
.ug-slider-preloader.ug-loader1.ug-loader-black{
background-image:url('../images/loader-black1.gif');
background-image:url('../../gallery/images/loader-black1.gif');
}
.ug-slider-preloader.ug-loader2{
width:32px;
height:32px;
background-image:url('../images/loader-white2.gif');
background-image:url('../../gallery/images/loader-white2.gif');
}
.ug-slider-preloader.ug-loader2.ug-loader-black{
background-image:url('../images/loader-black2.gif');
background-image:url('../../gallery/images/loader-black2.gif');
}
.ug-slider-preloader.ug-loader3{
width:38px;
height:38px;
background-image:url('../images/loader-white3.gif');
background-image:url('../../gallery/images/loader-white3.gif');
}
.ug-slider-preloader.ug-loader3.ug-loader-black{
background-image:url('../images/loader-black3.gif');
background-image:url('../../gallery/images/loader-black3.gif');
}
.ug-slider-preloader.ug-loader4{
width:32px;
height:32px;
background-image:url('../images/loader-white4.gif');
background-image:url('../../gallery/images/loader-white4.gif');
background-color:white;
}
.ug-slider-preloader.ug-loader4.ug-loader-black{
background-image:url('../images/loader-black4.gif');
background-image:url('../../gallery/images/loader-black4.gif');
}
.ug-slider-preloader.ug-loader5{
width:60px;
height:8px;
background-image:url('../images/loader-white5.gif');
background-image:url('../../gallery/images/loader-white5.gif');
background-color:white;
border:none;
border-radius:0px;
}
.ug-slider-preloader.ug-loader5.ug-loader-black{
background-image:url('../images/loader-black5.gif');
background-image:url('../../gallery/images/loader-black5.gif');
border:2px solid #000000;
}
.ug-slider-preloader.ug-loader6{
width:32px;
height:32px;
background-image:url('../images/loader-white6.gif');
background-image:url('../../gallery/images/loader-white6.gif');
}
.ug-slider-preloader.ug-loader6.ug-loader-black{
background-image:url('../images/loader-black6.gif');
background-image:url('../../gallery/images/loader-black6.gif');
}
.ug-slider-preloader.ug-loader7{
width:32px;
height:10px;
background-image:url('../images/loader-white7.gif');
background-image:url('../../gallery/images/loader-white7.gif');
border-width:3px;
border-radius:3px;
}
.ug-slider-preloader.ug-loader7.ug-loader-black{
background-image:url('../images/loader-black7.gif');
background-image:url('../../gallery/images/loader-black7.gif');
}
.ug-slider-preloader.ug-loader-black{
@@ -243,7 +243,7 @@
.ug-slider-wrapper .ug-button-videoplay.ug-type-square{
width:86px;
height:66px;
background-image:url('../images/play-button-square.png');
background-image:url('../../gallery/images/play-button-square.png');
background-position:0px -66px;
}
@@ -255,7 +255,7 @@
.ug-slider-wrapper .ug-button-videoplay.ug-type-round{
width:76px;
height:76px;
background-image:url('../images/play-button-round.png');
background-image:url('../../gallery/images/play-button-round.png');
opacity:0.9;
filter: alpha(opacity = 90);
transition: all 0.3s ease 0s !important;
@@ -275,7 +275,7 @@
position:absolute;
z-index:100;
background-color:#000000;
background-image:url('../images/loader-black1.gif');
background-image:url('../../gallery/images/loader-black1.gif');
background-repeat:no-repeat;
background-position:center center;
box-sizing:border-box;
@@ -286,7 +286,7 @@
width:100%;
height:100%;
background-color:#000000;
background-image:url('../images/loader-black1.gif');
background-image:url('../../gallery/images/loader-black1.gif');
background-repeat:no-repeat;
background-position:center center;
}
@@ -296,7 +296,7 @@
position:absolute;
height:64px;
width:64px;
background-image:url('../images/button-close.png');
background-image:url('../../gallery/images/button-close.png');
cursor:pointer;
z-index:1000;
}
@@ -372,15 +372,15 @@
}
.ug-thumb-wrapper.ug-thumb-generated .ug-thumb-loader-dark{
background-image:url('../images/loader.gif');
background-image:url('../../gallery/images/loader.gif');
}
.ug-thumb-wrapper.ug-thumb-generated .ug-thumb-loader-bright{
background-image:url('../images/loader_bright.gif');
background-image:url('../../gallery/images/loader_bright.gif');
}
.ug-thumb-wrapper.ug-thumb-generated .ug-thumb-error{
background-image:url('../images/not_loaded.png');
background-image:url('../../gallery/images/not_loaded.png');
}
.ug-thumb-wrapper.ug-thumb-generated img{
@@ -572,7 +572,7 @@ img.ug-sepia-effect{
background-color:#000000;
opacity: 0.3;
filter: alpha(opacity=30);
background-image:url('../images/cover-grid.png');
background-image:url('../../gallery/images/cover-grid.png');
}
@@ -695,15 +695,15 @@ img.ug-sepia-effect{
}
.ug-thumb-wrapper.ug-tile .ug-tile-icon.ug-icon-link{
background-image:url('../images/icon-link32.png');
background-image:url('../../gallery/images/icon-link32.png');
}
.ug-thumb-wrapper.ug-tile .ug-tile-icon.ug-icon-zoom{
background-image:url('../images/icon-zoom32.png');
background-image:url('../../gallery/images/icon-zoom32.png');
}
.ug-thumb-wrapper.ug-tile .ug-tile-icon.ug-icon-play{
background-image:url('../images/icon-play32.png');
background-image:url('../../gallery/images/icon-play32.png');
}
.ug-thumb-wrapper.ug-tile .ug-tile-icon:hover{
@@ -805,14 +805,14 @@ img.ug-sepia-effect{
width:50px;
height:55px;
background-repeat:no-repeat;
background-image:url('../images/lightbox-arrow-left.png');
background-image:url('../../gallery/images/lightbox-arrow-left.png');
background-position:0px 0px;
z-index:3;
cursor:pointer;
}
.ug-lightbox .ug-lightbox-arrow-right{
background-image:url('../images/lightbox-arrow-right.png');
background-image:url('../../gallery/images/lightbox-arrow-right.png');
}
.ug-lightbox .ug-lightbox-button-close{
@@ -820,7 +820,7 @@ img.ug-sepia-effect{
width:36px;
height:36px;
background-repeat:no-repeat;
background-image:url('../images/lightbox-icon-close.png');
background-image:url('../../gallery/images/lightbox-icon-close.png');
background-position:0px 0px;
z-index:4;
cursor:pointer;
@@ -830,7 +830,7 @@ img.ug-sepia-effect{
.ug-lightbox-compact .ug-lightbox-button-close{
width:45px;
height:41px;
background-image:url('../images/lightbox-icon-close-compact2.png');
background-image:url('../../gallery/images/lightbox-icon-close-compact2.png');
}
@@ -14,7 +14,7 @@
.ug-theme-default .ug-default-button-fullscreen{
position:absolute;
background-image:url('images/button_fullscreen.png');
background-image:url('../../gallery/themes/default/images/button_fullscreen.png');
width:53px;
height:50px;
cursor:pointer;
@@ -39,7 +39,7 @@
.ug-theme-default .ug-default-button-fullscreen-single{
position:absolute;
background-image:url('images/button_fullscreen_single.png');
background-image:url('../../gallery/themes/default/images/button_fullscreen_single.png');
width:52px;
height:50px;
cursor:pointer;
@@ -64,7 +64,7 @@
.ug-theme-default .ug-default-button-play{
position:absolute;
background-image:url('images/button_playpause.png');
background-image:url('../../gallery/themes/default/images/button_playpause.png');
width:51px;
height:50px;
cursor:pointer;
@@ -88,7 +88,7 @@
.ug-theme-default .ug-default-button-play-single{
position:absolute;
background-image:url('images/button_playpause_single.png');
background-image:url('../../gallery/themes/default/images/button_playpause_single.png');
width:50px;
height:50px;
cursor:pointer;
@@ -136,7 +136,7 @@
width:7px;
height:7px;
background-repeat:no-repeat;
background-image:url('images/arrow_down_up.png');
background-image:url('../../gallery/themes/default/images/arrow_down_up.png');
background-position: 0px 0px;
z-index:2;
}
+63
View File
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
viewBox="0 0 80 80"
version="1.1"
id="svg8"
sodipodi:docname="liberapay.svg"
inkscape:version="0.92.1 r15371">
<metadata
id="metadata14">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs12" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1048"
id="namedview10"
showgrid="false"
showguides="false"
inkscape:zoom="9.9101562"
inkscape:cx="18.658258"
inkscape:cy="42.342925"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="0"
inkscape:current-layer="svg8" />
<g
transform="translate(-78.37-208.06)"
fill="#1a171b"
id="g6"
style="fill:#428bca;fill-opacity:1">
<path
d="m104.28 271.1c-3.571 0-6.373-.466-8.41-1.396-2.037-.93-3.495-2.199-4.375-3.809-.88-1.609-1.308-3.457-1.282-5.544.025-2.086.313-4.311.868-6.675l9.579-40.05 11.69-1.81-10.484 43.44c-.202.905-.314 1.735-.339 2.489-.026.754.113 1.421.415 1.999.302.579.817 1.044 1.546 1.395.729.353 1.747.579 3.055.679l-2.263 9.278"
id="path2"
style="fill:#428bca;fill-opacity:1" />
<path
d="m146.52 246.14c0 3.671-.604 7.03-1.811 10.07-1.207 3.043-2.879 5.669-5.01 7.881-2.138 2.213-4.702 3.935-7.693 5.167-2.992 1.231-6.248 1.848-9.767 1.848-1.71 0-3.42-.151-5.129-.453l-3.394 13.651h-11.162l12.52-52.19c2.01-.603 4.311-1.143 6.901-1.622 2.589-.477 5.393-.716 8.41-.716 2.815 0 5.242.428 7.278 1.282 2.037.855 3.708 2.024 5.02 3.507 1.307 1.484 2.274 3.219 2.904 5.205.627 1.987.942 4.11.942 6.373m-27.378 15.461c.854.202 1.91.302 3.167.302 1.961 0 3.746-.364 5.355-1.094 1.609-.728 2.979-1.747 4.111-3.055 1.131-1.307 2.01-2.877 2.64-4.714.628-1.835.943-3.858.943-6.071 0-2.161-.479-3.998-1.433-5.506-.956-1.508-2.615-2.263-4.978-2.263-1.61 0-3.118.151-4.525.453l-5.28 21.948"
id="path4"
style="fill:#428bca;fill-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

+17
View File
@@ -24,6 +24,22 @@ function delItem(short) {
});
localStorage.setItem('images', JSON.stringify(files));
}
function updateItem(short, limit, del_at_view) {
var files = localStorage.getItem('images');
if (files === null) {
files = new Array();
} else {
files = JSON.parse(files);
}
$(files).each(function(index) {
if (files[index].real_short === short) {
files[index].del_at_view = del_at_view;;
files[index].limit = limit;
return false;
}
});
localStorage.setItem('images', JSON.stringify(files));
}
function share(url) {
new MozActivity({
name: 'share',
@@ -84,6 +100,7 @@ $('document').ready(function() {
var deleteday = ($('#delete-day').prop('checked')) ? 1 : 0;
bindddz(firstview, deleteday);
initPaste();
$('#file-url-button').on('click', upload_url);
$('#lutim-file-url').keydown( function(e) {
-37
View File
@@ -12,40 +12,3 @@
<div id="gallery" style="display:none;">
</div>
</div>
%= stylesheet '/gallery/css/unite-gallery.css'
%= stylesheet '/gallery/themes/default/ug-theme-default.css'
%= javascript '/gallery/js/unitegallery.js'
%= javascript '/gallery/themes/tiles/ug-theme-tiles.js'
%= javascript '/js/jszip.min.js'
%= javascript '/js/FileSaver.min.js'
%= javascript begin
$(document).ready(function() {
var absUrl = '<%= url_for('/') %>';
var key = window.location.hash.substring(1); // Get key
// First, strip everything after the equal sign (=) which signals end of base64 string.
i = key.indexOf('='); if (i>-1) { key = key.substring(0,i+1); }
// If the equal sign was not present, some parameters may remain:
i = key.indexOf('&'); if (i>-1) { key = key.substring(0,i); }
var keys = key.split(',');
$('#download-all').attr('href', $('#download-all').attr('href')+keys.join('&i='));
var items = [];
keys.forEach(function(element, index, array) {
if (!element.match('xcf')) {
$('#gallery').append(
[
'<img src="', absUrl+element, '" data-image="', absUrl+element, '" data-description="" alt="">'
].join('')
);
}
});
var api = $("#gallery").unitegallery({
gallery_theme: "tiles",
tiles_max_columns: 4,
lightbox_overlay_color: "#DDD"
});
});
% end
-3
View File
@@ -207,6 +207,3 @@
</form>
</div>
<!-- /D&D Zone -->
%= include 'partial/common', format => 'js'
%= include 'partial/lutim', format => 'js', d => \%d
@@ -3,7 +3,6 @@
% my $twitter_url = 'https://twitter.com/share';
% my $url = url_for('/')->to_abs();
% $twitter_url .= '?url='.url_escape("$url")
% .'&via=framasky'
% .'&text=Check out this %23Lutim instance! ';
<!DOCTYPE html>
<html>
@@ -28,6 +27,12 @@
%= asset 'about.css'
% } else {
%= asset 'index.css'
% }
% if (current_route 'gallery') {
%= asset 'gallery.css'
% }
% if (!(current_route 'about')) {
%= javascript '/js/jquery-2.1.0.min.js'
% }
</head>
<body>
@@ -48,10 +53,12 @@
<%= l('License:') %> <%= link_to 'https://www.gnu.org/licenses/agpl-3.0.html' => begin %>AGPL<% end %> — 
<%= link_to url_for('about') => begin %><%= l('Informations') %><% end %> — 
<%= link_to 'https://framagit.org/luc/lutim' => (title => l('Fork me!')) => begin %><i class="lead icon icon-git"></i><% end %> 
<%= link_to $twitter_url => (title => l('Share on Twitter')) => begin %><i class="lead icon icon-twitter"></i><% end %> 
<%= link_to 'https://flattr.com/submit/auto?user_id=_SKy_&url='.$url.'&title=Lutim&category=software' => (title => 'Flattr this') => begin %><i class="lead icon icon-flattr"></i><% end %> 
<%= link_to $twitter_url => (title => l('Share on Twitter')) => begin %><i class="lead icon icon-twitter"></i><% end %> 
<%= link_to 'https://tipeee.com/fiat-tux' => (title => l('Support the author on Tipeee')) => begin %><img id="tipeee-img" src="/img/tipeee-tip-btn.png" alt="<%= l('Tipeee button') %>"><% end %> 
<%= link_to 'https://liberapay.com/sky' => (title => l('Support the author on Liberapay')) => begin %><img id="liberapay-img" src="/img/liberapay.svg" alt="<%= l('Liberapay button') %>"><% end %> 
<%= link_to 'bitcoin:1JCEtmx9pyzWfitMQj2pKAk8GNgyix7RmA?label=lutim' => (title => 'Give Bitcoins') => begin %><i class="lead icon icon-bitcoin"></i><% end %> — 
<%= link_to url_for('myfiles') => begin %><%= l('My images') %><% end %> — 
<%= link_to url_for('stats') => begin %><%= l('Instance\'s statistics') %><% end %> — 
<a class="btn btn-default btn-xs" href="#" id="install-app"><img src="<%= url_for('/img/rocket.png') %>" alt="mozilla rocket logo"> <%= l('Install webapp') %></a>
</p>
</div>
@@ -66,18 +73,34 @@
<strong><%= stash('stop_upload') %></strong>
</div>
% }
<%= content %>
</div>
%= javascript begin
var manifestUrl = '<%== url_for('manifest.webapp')->to_abs() %>';
% end
% if (defined(config('piwik_img'))) {
<img src="<%== config('piwik_img') %>" style="border:0" alt="">
% }
% if (current_route 'stats') {
%= asset 'stats.js'
% } elsif (!(current_route 'about')) {
%= asset 'index.js'
% }
<%= content %>
</div>
% if (defined(config('piwik_img'))) {
<img src="<%== config('piwik_img') %>" style="border:0" alt="" />
% if (current_route 'index') {
%= javascript '/partial/common.js'
%= javascript '/partial/lutim.js'
% }
% if (current_route 'gallery') {
%= javascript '/gallery/js/unitegallery.js'
%= javascript '/gallery/themes/tiles/ug-theme-tiles.js'
%= javascript '/js/jszip.min.js'
%= javascript '/js/FileSaver.min.js'
%= javascript '/partial/gallery.js'
% }
% if (current_route 'myfiles') {
%= javascript '/partial/common.js'
%= javascript '/js/moment-with-locales.min.js'
%= javascript '/partial/myfiles.js'
% }
</body>
</html>
+37 -58
View File
@@ -6,10 +6,47 @@
<%= l('Only the images sent with this browser will be listed here. The informations are stored in localStorage: if you delete your localStorage data, you\'ll loose this informations.') %>
</p>
<div id="gallery-url" class="hidden row">
<form class="form col-sm-12">
<div class="form-group">
<label for="gallery-url-input"><%= l('Gallery link') %></label>
<div class="input-group">
<div class="input-group-addon">
<a id="gallery-url-link" href="#" target="_blank" title="<%= l('Gallery link') %>">
<span class="icon icon-picture"></span>
</a>
</div>
<input class="form-control" name="gallery-url-input" type="text" id="gallery-url-input" readonly></input>
<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon jsonly" title="<%= l('Copy to clipboard') %>">
<span class="icon icon-clipboard"></span>
</a>
</div>
</div>
</form>
</div>
<div id="zip-url" class="hidden row">
<form class="form col-sm-12">
<div class="form-group">
<label for="zip-url-input"><%= l('Download zip link') %></label>
<div class="input-group">
<div class="input-group-addon">
<a id="zip-url-link" href="#" target="_blank" title="<%= l('Download zip link') %>">
<span class="icon icon-file-archive"></span>
</a>
</div>
<input class="form-control" name="zip-url-input" type="text" id="zip-url-input" readonly></input>
<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon jsonly" title="<%= l('Copy to clipboard') %>">
<span class="icon icon-clipboard"></span>
</a>
</div>
</div>
</form>
</div>
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th class="text-center"></th>
<th class="text-center"><%= l('File name') %></th>
<th class="text-center"><%= l('View link') %></th>
<th class="text-center"><%= l('Counter') %></th>
@@ -25,61 +62,3 @@
</div>
<%= link_to url_for('/') => ( class => "btn btn-primary btn-lg" ) => begin %><%= l('Back to homepage') %><% end%>
%= include 'partial/common', format => 'js'
%= javascript begin
function populateFilesTable() {
var files = JSON.parse(localStorage.getItem('images'));
files.reverse();
files.forEach(function(element, index, array) {
var real_short = element.real_short;
var vlink = link(element.short+'.'+element.ext, '');
var del_view = (element.del_at_view) ? '<span class="icon icon-ok"></span>' : '<span class="icon icon-cancel"></span>';
var dlink = link(real_short, 'dl', element.token, false, true);
var limit = (element.limit === 0) ? '<%= l('No limit') %>' : moment.unix(element.limit * 86400 + element.created_at).locale(window.navigator.language).format('LLLL');
var created_at = moment.unix(element.created_at).locale(window.navigator.language).format('LLLL');
var tr = '<tr id="alert-'+real_short+'"><td>'
+element.filename
+'</td><td>'
+'<a href="'+vlink+'">'+vlink+'</a>'
+'</td><td id="count-'+real_short+'" class="text-center">'
+'</td><td class="text-center">'
+del_view
+'</td><td>'
+created_at
+'</td><td>'
+limit
+'</td><td>'
+'<a id="del-'+real_short+'" data-short="'+real_short+'" data-token="'+element.token+'" href="#">'+dlink+'</a>'
+'</td></tr>';
$('#myfiles').append(tr);
$('#del-'+real_short).on('click', delImage);
$.ajax({
url : '<%== url_for('counter') %>',
type : 'POST',
data : {
'short': real_short,
'token': element.token
},
success: function(data) {
if (data.success) {
if (data.enabled) {
$('#count-'+real_short).text(data.counter);
} else {
delItem(real_short);
$('#alert-'+real_short).remove();
}
} else {
alert(data.msg);
}
},
error: function() {
alert(element.filename+'<%= l(': Error while trying to get the counter.') %>');
}
});
});
}
% end
%= javascript '/js/moment-with-locales.min.js'
+155 -51
View File
@@ -1,55 +1,159 @@
% # vim:set sw=4 ts=4 sts=4 ft=javascript expandtab:
%= javascript begin
function delImage() {
var short = $(this).attr('data-short');
var token = $(this).attr('data-token');
$.ajax({
url: '<%= url_for('/') %>d/'+short+'/'+token,
method: 'GET',
data: {
format: 'json'
},
success: function(data) {
if (data.success) {
$('#alert-'+short).remove();
evaluateCopyAll();
delItem(short);
} else {
alert(data.msg);
}
},
error: function() {
},
complete: function() {
}
});
window.gallery_url = '<%= url_for('gallery')->to_abs %>#';
window.zip_url = '<%= url_for('zip')->to_abs %>?i=';
window.short_hash = {};
window.zip_hash = {};
function addToShortHash(short) {
window.short_hash[short] = 1;
console.debug(window.short_hash);
if (Object.keys(window.short_hash).length > 0) {
$('#gallery-url').removeClass('hidden');
$('#gallery-url-input').val(window.gallery_url+Object.keys(window.short_hash).join(','));
$('#gallery-url-link').attr('href', window.gallery_url+Object.keys(window.short_hash).join(','));
}
function link(url, dl, token, modify, only_url) {
if (token !== undefined) {
if (modify !== undefined && modify === true) {
return '<%== url_for('/m/')->to_abs() %>'+url+'/'+token;
}
var link = '<%== url_for('/')->to_abs() %>d/'+url+'/'+token;
if (only_url !== undefined && only_url === true) {
return link;
}
return [
'<label class="sr-only" for="link-del-', url, '"><%= l('Deletion link') %></label>',
'<div class="input-group input-group-sm">',
'<div class="input-group-btn">',
'<a class="btn btn-default text-danger" href="#" title="<%= l('Deletion link') %>" id="del-', url, '" data-short="', url, '" data-token="', token, '">',
'<span class="icon icon-trash"></span> ',
'</a>',
'</div>',
'<input type="text" class="form-control" id="link-del-', url, '" value="', link, '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>'
].join('');
} else if (dl !== '') {
url = url+'?'+dl;
}
function rmFromShortHash(short) {
delete window.short_hash[short];
$('#gallery-url-input').val(window.gallery_url+Object.keys(window.short_hash).join(','));
$('#gallery-url-link').attr('href', window.gallery_url+Object.keys(window.short_hash).join(','));
if (Object.keys(window.short_hash).length === 0) {
$('#gallery-url').addClass('hidden');
}
}
function addToZipHash(short) {
window.zip_hash[short] = 1;
if (Object.keys(window.zip_hash).length > 0) {
$('#zip-url').removeClass('hidden');
$('#zip-url-input').val(window.zip_url+Object.keys(window.zip_hash).join('&i='));
$('#zip-url-link').attr('href', window.zip_url+Object.keys(window.zip_hash).join('&i='));
}
}
function rmFromZipHash(short) {
delete window.zip_hash[short];
$('#zip-url-input').val(window.zip_url+Object.keys(window.zip_hash).join('&i='));
$('#zip-url-link').attr('href', window.zip_url+Object.keys(window.zip_hash).join('&i='));
if (Object.keys(window.zip_hash).length === 0) {
$('#zip-url').addClass('hidden');
}
}
/* Stolen from https://github.com/mozilla-services/push-dev-dashboard/blob/3ad4de737380d0842f40c82301d1f748c1b20f2b/push/static/js/validation.js */
function createNode(text) {
var node = document.createElement('pre');
node.style.width = '1px';
node.style.height = '1px';
node.style.position = 'fixed';
node.style.top = '5px';
node.textContent = text;
return node;
}
function copyNode(node) {
var selection = getSelection();
selection.removeAllRanges();
var range = document.createRange();
range.selectNodeContents(node);
selection.addRange(range);
var success = document.execCommand('copy');
selection.removeAllRanges();
return success;
}
function copyText(text) {
var node = createNode(text);
document.body.appendChild(node);
var success = copyNode(node);
document.body.removeChild(node);
return success;
}
function copyInput(node) {
node.select();
var success = document.execCommand('copy');
getSelection().removeAllRanges();
return success;
}
function copyToClipboard(el) {
el = el.siblings('input');
try {
var successful = copyInput(el);
var msg = successful ? 'successful' : 'unsuccessful';
console.debug('Copying text command was ' + msg);
if (!successful) {
throw new Error('Copying text command was ' + msg);
}
return '<%== url_for('/')->to_abs() %>'+url;
} catch (err) {
prompt('<%= l('Hit Ctrl+C, then Enter to copy the short link') %>', el.val());
}
% end
}
function copyAllToClipboard() {
var text = new Array();
$('.view-link-input').each(function(index) {
text.push($(this).val());
});
try {
var successful = copyText(text.join("\n"));
var msg = successful ? 'successful' : 'unsuccessful';
console.debug('Copying text command was ' + msg);
if (!successful) {
throw new Error('Copying text command was ' + msg);
}
} catch (err) {
prompt('<%= l('Hit Ctrl+C, then Enter to copy the short link') %>', text.join(" "));
}
}
function delImage() {
var short = $(this).attr('data-short');
var token = $(this).attr('data-token');
$.ajax({
url: '<%= url_for('/') %>d/'+short+'/'+token,
method: 'GET',
data: {
format: 'json'
},
success: function(data) {
if (data.success) {
$('#alert-'+short).remove();
evaluateCopyAll();
delItem(short);
} else {
alert(data.msg);
}
},
error: function() {
},
complete: function() {
}
});
}
function link(url, dl, token, modify, only_url) {
if (token !== undefined) {
if (modify !== undefined && modify === true) {
return '<%== url_for('/m/')->to_abs() %>'+url+'/'+token;
}
var link = '<%== url_for('/')->to_abs() %>d/'+url+'/'+token;
if (only_url !== undefined && only_url === true) {
return link;
}
return [
'<label class="sr-only" for="link-del-', url, '"><%= l('Deletion link') %></label>',
'<div class="input-group input-group-sm">',
'<div class="input-group-btn">',
'<a class="btn btn-default text-danger" href="#" title="<%= l('Deletion link') %>" id="del-', url, '" data-short="', url, '" data-token="', token, '">',
'<span class="icon icon-trash"></span> ',
'</a>',
'</div>',
'<input type="text" class="form-control" id="link-del-', url, '" value="', link, '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>'
].join('');
} else if (dl !== '') {
url = url+'?'+dl;
}
return '<%== url_for('/')->to_abs() %>'+url;
}
@@ -0,0 +1,30 @@
% # vim:set sw=4 ts=4 sts=4 ft=javascript expandtab:
$(document).ready(function() {
var absUrl = '<%= url_for('/') %>';
var key = window.location.hash.substring(1); // Get key
// First, strip everything after the equal sign (=) which signals end of base64 string.
i = key.indexOf('='); if (i>-1) { key = key.substring(0,i+1); }
// If the equal sign was not present, some parameters may remain:
i = key.indexOf('&'); if (i>-1) { key = key.substring(0,i); }
var keys = key.split(',');
$('#download-all').attr('href', $('#download-all').attr('href')+keys.join('&i='));
var items = [];
keys.forEach(function(element, index, array) {
if (!element.match('xcf')) {
$('#gallery').append(
[
'<img src="', absUrl+element, '" data-image="', absUrl+element, '" data-description="" alt="">'
].join('')
);
}
});
var api = $("#gallery").unitegallery({
gallery_theme: "tiles",
tiles_max_columns: 4,
lightbox_overlay_color: "#DDD"
});
});
+417 -403
View File
@@ -1,454 +1,468 @@
% # vim:set sw=4 ts=4 sts=4 ft=javascript expandtab:
%= javascript begin
window.gallery_url = '<%= url_for('gallery')->to_abs %>#';
window.zip_url = '<%= url_for('zip')->to_abs %>?i=';
window.short_hash = {};
window.zip_hash = {};
function addToShortHash(short) {
window.short_hash[short] = 1;
console.debug(window.short_hash);
if (Object.keys(window.short_hash).length > 0) {
$('#gallery-url').removeClass('hidden');
$('#gallery-url-input').val(window.gallery_url+Object.keys(window.short_hash).join(','));
$('#gallery-url-link').attr('href', window.gallery_url+Object.keys(window.short_hash).join(','));
}
function selectInput() {
$(this).select();
}
function cleanName(name, empty) {
if (empty !== undefined && empty !== null && empty) {
return name.replace(/&(l|g)t;/g, '').replace(/"/g, '\'');
} else {
return name.replace(/</g, '&lt;').replace(/>/g, '&gt;');
}
function rmFromShortHash(short) {
delete window.short_hash[short];
$('#gallery-url-input').val(window.gallery_url+Object.keys(window.short_hash).join(','));
$('#gallery-url-link').attr('href', window.gallery_url+Object.keys(window.short_hash).join(','));
if (Object.keys(window.short_hash).length === 0) {
$('#gallery-url').addClass('hidden');
}
}
function addToZipHash(short) {
window.zip_hash[short] = 1;
if (Object.keys(window.zip_hash).length > 0) {
$('#zip-url').removeClass('hidden');
$('#zip-url-input').val(window.zip_url+Object.keys(window.zip_hash).join('&i='));
$('#zip-url-link').attr('href', window.zip_url+Object.keys(window.zip_hash).join('&i='));
}
}
function rmFromZipHash(short) {
delete window.zip_hash[short];
$('#zip-url-input').val(window.zip_url+Object.keys(window.zip_hash).join('&i='));
$('#zip-url-link').attr('href', window.zip_url+Object.keys(window.zip_hash).join('&i='));
if (Object.keys(window.zip_hash).length === 0) {
$('#zip-url').addClass('hidden');
}
}
function selectInput() {
$(this).select();
}
function tw_url(url) {
var btn = [
'<a title="<%= l('Tweet it!') %>" target="_blank" href="https://twitter.com/share?url=<%== url_for('/')->to_abs() %>', url, '?t" class="btn btn-default">',
'<span class="icon icon-twitter"></span>',
}
function tw_url(url) {
var btn = [
'<a title="<%= l('Tweet it!') %>" target="_blank" href="https://twitter.com/share?url=<%== url_for('/')->to_abs() %>', url, '?t" class="btn btn-default">',
'<span class="icon icon-twitter"></span>',
'</a>'
].join('');
if (navigator.mozSetMessageHandler !== undefined) {
btn = btn+[
'<a title="<%= l('Share it!') %>" target="_blank" href="" onclick="share(\'<%== url_for('/')->to_abs() %>', url, '?t\');return false;">',
'<span class="icon icon-share"></span>',
'</a>'
].join('');
if (navigator.mozSetMessageHandler !== undefined) {
btn = btn+[
'<a title="<%= l('Share it!') %>" target="_blank" href="" onclick="share(\'<%== url_for('/')->to_abs() %>', url, '?t\');return false;">',
'<span class="icon icon-share"></span>',
'</a>'
].join('');
}
return btn
}
function modify(url, short) {
var limit = $('#day-'+short).val();
var del_at_view = ($('#first-view-'+short).prop('checked')) ? 1 : 0;
$.ajax({
url : url,
type : 'POST',
data : {
'image_url' : '<%== url_for('/')->to_abs() %>'+short,
'format' : 'json',
'delete-day' : limit,
'first-view' : del_at_view
},
success: function(data) {
updateItem(short, limit, del_at_view);
alert(data.msg);
},
error: function() {
alert('<%= l('Error while trying to modify the image.') %>');
}
return btn
}
function modify(url, short) {
$.ajax({
url : url,
type : 'POST',
data : {
'image_url' : '<%== url_for('/')->to_abs() %>'+short,
'format' : 'json',
'first-view' : ($('#first-view-'+short).prop('checked')) ? 1 : 0,
'delete-day' : $('#day-'+short).val()
},
success: function(data) {
alert(data.msg);
},
error: function() {
alert('<%= l('Error while trying to modify the image.') %>');
}
});
}
});
}
/* Stolen from https://github.com/mozilla-services/push-dev-dashboard/blob/3ad4de737380d0842f40c82301d1f748c1b20f2b/push/static/js/validation.js */
function createNode(text) {
var node = document.createElement('pre');
node.style.width = '1px';
node.style.height = '1px';
node.style.position = 'fixed';
node.style.top = '5px';
node.textContent = text;
return node;
}
function copyNode(node) {
var selection = getSelection();
selection.removeAllRanges();
var range = document.createRange();
range.selectNodeContents(node);
selection.addRange(range);
var success = document.execCommand('copy');
selection.removeAllRanges();
return success;
}
function copyText(text) {
var node = createNode(text);
document.body.appendChild(node);
var success = copyNode(node);
document.body.removeChild(node);
return success;
}
function copyInput(node) {
node.select();
var success = document.execCommand('copy');
getSelection().removeAllRanges();
return success;
}
function copyToClipboard(el) {
el = el.siblings('input');
try {
var successful = copyInput(el);
var msg = successful ? 'successful' : 'unsuccessful';
console.debug('Copying text command was ' + msg);
if (!successful) {
throw new Error('Copying text command was ' + msg);
}
} catch (err) {
prompt('<%= l('Hit Ctrl+C, then Enter to copy the short link') %>', el.val());
}
}
function copyAllToClipboard() {
var text = new Array();
$('.view-link-input').each(function(index) {
text.push($(this).val());
});
try {
var successful = copyText(text.join("\n"));
var msg = successful ? 'successful' : 'unsuccessful';
console.debug('Copying text command was ' + msg);
if (!successful) {
throw new Error('Copying text command was ' + msg);
}
} catch (err) {
prompt('<%= l('Hit Ctrl+C, then Enter to copy the short link') %>', text.join(" "));
}
}
function buildMessage(success, msg) {
if(success) {
var s_url = link([msg.short, '.', msg.ext].join(''), '');
var thumb = (msg.thumb !== null) ? [
'<div class="col-sm-1">',
'<a href="', s_url, '" target="_blank">',
'<img class="thumbnail img-responsive" alt="', msg.filename, ' thumbnail" src="', msg.thumb, '">',
'</a>',
'</div>'
].join('') : ''
return [
'<div class="alert alert-success" id="alert-', msg.real_short, '">',
'<button type="button" class="close" data-dismiss="alert" aria-hidden="true" onclick="rmFromShortHash(\'', msg.short, '.', msg.ext, '\');rmFromZipHash(\'', msg.short, '\');">&times;</button>',
'<div class="row">', thumb,
'<div class="col-sm-11">',
'<h4>',
'<a href="', s_url, '" target="_blank">',
msg.filename,
'</a>',
'</h4>',
'<form class="form">',
'<div class="form-group">',
'<label class="sr-only" for="view', msg.real_short, '"><%= l('View link') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-btn adjust-addon">',
'<a href="', s_url, '" target="_blank" class="btn btn-default">',
'<span class="icon icon-eye" title=" <%= l('View link') %>"></span>',
'</a>',
'</div>',
'<input type="text" class="form-control view-link-input" id="view', msg.real_short, '" value="', s_url, '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
function buildMessage(success, msg) {
if(success) {
var s_url = link([msg.short, '.', msg.ext].join(''), '');
var thumb = (msg.thumb !== null) ? [
'<div class="col-sm-1">',
'<a href="', s_url, '" target="_blank">',
'<img class="thumbnail img-responsive" alt="', cleanName(msg.filename, true), ' thumbnail" src="', msg.thumb, '">',
'</a>',
'</div>'
].join('') : ''
return [
'<div class="alert alert-success" id="alert-', msg.real_short, '">',
'<button type="button" class="close" data-dismiss="alert" aria-hidden="true" onclick="rmFromShortHash(\'', msg.short, '.', msg.ext, '\');rmFromZipHash(\'', msg.short, '\');">&times;</button>',
'<div class="row">', thumb,
'<div class="col-sm-11">',
'<h4>',
'<a href="', s_url, '" target="_blank">',
msg.filename,
'</a>',
'</h4>',
'<form class="form">',
'<div class="form-group">',
'<label class="sr-only" for="view', msg.real_short, '"><%= l('View link') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-btn adjust-addon">',
'<a href="', s_url, '" target="_blank" class="btn btn-default">',
'<span class="icon icon-eye" title=" <%= l('View link') %>"></span>',
'</a>',
'</div>',
'<input type="text" class="form-control view-link-input" id="view', msg.real_short, '" value="', s_url, '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>',
'<div class="form-group">',
'<label class="sr-only" for="markdown', msg.real_short, '"><%= l('Markdown syntax') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-addon adjust-addon">',
'<span class="markdown-mark-solid" title="<%= l('Markdown syntax') %>"></span>',
'</div>',
'<input type="text" class="form-control" id="markdown', msg.real_short, '" value="![](', link(msg.short, ''), ')" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</div>',
'<div class="form-group">',
'<label class="sr-only" for="markdown', msg.real_short, '"><%= l('Markdown syntax') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-addon adjust-addon">',
'<span class="markdown-mark-solid" title="<%= l('Markdown syntax') %>"></span>',
'</div>',
'<input type="text" class="form-control" id="markdown', msg.real_short, '" value="![](', link(msg.short, ''), ')" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>',
'</div>',
'<div class="form-group">',
'<label class="sr-only" for="download', msg.real_short, '"><%= l('Download link') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-btn adjust-addon">',
'<a href="', link(msg.short, 'dl'), '" class="btn btn-default">',
'<span class="icon icon-download" title="<%= l('Download link') %>"></span>',
'</a>',
'</div>',
'<input type="text" class="form-control" id="download', msg.real_short, '" value="', link(msg.short, 'dl'), '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>',
'<div class="form-group">',
'<label class="sr-only" for="download', msg.real_short, '"><%= l('Download link') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-btn adjust-addon">',
'<a href="', link(msg.short, 'dl'), '" class="btn btn-default">',
'<span class="icon icon-download" title="<%= l('Download link') %>"></span>',
'</a>',
'</div>',
'<input type="text" class="form-control" id="download', msg.real_short, '" value="', link(msg.short, 'dl'), '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</div>',
'<div class="form-group">',
'<label class="sr-only" for="share', msg.real_short, '"><%= l('Link for share on social networks') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-btn adjust-addon">',
'<a href="', link(msg.short, 't'), '" target="_blank" class="btn btn-default">',
'<span class="icon icon-share" title="<%= l('Link for share on social networks') %>"></span>',
'</a>',
tw_url(msg.short),
'</div>',
'<input type="text" class="form-control" id="share', msg.real_short, '" value="', link(msg.short, 't'), '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>',
'<div class="form-group">',
'<label class="sr-only" for="share', msg.real_short, '"><%= l('Link for share on social networks') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-btn adjust-addon">',
'<a href="', link(msg.short, 't'), '" target="_blank" class="btn btn-default">',
'<span class="icon icon-share" title="<%= l('Link for share on social networks') %>"></span>',
'</a>',
tw_url(msg.short),
'</div>',
'<input type="text" class="form-control" id="share', msg.real_short, '" value="', link(msg.short, 't'), '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>',
'</div>',
'<div class="form-group">',
'<div class="input-group col-sm-6 col-xs-12">',
'<span class="form-control-static">', link(msg.real_short, '', msg.token), '</span>',
'</div>',
'<div class="form-group">',
'<div class="input-group col-sm-6 col-xs-12">',
'<span class="form-control-static">', link(msg.real_short, '', msg.token), '</span>',
'</div>',
'</div>',
'</form>',
'</div>',
'</div>',
'</form>',
'</div>',
'<div class="row">',
'<form class="form col-sm-11 col-sm-offset-1" role="form" method="POST" action="', link(msg.real_short, '', msg.token, true), '">',
'<div class="form-group form-inline">',
'<select id="day-', msg.real_short, '" name="delete-day" class="form-control">',
'</div>',
'<div class="row">',
'<form class="form col-sm-11 col-sm-offset-1" role="form" method="POST" action="', link(msg.real_short, '', msg.token, true), '">',
'<div class="form-group form-inline">',
'<select id="day-', msg.real_short, '" name="delete-day" class="form-control">',
% for my $delay (qw/0 1 7 30 365/) {
% my $text = ($delay == 7 || $delay == 30) ? l('%1 days', $delay) : $d->{'delay_'.$delay};
% if (config('max_delay')) {
% if ($delay) {
% if ($delay < config('max_delay')) {
'<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>',
'<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>',
% } elsif ($delay == config('max_delay')) {
'<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>',
'<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>',
% last;
% } else {
% my $text = ($delay == 1) ? l('24 hours') : l('%1 days', $delay);
'<option value="<%= config('max_delay') %>" <%== is_selected(config('max_delay')) %>><%= l('%1 days', config('max_delay')) %></option>',
'<option value="<%= config('max_delay') %>" <%== is_selected(config('max_delay')) %>><%= l('%1 days', config('max_delay')) %></option>',
% last;
% }
% }
% } else {
'<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>',
'<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>',
% }
% }
'</select>&nbsp;',
'<div class="checkbox">',
'<label>',
'<input id="first-view-', msg.real_short, '" type="checkbox" name="first-view"> <%= l('Delete at first view?') %>',
'</label>',
'</div>&nbsp;',
'<a href="#" onclick="modify(\'', link(msg.real_short, '', msg.token, true), '\', \'', msg.real_short, '\');return false;" class="btn btn-sm btn-default btn-primary">',
'<%= l('Let\'s go!') %>',
'</a>',
'</div>',
'</form>',
'</div>',
'</div>'
].join('');
} else {
return [
'<div class="alert alert-danger">',
'<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>',
'<strong><%= l('Something bad happened') %></strong><br>',
msg.filename,
'<br>',
msg.msg,
'</div>'
].join('');
}
}
function bindddz(firstview, deleteday) {
$('#drag-and-drop-zone').dmUploader({
url: '<%== url_for('/') %>',
dataType: 'json',
allowedTypes: 'image/*',
maxFileSize: <%= $max_file_size %>,
onNewFile: function(id, file){
$('.messages').append([
'<div id="', id, '-div">',
file.name, '<br>',
'<div class="progress">',
'<div id="', id, '"class="progress-bar progress-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">',
'<span id="', id, '-text" class="pull-left" style="padding-left: 10px;"> 0%</span>',
'</div>',
'</select>&nbsp;',
'<div class="checkbox">',
'<label>',
'<input id="first-view-', msg.real_short, '" type="checkbox" name="first-view"> <%= l('Delete at first view?') %>',
'</label>',
'</div>&nbsp;',
'<a href="#" onclick="modify(\'', link(msg.real_short, '', msg.token, true), '\', \'', msg.real_short, '\');return false;" class="btn btn-sm btn-default btn-primary">',
'<%= l('Let\'s go!') %>',
'</a>',
'</div>',
'</div>'
].join(''));
},
onUploadProgress: function(id, percent){
var percentStr = ' '+percent+'%';
$('#'+id).prop('aria-valuenow', percent);
$('#'+id).prop('style', 'width: '+percent+'%;');
$('#'+id+'-text').html(percentStr);
},
onUploadSuccess: function(id, data){
$('#'+id+'-div').remove();
if ($('#copy-all').length === 0 && data.success) {
$('.messages').prepend(
[
'<div class="col-xs-12 col-sm-11 col-sm-offset-1">',
'<a id="copy-all" href="#" class="btn btn-info" onClick="event.preventDefault();copyAllToClipboard();">',
'<%= l('Copy all view links to clipboard') %>',
'</a>',
'</div>'
].join('')
);
}
$('.messages').append(buildMessage(data.success, data.msg));
$('#del-'+data.msg.real_short).on('click', delImage);
if (data.success) {
addToShortHash(data.msg.short+'.'+data.msg.ext);
addToZipHash(data.msg.short);
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
$('input[type=\'text\']').unbind("click", selectInput);
$('input[type=\'text\']').on("click", selectInput);
addItem(data.msg);
}
},
onUploadError: function(id, message){
$('.messages').append(buildMessage(false, ''));
},
onFileSizeError: function(file){
$('.messages').append(buildMessage(false, { filename: file.name, msg: '<%= l('The file exceed the size limit (%1)', $max_file_size) %>'}));
}
});
}
function upload_url() {
var val = $('#lutim-file-url').val();
if (val !== undefined && val !== '') {
$('#lutim-file-url').prop('disabled', 'disabled');
$('.hidden-spin').css('display', 'block');
$.ajax({
url : '<%== url_for('/') %>',
type : 'POST',
data : {
'lutim-file-url' : val,
'format' : 'json',
'first-view' : ($('#first-view').prop('checked')) ? 1 : 0,
'crypt' : ($('#crypt').prop('checked')) ? 1 : 0,
'delete-day' : $('#delete-day').val()
},
success: function(data) {
$('.messages').append(buildMessage(data.success, data.msg));
if (data.success) {
if ($('#copy-all').length === 0) {
$('.messages').prepend([
'<div class="col-xs-12 col-sm-11 col-sm-offset-1">',
'<a id="copy-all" href="#" class="btn btn-info" onClick="event.preventDefault();copyAllToClipboard();">',
'<%= l('Copy all view links to clipboard') %>',
'</a>',
'</div>'
].join(''));
}
$('#lutim-file-url').val('');
addToShortHash(data.msg.short+'.'+data.msg.ext);
addToZipHash(data.msg.short);
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
addItem(data.msg);
}
},
error: function() {
$('.messages').append(buildMessage(false, ''));
},
complete: function() {
$('#lutim-file-url').prop('disabled', '');
$('.hidden-spin').css('display', 'none');
}
});
}
}
function fileUpload(file) {
var fd = new FormData();
fd.append('file', file);
fd.append('format', 'json');
fd.append('first-view', ($('#first-view').prop('checked')) ? 1 : 0);
fd.append('crypt', ($('#crypt').prop('checked')) ? 1 : 0);
fd.append('delete-day', ($('#delete-day').val()));
$('.messages').append([
'<div id="1-div">', file.name, '<br>',
'<div class="progress">',
'<div id="1"class="progress-bar progress-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">',
'<span id="1-text" class="pull-left" style="padding-left: 10px;"> 0%</span>',
'</div>',
'</form>',
'</div>',
'</div>'
].join(''));
// Ajax Submit
$.ajax({
url: '<%== url_for('/') %>',
type: 'POST',
dataType: 'json',
data: fd,
cache: false,
contentType: false,
processData: false,
forceSync: false,
xhr: function(){
var xhrobj = $.ajaxSettings.xhr();
if(xhrobj.upload){
xhrobj.upload.addEventListener('progress', function(event) {
var percent = 0;
var position = event.loaded || event.position;
var total = event.total || e.totalSize;
if(event.lengthComputable){
percent = Math.ceil(position / total * 100);
}
var percentStr = ' '+percent+'%';
$('#1').prop('aria-valuenow', percent);
$('#1').prop('style', 'width: '+percent+'%;');
$('#1-text').html(percentStr);
}, false);
}
return xhrobj;
},
success: function (data, message, xhr){
$('#1-div').remove();
if ($('#copy-all').length === 0 && data.success) {
$('.messages').prepend([
].join('');
} else {
return [
'<div class="alert alert-danger">',
'<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>',
'<strong><%= l('Something bad happened') %></strong><br>',
msg.filename,
'<br>',
msg.msg,
'</div>'
].join('');
}
}
function bindddz(firstview, deleteday) {
$('#drag-and-drop-zone').dmUploader({
url: '<%== url_for('/') %>',
dataType: 'json',
allowedTypes: 'image/*',
maxFileSize: <%= config('max_file_size') %>,
onNewFile: function(id, file){
$('.messages').append([
'<div id="', id, '-div">',
cleanName(file.name), '<br>',
'<div class="progress">',
'<div id="', id, '"class="progress-bar progress-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">',
'<span id="', id, '-text" class="pull-left" style="padding-left: 10px;"> 0%</span>',
'</div>',
'</div>',
'</div>'
].join(''));
},
onUploadProgress: function(id, percent){
var percentStr = ' '+percent+'%';
$('#'+id).prop('aria-valuenow', percent);
$('#'+id).prop('style', 'width: '+percent+'%;');
$('#'+id+'-text').html(percentStr);
},
onUploadSuccess: function(id, data){
data.msg.filename = cleanName(data.msg.filename);
$('#'+id+'-div').remove();
if ($('#copy-all').length === 0 && data.success) {
$('.messages').prepend(
[
'<div class="col-xs-12 col-sm-11 col-sm-offset-1">',
'<a id="copy-all" href="#" class="btn btn-info" onClick="event.preventDefault();copyAllToClipboard();">',
'<%= l('Copy all view links to clipboard') %>',
'</a>',
'</div>'
].join(''));
}
].join('')
);
}
$('.messages').append(buildMessage(data.success, data.msg));
$('#del-'+data.msg.real_short).on('click', function() {
rmFromShortHash(data.msg.short+'.'+data.msg.ext)
rmFromZipHash(data.msg.short);
});
$('#del-'+data.msg.real_short).on('click', delImage);
if (data.success) {
addToShortHash(data.msg.short+'.'+data.msg.ext);
addToZipHash(data.msg.short);
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
$('input[type=\'text\']').unbind("click", selectInput);
$('input[type=\'text\']').on("click", selectInput);
addItem(data.msg);
}
},
onUploadError: function(id, message){
$('.messages').append(buildMessage(false, ''));
},
onFileSizeError: function(file){
$('.messages').append(buildMessage(false, { filename: file.name, msg: '<%= l('The file exceed the size limit (%1)', config('max_file_size')) %>'}));
}
});
}
function upload_url() {
var val = $('#lutim-file-url').val();
if (val !== undefined && val !== '') {
$('#lutim-file-url').prop('disabled', 'disabled');
$('.hidden-spin').css('display', 'block');
$.ajax({
url : '<%== url_for('/') %>',
type : 'POST',
data : {
'lutim-file-url' : val,
'format' : 'json',
'first-view' : ($('#first-view').prop('checked')) ? 1 : 0,
'crypt' : ($('#crypt').prop('checked')) ? 1 : 0,
'delete-day' : $('#delete-day').val()
},
success: function(data) {
data.msg.filename = cleanName(data.msg.filename);
$('.messages').append(buildMessage(data.success, data.msg));
if (data.success) {
if ($('#copy-all').length === 0) {
$('.messages').prepend([
'<div class="col-xs-12 col-sm-11 col-sm-offset-1">',
'<a id="copy-all" href="#" class="btn btn-info" onClick="event.preventDefault();copyAllToClipboard();">',
'<%= l('Copy all view links to clipboard') %>',
'</a>',
'</div>'
].join(''));
}
$('#lutim-file-url').val('');
addToShortHash(data.msg.short+'.'+data.msg.ext);
addToZipHash(data.msg.short);
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
addItem(data.msg);
}
},
error: function (xhr, status, errMsg){
error: function() {
$('.messages').append(buildMessage(false, ''));
},
complete: function() {
$('#lutim-file-url').prop('disabled', '');
$('.hidden-spin').css('display', 'none');
}
});
}
% end
}
function fileUpload(file) {
var fd = new FormData();
fd.append('file', file);
fd.append('format', 'json');
fd.append('first-view', ($('#first-view').prop('checked')) ? 1 : 0);
fd.append('crypt', ($('#crypt').prop('checked')) ? 1 : 0);
fd.append('delete-day', ($('#delete-day').val()));
$('.messages').append([
'<div id="1-div">', cleanName(file.name), '<br>',
'<div class="progress">',
'<div id="1"class="progress-bar progress-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">',
'<span id="1-text" class="pull-left" style="padding-left: 10px;"> 0%</span>',
'</div>',
'</div>',
'</div>'
].join(''));
// Ajax Submit
$.ajax({
url: '<%== url_for('/') %>',
type: 'POST',
dataType: 'json',
data: fd,
cache: false,
contentType: false,
processData: false,
forceSync: false,
xhr: function(){
var xhrobj = $.ajaxSettings.xhr();
if(xhrobj.upload){
xhrobj.upload.addEventListener('progress', function(event) {
var percent = 0;
var position = event.loaded || event.position;
var total = event.total || e.totalSize;
if(event.lengthComputable){
percent = Math.ceil(position / total * 100);
}
var percentStr = ' '+percent+'%';
$('#1').prop('aria-valuenow', percent);
$('#1').prop('style', 'width: '+percent+'%;');
$('#1-text').html(percentStr);
}, false);
}
return xhrobj;
},
success: function (data, message, xhr){
$('#1-div').remove();
if ($('#copy-all').length === 0 && data.success) {
$('.messages').prepend([
'<div class="col-xs-12 col-sm-11 col-sm-offset-1">',
'<a id="copy-all" href="#" class="btn btn-info" onClick="event.preventDefault();copyAllToClipboard();">',
'<%= l('Copy all view links to clipboard') %>',
'</a>',
'</div>'
].join(''));
}
data.msg.filename = cleanName(data.msg.filename);
$('.messages').append(buildMessage(data.success, data.msg));
if (data.success) {
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
addItem(data.msg);
}
},
error: function (xhr, status, errMsg){
$('.messages').append(buildMessage(false, ''));
},
});
}
function initPaste() {
/*
actually FF and Chrome doesn't handle paste events the same way...
for ff we need to create a editable div and register an event to it.
When user paste, the image is "really" pasted in the div. Then, we need to iterate throught
the div childs to get images. Previsouly FF didn't have the paste event so it was esay to figure on wich browser we were.
But firefox now have a paste event so I test it...
on Chrome the file object is directlyt in the clipboard.
*/
var b = 'FF';
try {
//FF
var cbe = new ClipboardEvent('hop');
} catch(hop) {
//under webkkit Clipboard doesn't have arguments...
b = 'WK'
}
if (b === 'FF') {
var pasteDiv = document.createElement('div');
pasteDiv.addEventListener('paste', onPasteFF);
pasteDiv.setAttribute('class', 'pasteZone');
pasteDiv.setAttribute('contenteditable', true);
document.getElementsByTagName('body')[0].appendChild(pasteDiv);
pasteDiv.focus();
document.addEventListener('click', function(event) {
var t = $(event.target);
switch (t[0].nodeName.toUpperCase()) {
case 'A':
case 'BUTTON':
case 'INPUT':
case 'SELECT':
case 'SPAN':
case 'LABEL':
break;
default:
if (t[0].parentNode.nodeName.toUpperCase() !== 'SELECT') {
pasteDiv.focus();
}
}
});
} else {
document.addEventListener('paste', onPaste);
}
}
function waitforpastedata(elem, savedcontent) {
if (elem.childNodes && elem.childNodes.length > 0) {
processpaste(elem, savedcontent);
} else {
var that = {
e: elem,
s: savedcontent
};
that.callself = function () {
waitforpastedata(that.e, that.s);
}
setTimeout(that.callself, 20);
}
}
function processpaste(elem, savedcontent) {
var pasteZone = document.getElementsByClassName('pasteZone')[0];
var f = new Image();
f.onload = function(){
var canvas = document.createElement('canvas');
canvas.width = f.width;
canvas.height = f.height;
var ctx = canvas.getContext('2d');
ctx.drawImage(f, 0, 0, canvas.width, canvas.height);
canvas.toBlob(function(blob) {
var url = window.URL.createObjectURL(blob);
fileUpload(blob);
});
}
f.src = pasteZone.childNodes[0].src;
pasteZone.innerHTML = '';
}
function onPasteFF(e) {
var pasteZone = document.getElementsByClassName('pasteZone')[0];
waitforpastedata(pasteZone, 'savedcontent');
}
function onPaste(e) {
var items = e.clipboardData.items;
for(var i = 0; i < items.length; i++) {
var item = items[i];
if (/image/.test(item.type)) {
var file = item.getAsFile();
fileUpload(file);
} else {
//not image..
}
}
}
@@ -0,0 +1,61 @@
% # vim:set sw=4 ts=4 sts=4 ft=javascript expandtab:
function onCheck(e, short, ext) {
if (e.is(':checked')) {
addToShortHash(short+'.'+ext);
addToZipHash(short);
} else {
rmFromShortHash(short+'.'+ext);
rmFromZipHash(short);
}
}
function populateFilesTable() {
var files = JSON.parse(localStorage.getItem('images'));
files.reverse();
files.forEach(function(element, index, array) {
var real_short = element.real_short;
var vlink = link(element.short+'.'+element.ext, '');
var del_view = (element.del_at_view) ? '<span class="icon icon-ok"></span>' : '<span class="icon icon-cancel"></span>';
var dlink = link(real_short, 'dl', element.token, false, true);
var limit = (element.limit === 0) ? '<%= l('No limit') %>' : moment.unix(element.limit * 86400 + element.created_at).locale(window.navigator.language).format('LLLL');
var created_at = moment.unix(element.created_at).locale(window.navigator.language).format('LLLL');
var tr = [
'<tr id="alert-',real_short,'">',
'<td><span class="checkbox"><label><input type="checkbox" onChange="onCheck($(this), \'', element.short, '\', \'', element.ext, '\');"><label></span></td>',
'<td>', element.filename.replace(/</g, '&lt;').replace(/>/g, '&gt;'), '</td>',
'<td><a href="',vlink,'">',vlink,'</a></td>',
'<td id="count-',real_short,'" class="text-center"></td>',
'<td class="text-center">', del_view, '</td>',
'<td>', created_at, '</td>',
'<td>', limit, '</td>',
'<td><a id="del-',real_short,'" data-short="',real_short,'" data-token="',element.token,'" href="#">',dlink,'</a></td>',
'</tr>'
].join('');
$('#myfiles').append(tr);
$('#del-'+real_short).on('click', delImage);
$.ajax({
url : '<%== url_for('counter') %>',
type : 'POST',
data : {
'short': real_short,
'token': element.token
},
success: function(data) {
if (data.success) {
if (data.enabled) {
$('#count-'+real_short).text(data.counter);
} else {
delItem(real_short);
$('#alert-'+real_short).remove();
}
} else {
alert(data.msg);
}
},
error: function() {
alert(element.filename+'<%= l(': Error while trying to get the counter.') %>');
}
});
});
}
+31
View File
@@ -0,0 +1,31 @@
% # vim:set sts=4 sw=4 ts=4 ft=html.epl expandtab:
<h4><%= l('Archives download') %></h4>
<hr>
<div>
<p>
<%= l('You asked to download a zip archive for too much files.') %>
<%= l('Lutim can\'t zip so many images at once, so it splitted your demand in multiple URLs.') %>
</p>
</div>
<noscript>
<div>
<p><%= l('Please click on each URL to download the different zip files.') %></p>
</div>
</noscript>
<div class="jsonly">
<p><%= l('The automatic download process will open a tab in your browser for each link. You need to allow popups for Lutim.') %></p>
</div>
<ul>
% for my $i (@{$urls}) {
<li><a href="<%== $i %>" class="dl-zip" target="_blank"><%= $i %></a></li>
% }
</ul>
%= javascript begin
$(document).ready(function() {
$('.jsononly').show();
$('.dl-zip').each(function(index) {
this.click();
});
});
% end
-11
View File
@@ -1,11 +0,0 @@
themes/default/templates/about.html.ep
themes/default/templates/index.html.ep
themes/default/templates/stats.html.ep
themes/default/templates/myfiles.html.ep
themes/default/templates/gallery.html.ep
themes/default/templates/layouts/default.html.ep
themes/default/templates/partial/common.js.ep
themes/default/templates/partial/lutim.js.ep
lib/Lutim.pm
lib/Lutim/Controller.pm
lib/Lutim/Command/cron/stats.pm
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=Image hosting and sharing service job queue
Documentation=https://framagit.org/luc/lutim
After=lutim.service
[Service]
Type=simple
User=www-data
WorkingDirectory=/var/www/lutim/
ExecStart=/usr/local/bin/carton exec script/application minion worker -m production
[Install]
WantedBy=multi-user.target
+2
View File
@@ -3,6 +3,8 @@ Description=Image hosting and sharing service
Documentation=https://framagit.org/luc/lutim
Requires=network.target
After=network.target
#Requires=postgresql.service
#After=postgresql.service
[Service]
Type=forking
+20
View File
@@ -0,0 +1,20 @@
-- 1 up
CREATE TABLE IF NOT EXISTS lutim (
short text PRIMARY KEY,
path text default null,
footprint text default null,
enabled integer,
mediatype text default null,
filename text default null,
counter integer default 0,
delete_at_first_view integer default null,
delete_at_day integer default null,
created_at integer default null,
created_by text default null,
last_access_at integer default null,
mod_token text default null,
width integer default null,
height integer default null
);
-- 1 down
DROP TABLE lutim;