Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
100 additions
and
551 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
config-local.pl | ||
test | ||
*.tgz | ||
tmp | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
cd /home/uwe/mittag | ||
rm -f mail/*.txt | ||
/opt/perl/bin/perl bin/mail-download.pl | ||
#tar -czf backup/mail-`date +%Y-%m-%d-%H-%M`.tgz mail | ||
/opt/perl/bin/perl bin/mail-extract.pl | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
export LANG='de_DE.utf8' | ||
|
||
cd /home/uwe/mittag | ||
rm -f data/* | ||
/opt/perl/bin/perl bin/download.pl | ||
#tar -czf backup/`date +%Y-%m-%d-%H-%M`.tgz data | ||
/opt/perl/bin/perl bin/extract.pl | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package Mittag::Web; | ||
|
||
use Mojo::Base 'Mojolicious'; | ||
|
||
use Mittag::DB::Schema; | ||
|
||
|
||
has schema => sub { | ||
my $config = { | ||
db_name => 'mittag', | ||
db_user => 'root', | ||
db_pass => 'root', | ||
}; | ||
Mittag::DB::Schema->connect_with_config($config); | ||
}; | ||
|
||
|
||
sub rs { | ||
return (shift)->schema->resultset('Mittag::DB::Schema::' . shift); | ||
} | ||
|
||
sub startup { | ||
my ($self) = @_; | ||
|
||
$self->plugin('tt_renderer'); | ||
|
||
my $r = $self->routes; | ||
|
||
$r->route('/' )->to('day#today'); | ||
$r->route('/day' )->to('day#today'); | ||
$r->route('/day/:date')->to('day#date')->name('day'); | ||
$r->route('/day/today')->to('day#date')->name('today'); | ||
|
||
# compatibility with old mobile URLs | ||
$r->route('/day/:date/1')->to('day#date'); | ||
} | ||
|
||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env perl | ||
use Mojo::Base -strict; | ||
|
||
use File::Basename 'dirname'; | ||
use File::Spec; | ||
|
||
use lib join '/', File::Spec->splitdir(dirname(__FILE__)), 'lib'; | ||
use lib join '/', File::Spec->splitdir(dirname(__FILE__)), '..', 'lib'; | ||
|
||
# Check if Mojolicious is installed; | ||
die <<EOF unless eval 'use Mojolicious::Commands; 1'; | ||
It looks like you don't have the Mojolicious framework installed. | ||
Please visit http://mojolicio.us for detailed installation instructions. | ||
EOF | ||
|
||
# Application | ||
$ENV{MOJO_APP} ||= 'Mittag::Web'; | ||
|
||
# Start commands | ||
Mojolicious::Commands->start; |
Oops, something went wrong.