RFC: Date::Extract::P800Picture - gets YMDH encoded date from image filename

PERL

    Next

  • 1. Reduce CPU time while using serialport?
    Hi, I am using Win32::serialport for reading a data through a scanner which is connected to the serial port. I use polling as below.But this consumes 99% of my CPU time. and slows down the system. while(!($data=~/\r/)) { $data=$Scanner->input(); #read the scanner port $labeldata=$labeldata.$data; #append } Is there any way I implement interrupts or events using perl. Or is there any other method to solve this issue. I use WIndows NT4(its old..but i have to...) Pls share your ideas. Cheers, jis
  • 2. need help with HTTP-WebTest module, tutorials or examples
    I need help with the HTTP-WebTest module. Does anyone know of a tutorial that would help? Examples needed (pictures would be nice too, as I have my own crayons). Can't even seem to get output_ref or fn_out working to see the output, so that I can see how it handles css and document.write while reading. Haven't even tried to read php or cgi generated pages yet. Any and all pointers to help files will be appreciated.
  • 3. Have any Asynchronous I/O module in win32?
    The epoll io::aio kqueue is for unix like os. But have any module using IOCP to implement Asynchronous I/O? (Win32)

RFC: Date::Extract::P800Picture - gets YMDH encoded date from image filename

Postby Roland van Ipenburg » Mon, 08 Dec 2008 18:51:48 GMT

Hi,

I wrote a module
< http://www.**--****.com/ ~ipenburg/tmp/Date-Extract-P800Picture-0.01.tar.gz>
that converts the date found in the filename of a picture
taken with a Sony-Ericsson P800 camera phone to a DateTime
object. It has nothing to do with EXIF. The date in the
filename consists of four characters and is almost
human-readable:

    Y           year between 2000 and 2035, 0-9A-Z
	M           month, 0-9AB
	D           day of month, 0-9A-U
	H           hour of day, 0-9A-N

Using this I can find the hour the picture is taken when the
timestamp of the file in the filesystem is not the creation
time of the original file.

My issue is that I can't think of a good name for the
module. It does something like Date::Extract, but since I
don't know if any other devices use filenames like that, or
how to name that almost human-readable format, P800Picture
is probably wrong. I wanted to check on flickr for other
cameras that might use this format, but flickr doesn't store
the original filename of pictures...

Would there be a need to have this on CPAN, as part of
another module, or with some better name or another scope?

-- 
Roland van Ipenburg
 XXXX@XXXXX.COM 
 http://www.**--****.com/ ~ipenburg/

Similar Threads:

1.Need help creating filename with date

2.Using a file's modification date in the filename

I want to be able to rename a file and prepend the file's modification
date at the front of the file. For example:
with a file named testme.txt and a modification date of April 1, 2006,
I want the renamed file to be named 20060401-testme.txt

What I can do is get the modification date using ctime, but it I can't
figure out how to format the output. I am able to format  the date the
way I like using strftime. Here is some sample code which shows the
output I do and do not want:

#!/usr/bin/perl -w
use strict ;
use warnings ;
use POSIX qw(strftime);

# print today's date YYYYMMDD:
my $now_time = strftime "%Y%m%d", localtime;
print "I want it formatted this way:\n$now_time\n";

# print the modified date of file:
use File::stat;
use Time::localtime;
my $file = "testme.txt";
my $timestamp = ctime(stat($file)->mtime);
print "...but not this way:\n $timestamp\n";


Any assistance would be appreciated,

3.Hyperlinks, filename and date fields

In Word 2007 all hyperlinks and text fields such as the filename and date do 
not work. They just show the unfomatted code.
I got rid of all security and restrictions that I can find, probably too 
much.  
If I right-click a hyperlink or email and click on "select hyperlink" it 
will then format itself. 
If I insert a page number or filename in the footer, I get the code and have 
to right-click and select "Toggle field code" to get it to format correctly.

How do I get the links to read properly when the file is opened or fields 
inserted? 

Wayne

4.Comparing file dates with current date

I am trying to compare a file's modified timestamp with the current date.
 
I can use 'stat' to get the timestamp of the file but am not sure how to compare it to the localtime(). More importantly I want to be able to quantify the difference in days, month, hours and minutes. 
 
Any suggestions?
 

5.Help w/Class::Date Date.xs

6. compare last access date of a file in windows to current date

7. date --date : the perl way

8. how to get tomorrow date using Date::CALC



Return to PERL

 

Who is online

Users browsing this forum: No registered users and 37 guest