Hi Kevin

Is all your data in one big text file? Or do you have to type it in by
hand and want some type of script to do the calcluations? 

I have to run right now. I'll be back in a few hours and can give you
some more help then, if no one else has offered.

Paul


On Tue, Jan 11, 2005 at 12:18:15PM -0500, kevin parks wrote:
> From: kevin parks <[EMAIL PROTECTED]>
> Date: Tue, 11 Jan 2005 12:18:15 -0500
> To: tutor@python.org
> Cc: Kevin Parks <[EMAIL PROTECTED]>
> Subject: [Tutor] Time script help sought!
> 
> I am kind of in a bit of a jam  (okay a big jam) and i was hoping that 
> someone here could give me a quick hand. I had a few pages of time 
> calculations to do. So, i just started in on them typing them in my 
> time calculator and writing them in by hand. Now i realize, that i 
> really need a script to do this because:
> 
> 1. It turns out there are hundreds of pages of this stuff.
> 2. I have to do something similar in again soon.
> 3. By doing it by hand i am introducing wonderful new errors!
> 4. It all has to be typed up anyway (which means weeks of work and even 
> more typos!)
> 
> The input would like so:
> 
> Item_1    TAPE_1    1    00:23    8:23
> 
> Item_2    TAPE_1    2    8:23    9:41
> 
> Item_3    TAPE_1    3    9:41    10:41
> Item_3    TAPE_1    4    10:47    11:19
> Item_3    TAPE_1    5    11:21    11:55
> Item_3    TAPE_1    6    11:58    12:10
> Item_3    TAPE_1    7    12:15    12:45    Defect in analog tape sound.
> Item_3    TAPE_1    8    12:58    24:20    Defect in analog tape sound.
> 
> Item_4    TAPE_1    9    24:33
> Item_4    TAPE_1    10    25:48
> Item_4    TAPE_1    11    29:48
> Item_4    TAPE_1    12    31:46
> Item_4    TAPE_1    13    34:17        Electronic sounds.
> Item_4    TAPE_1    14    35:21
> Item_4    TAPE_1    15    36:06
> Item_4    TAPE_1    16    37:01    37:38
> 
> These are analog tapes that were digitized (on to CD or a digital tape) 
> that have now been exported as individual files that are meant to be 
> part of an on-line audio archive. The timings refer to the time display 
> on the CD or digital tape. The now all have to adjusted so that each 
> item starts at 0.00 since they have all been edited out of their 
> context and are now all individual items that start at 00:00. So Item_1 
> which was started at 00:23 on the tape and ended at 8:23 needs to have 
> 23 seconds subtracted to it so that it says:
> 
> Item_1    TAPE_1    1    00:00    08:00
> 
> Item_2    TAPE_1    2    08:23    09:41
> 
> would change to:
> 
> Item_2    TAPE_1    2    00:00    01:18
> 
> etc.
> 
> but as always you may notice a wrinkle.... some items have many times 
> (here 6) indicated:
> 
> Item_3    TAPE_1    3    9:41    10:41
> Item_3    TAPE_1    4    10:47    11:19
> Item_3    TAPE_1    5    11:21    11:55
> Item_3    TAPE_1    6    11:58    12:10
> Item_3    TAPE_1    7    12:15    12:45    Defect in analog tape sound.
> Item_3    TAPE_1    8    12:58    24:20    Defect in analog tape sound.
> 
> This is all a single sound file and these separate times mark where 
> there was a break, defect, or edit in the individual item. These have 
> to be adjusted as well to show where these events would appear in the 
> new sound file which now starts at 00:00.
> 
> Item_3    TAPE_1    3    00:00    01:00    ----
> Item_3    TAPE_1    4    01:00    01:38    ----
> Item_3    TAPE_1    5    01:38    02:14    ----
> Item_3    TAPE_1    6    02:14    02:29    ----
> Item_3    TAPE_1    7    02:29    03:04    Defect in analog tape sound.
> Item_3    TAPE_1    8    03:04    14:39    Defect in analog tape sound.
> 
> Further wrinkles: Some have start and end times indicated, some only 
> start times. I suppose that the output would ideally have both.... some 
> have comments and others don't ... and I need these comments echo-ed or
> since i probably need to make a database or table eventually non 
> comments just have some place holder.
> 
> I'd have a lot of similar type calculations to do... I was hoping and 
> praying that some one here was feeling generous and show me the way and 
> then, of course i could modify that to do other tasks... Usually i am 
> happy to take the long road and all but i'll be honest, i am in a big 
> jam here and this huge task was just dumped on me. I am frankly a 
> little desperate for help on this and hoping someone is feeling up to 
> spoon feeding me a clear modifiable example that works. Sorry.....
> 
> cheers,
> 
> kevin
> k p 8 'at ' m a c 'dot' c o m
> 
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor

-- 

************************
*Paul Tremblay         *
[EMAIL PROTECTED]
************************
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to