Skip to content
Browse files

* ~なファイルを削除

  • Loading branch information...
1 parent ae75c4c commit d7ade4083ed25c5baff6bfde3cccc726787f1a7c @hakobe hakobe committed Jun 13, 2008
Showing with 0 additions and 421 deletions.
  1. +0 −168 lib/Foltia.pm~
  2. +0 −202 lib/Foltia/Util.pm~
  3. +0 −51 lib/Foltia/Video.pm~
View
168 lib/Foltia.pm~
@@ -1,168 +0,0 @@
-package Foltia;
-
-use warnings;
-use strict;
-use Carp;
-
-use version; $VERSION = qv('0.0.3');
-
-# Other recommended modules (uncomment to use):
-# use IO::Prompt;
-# use Perl6::Export;
-# use Perl6::Slurp;
-# use Perl6::Say;
-
-
-# Module implementation here
-
-
-1; # Magic true value required at end of module
-__END__
-
-=head1 NAME
-
-Foltia - [One line description of module's purpose here]
-
-
-=head1 VERSION
-
-This document describes Foltia version 0.0.1
-
-
-=head1 SYNOPSIS
-
- use Foltia;
-
-=for author to fill in:
- Brief code example(s) here showing commonest usage(s).
- This section will be as far as many users bother reading
- so make it as educational and exeplary as possible.
-
-
-=head1 DESCRIPTION
-
-=for author to fill in:
- Write a full description of the module and its features here.
- Use subsections (=head2, =head3) as appropriate.
-
-
-=head1 INTERFACE
-
-=for author to fill in:
- Write a separate section listing the public components of the modules
- interface. These normally consist of either subroutines that may be
- exported, or methods that may be called on objects belonging to the
- classes provided by the module.
-
-
-=head1 DIAGNOSTICS
-
-=for author to fill in:
- List every single error and warning message that the module can
- generate (even the ones that will "never happen"), with a full
- explanation of each problem, one or more likely causes, and any
- suggested remedies.
-
-=over
-
-=item C<< Error message here, perhaps with %s placeholders >>
-
-[Description of error here]
-
-=item C<< Another error message here >>
-
-[Description of error here]
-
-[Et cetera, et cetera]
-
-=back
-
-
-=head1 CONFIGURATION AND ENVIRONMENT
-
-=for author to fill in:
- A full explanation of any configuration system(s) used by the
- module, including the names and locations of any configuration
- files, and the meaning of any environment variables or properties
- that can be set. These descriptions must also include details of any
- configuration language used.
-
-Foltia requires no configuration files or environment variables.
-
-
-=head1 DEPENDENCIES
-
-=for author to fill in:
- A list of all the other modules that this module relies upon,
- including any restrictions on versions, and an indication whether
- the module is part of the standard Perl distribution, part of the
- module's distribution, or must be installed separately. ]
-
-None.
-
-
-=head1 INCOMPATIBILITIES
-
-=for author to fill in:
- A list of any modules that this module cannot be used in conjunction
- with. This may be due to name conflicts in the interface, or
- competition for system or program resources, or due to internal
- limitations of Perl (for example, many modules that use source code
- filters are mutually incompatible).
-
-None reported.
-
-
-=head1 BUGS AND LIMITATIONS
-
-=for author to fill in:
- A list of known problems with the module, together with some
- indication Whether they are likely to be fixed in an upcoming
- release. Also a list of restrictions on the features the module
- does provide: data types that cannot be handled, performance issues
- and the circumstances in which they may arise, practical
- limitations on the size of data sets, special cases that are not
- (yet) handled, etc.
-
-No bugs have been reported.
-
-Please report any bugs or feature requests to
-C<bug-foltia@rt.cpan.org>, or through the web interface at
-L<http://rt.cpan.org>.
-
-
-=head1 AUTHOR
-
-Sugano Yoshihisa(E) C<< <koshian@misao.gr.jp> >>
-
-
-=head1 LICENCE AND COPYRIGHT
-
-Copyright (c) 2008, Sugano Yoshihisa(E) C<< <koshian@misao.gr.jp> >>. All rights reserved.
-
-This module is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself. See L<perlartistic>.
-
-
-=head1 DISCLAIMER OF WARRANTY
-
-BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
-EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
-YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
-NECESSARY SERVICING, REPAIR, OR CORRECTION.
-
-IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
-LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
-OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
-THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
View
202 lib/Foltia/Util.pm~
@@ -1,202 +0,0 @@
-sub writelog {
- my $self = shift;
- $self->log->write(@_);
-}
-#end writelog
-
-
-sub syobocaldate2foltiadate {
-#20041114213000 -> 200411142130
- my ($self, $foltiadate) = @_;
- $foltiadate = substr($foltiadate,0,12);
- $foltiadate;
-}
-
-
-sub foldate2epoch{
- my ($self, $foltiadate) = @_;
- #EPGをEPOCに
- # 2004 11 14 21 30
- my ($eyear, $emon, $emday, $q_start_time_hour, $q_start_time_min)
- = unpack 'A4 A2 A2 A2 A2', $foltiadate;
- $emon--;
- $epoch;
-}
-
-
-sub epoch2foldate{
- my $self = shift;
- my ($s, $mi, $h, $d, $mo, $y, $w) = localtime($_[0]);
- $mo++; $y += 1900;
-
- my $foltiadate;
- $mo = sprintf("%02d",$mo);
- $d = sprintf("%02d",$d);
-
- $h = sprintf("%02d",$h);
- $mi = sprintf("%02d",$mi);
- $foltiadate = "$y$mo$d$h$mi";
-
- $foltiadate;
-}
-
-sub calclength {
- #foltia開始時刻、folti終了時刻
- #戻り値:分数
- my ($self, $sttime, $edtime) = @_;
- my $length = -1;
- $sttime = &foldate2epoch($sttime);
- $edtime = &foldate2epoch($edtime);
-
- if ($edtime >= $sttime)
- $length = $edtime - $sttime;
- }
- else {
- $length = $sttime - $edtime;
- }
-
- return $length / 60;
-}
-
-sub calcoffsetdate {
- #引き数:foltia時刻、オフセット(+/-)分
- #戻り値]foltia時刻
- my ($self $foltime, $offsetmin) = @_;
-
- my $epoch = &foldate2epoch($foltime );
- $epoch = $epoch + ($offsetmin * 60 );
- $foltime = &epoch2foldate($epoch);
- $foltime;
-}
-
-sub getstationid {
- #引き数:局文字列(NHK総合)
- #戻り値:1
- my ($self, $stationname) = @_;
- my $stationid ;
- my $DBQuery = "SELECT count(*) FROM foltia_station WHERE stationname = '$item{ChName}'";
-
- my $sth = $dbh->prepare($DBQuery);
- $sth->execute();
- my @stationcount = $sth->fetchrow_array;
-
- if ($stationcount[0] == 1){
- #チャンネルID取得
- $DBQuery = "SELECT stationid,stationname FROM foltia_station WHERE stationname = '$item{ChName}'";
- $sth = $dbh->prepare($DBQuery);
- $sth->execute();
- @stationinfo= $sth->fetchrow_array;
- #局ID
- $stationid = $stationinfo[0];
- #print "StationID:$stationid \n";
-
- }
- elsif($stationcount[0] == 0){
- #新規登録
- $DBQuery = "SELECT max(stationid) FROM foltia_station";
- $sth = $dbh->prepare($DBQuery);
- $sth->execute();
- @stationinfo= $sth->fetchrow_array;
- my $stationid = $stationinfo[0] ;
- $stationid ++;
- ##$DBQuery = "insert into foltia_station values ('$stationid' ,'$item{ChName}','0','','','','','','')";
- #新規局追加時は非受信局をデフォルトに
- $DBQuery = "insert into foltia_station (stationid , stationname ,stationrecch ) values ('$stationid' ,'$item{ChName}','-10')";
-
- $sth = $dbh->prepare($DBQuery);
- $sth->execute();
- #print "Add station;$DBQuery\n";
- $self->writelog("foltialib Add station;$DBQuery");
- }
- else {
-
- #print "Error getstationid $stationcount[0] stations found. $DBQuery\n";
- $self->writelog("foltialib [ERR] getstationid $stationcount[0] stations found. $DBQuery");
-}
-
-
- return $stationid ;
-}
-
-sub calcatqparam {
- my ($self, $seconds) = @_;
- my $processstarttimeepoch = "";
- $processstarttimeepoch = &foldate2epoch($startdatetime);
- $processstarttimeepoch = $processstarttimeepoch - $seconds ;
- my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)
- = localtime($processstarttimeepoch);
- $year += 1900;
- $mon++; #範囲を0-11から1-12へ
- my $atdateparam = "";
- $atdateparam = sprintf("%04d%02d%02d%02d%02d",$year,$mon,$mday,$hour,$min);
-
- return $atdateparam ;
-}
-
-sub processfind{
- my ($self, $findprocess) = @_;
-
- my @processes = `ps ax | grep -i $findprocess `;
- my $chkflag = 0;
-
- foreach (@processes ){
- if (/$findprocess/i){
- unless (/grep/){
- #print "process found:$_\n";
- $chkflag++ ;
- }
- else {
- #print "process NOT found:$_\n";
- }
- }
-
- }
- return ($chkflag);
-}#endsub
-
-
-sub filenameinjectioncheck {
- my ($self, $filename) = @_;
- $filename =~ s/\///gi;
- $filename =~ s/\;//gi;
- $filename =~ s/\&//gi;
- $filename =~ s/\|//gi;
-
- return ($filename );
-}
-
-sub getphpstyleconfig {
- my ($self, $key) = @_;
- my $phpconfigpath = "";
- my $configline = "";
-
- # read
- if (-e "$phptoolpath/php/foltia_config2.php") {
- $phpconfigpath = "$phptoolpath/php/foltia_config2.php";
- }
- elsif(-e "$toolpath/php/foltia_config2.php") {
- $phpconfigpath = "$toolpath/php/foltia_config2.php";
- }
- else {
- $phpconfigpath = `locate foltia_config2.php | head -1`;
- chomp($phpconfigpath);
- }
-
-
- if (-r $phpconfigpath ) {
- open (CONFIG ,"$phpconfigpath") || die "File canot read.$!";
- while(<CONFIG>){
- if (/$key/){
- $configline = $_;
- $configline =~ s/\/\/.*$//;
- $configline =~ s/\/\*.*\*\///;
- }
- else{
- }
- }
- close(CONFIG);
- }#end if -r $phpconfigpath
-
- return ($configline);
-}#end sub getphpstyleconfig
-
View
51 lib/Foltia/Video.pm~
@@ -1,51 +0,0 @@
-package Foltia::Model;
-
-sub getstationid {
- #引き数:局文字列(NHK総合)
- #戻り値:1
- my ($stationname) = @_;
- my $stationid ;
- my $DBQuery = "SELECT count(*) FROM foltia_station WHERE stationname = '$item{ChName}'";
-
- my $sth = $dbh->prepare($DBQuery);
- $sth->execute();
- my @stationcount = $sth->fetchrow_array;
-
- if ($stationcount[0] == 1){
- #チャンネルID取得
- $DBQuery = "SELECT stationid,stationname FROM foltia_station WHERE stationname = '$item{ChName}'";
- $sth = $dbh->prepare($DBQuery);
- $sth->execute();
- @stationinfo= $sth->fetchrow_array;
- #局ID
- $stationid = $stationinfo[0];
- #print "StationID:$stationid \n";
-
- }
- elsif($stationcount[0] == 0){
- #新規登録
- $DBQuery = "SELECT max(stationid) FROM foltia_station";
- $sth = $dbh->prepare($DBQuery);
- $sth->execute();
- @stationinfo= $sth->fetchrow_array;
- my $stationid = $stationinfo[0] ;
- $stationid ++;
- ##$DBQuery = "insert into foltia_station values ('$stationid' ,'$item{ChName}','0','','','','','','')";
- #新規局追加時は非受信局をデフォルトに
- $DBQuery = "insert into foltia_station (stationid , stationname ,stationrecch ) values ('$stationid' ,'$item{ChName}','-10')";
-
- $sth = $dbh->prepare($DBQuery);
- $sth->execute();
- #print "Add station;$DBQuery\n";
- $self->writelog("foltialib Add station;$DBQuery");
- }
- else {
-
- #print "Error getstationid $stationcount[0] stations found. $DBQuery\n";
- $self->writelog("foltialib [ERR] getstationid $stationcount[0] stations found. $DBQuery");
-}
-
-
- return $stationid ;
-}
-

0 comments on commit d7ade40

Please sign in to comment.
Something went wrong with that request. Please try again.