Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2007-12-23 1:42:17 pm

darklord
Member
Registered: 2007-11-05
Posts: 11

Canon Digital camera

I am trying to download pictures off my camera to view/store them either on my eee or on a usb stick through it.

my camera shows up in the USB controller list (through advanced mode) but not as a usb device or memory card, so I can't seem to get the pictures off it.

I have a Canon 20D - does anyone know if I need a driver or if there is a trick to finding the camera in the file manager?

thanks

Offline

 

#2 2007-12-23 4:08:49 pm

robin
Senior Member
From: Melbourne/Australia
Registered: 2007-11-27
Posts: 256

Re: Canon Digital camera

darklord wrote:

I am trying to download pictures off my camera to view/store them either on my eee or on a usb stick through it.

my camera shows up in the USB controller list (through advanced mode) but not as a usb device or memory card, so I can't seem to get the pictures off it.

I have a Canon 20D - does anyone know if I need a driver or if there is a trick to finding the camera in the file manager?

thanks

Have you tried the photo manager instead of file manager?


"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."

--Antoine de Saint-Exupery

Offline

 

#3 2007-12-23 5:02:51 pm

darklord
Member
Registered: 2007-11-05
Posts: 11

Re: Canon Digital camera

robin wrote:

Have you tried the photo manager instead of file manager?

yah, it just doesn't offer the camera as a folder

Offline

 

#4 2007-12-23 5:31:42 pm

PaulMdx
Senior Member
From: Eee PC 4G White w/Xandros - UK
Registered: 2007-09-23
Posts: 536

Re: Canon Digital camera

I would just buy a $20 CF reader to be honest.  From my experience transferring via a card reader is faster than using the camera itself.


eee-developers.com - For software dev, hardware mods and more

Offline

 

#5 2007-12-23 7:49:26 pm

Sausage_fingers
New member
Registered: 2007-12-23
Posts: 5

Re: Canon Digital camera

darklord wrote:

my camera shows up in the USB controller list (through advanced mode) but not as a usb device or memory card, so I can't seem to get the pictures off it.

I have a Canon 20D - does anyone know if I need a driver or if there is a trick to finding the camera in the file manager?

I am pretty sure that you need a specific driver to access the camera.

I believe that the 20D does not act as a USB storage device as far as your computer is concerned - you need the specific 20D driver.

i am basing this on my 400D - the first firmware had the same problem - windows would not recognise it and you needed to install the canon software to access the CF card. A recent firmware update to the camera added the ability to work with xp as a simple mass storage device.

Best to go with the CF card reader as suggested above. It saves the camera's battery as well.

Offline

 

#6 2007-12-23 8:06:42 pm

djcl
New member
Registered: 2007-11-28
Posts: 7

Re: Canon Digital camera

The version of the gphoto libraries does not support the latest Canon DSLRs. My XTi is supported in the next version, and the most recent version supports nearly all features, but I have not figured out how to install that version without upgrading a tonne of stuff or compiling it myself( and while I can, I don't want to build my whole build environment on this thing ).

If you can find the upgrade info for gphoto, to the latest, it should work fine.

JC

Offline

 

#7 2007-12-23 8:28:05 pm

Sausage_fingers
New member
Registered: 2007-12-23
Posts: 5

Re: Canon Digital camera

djcl wrote:

The version of the gphoto libraries does not support the latest Canon DSLRs. My XTi is supported in the next version, and the most recent version supports nearly all features, but I have not figured out how to install that version without upgrading a tonne of stuff or compiling it myself( and while I can, I don't want to build my whole build environment on this thing ).

If you can find the upgrade info for gphoto, to the latest, it should work fine.

JC

out of interest, have you upgraded the firmware in your XTi?

Out of the box, it does not work as a  MassStorage device, but the newest firmware does.

Offline

 

#8 2008-01-15 5:49:40 pm

mike789
Member
From: Leeds, UK
Registered: 2008-01-12
Posts: 11

Re: Canon Digital camera

Canon cameras use PTP so they don't show up as mass storage devices by simply plugging into the eee. I installed digikam 0.8.2 (from asus repository) this can transfer files off my Canon A710is no problems via USB. I could just put the SD card in the reader but thats where my extra file storage currently resides.

It can see my Canon 40D on the usb bus but doesn't recognize it by name and can't import files. Since the 20D is an older model it might work with digikam 0.8.x

I installed digikam 0.9.x latest version on my desktop pc running Open SuSE 10.3, this can read the files from the 40D including RAW. However it relies on later versions of the gphoto2 library, then you're into version compatibility problems with default eee pc distro.

Picasa 2.7beta will import files from a 40D but it does a dumb rename, i.e. you lose the unique name generated by the camera, secondly it appears to compress the images as you import them. Neither of these features can be turned off. Finally picasa is a fairly big install by eee standards. So I too will be buying a CF card reader.


Black eeepc 701 4G - 1G ram upgrade - Ubuntu-eee 8.04

Offline

 

#9 2008-01-17 12:25:59 pm

Aengus
New member
Registered: 2007-12-13
Posts: 7

Re: Canon Digital camera

I dont know if this is worth adding to the WIKI or not........


How to get a Canon Digital Camera (most models) recognised.


I have a Canon IXUS 430 otherwise known as the PowerShot S410 and I couldnt get it automatically recognised by the eeepc.

The camera, as somebody else has pointed out, was being reported correctly under Control Centre->Hardware information->Devices->USB Devices->UHCI Host Controller.

However Gwenview was not picking it up.

Gwenview does not pick it up as the Digital Camera Plugin is not enabled by default!!!

Open Gwenview
Select Settings->Configure Photo Manager

On the left hand side select the option "KIPI Plugins"

Enable the check box for "KIPI Digital Camera interface Plugin" and click Apply.

Now in the main Gwenview panel you can select Plugins->Import->Digital Camera.

This will bring up a Digital Camera Interface Panel

Select Setup.  This will bring up another panel in which you can "Auto-Detect"

If the camera is already recognised by the Control Centre then it should have no trouble grabbing the camera.

Back in the Digital Camera Interface Panel select a destination folder to download the photos and click "Connect"

Job done!

I spent a week on holiday without the internet unable to work this out and with 1Gb of diving photos to download.  I was not a happy bunny.


Aengus

Offline

 

#10 2008-01-17 1:05:08 pm

ichbinbored
Senior Member
Registered: 2007-12-05
Posts: 171

Re: Canon Digital camera

My camera's got a setting so you can either use PTP or mass storage. If your camera can do that (look under menu > communication) then you can select mass storage and it should work.

If that doesn't work, try following the instructions here to install digikam, which can transfer pictures using PTP. Picasa might also work.

Offline

 

#11 2008-01-17 1:33:47 pm

Aengus
New member
Registered: 2007-12-13
Posts: 7

Re: Canon Digital camera

gwenview and digikam both use the same set of plugins -> KIPI

You dont necessarily need to install digikam just install/enable the correct plugin.


Aengus

Offline

 

#12 2008-01-17 2:55:47 pm

clarlt
New member
From: Upland, CA
Registered: 2008-01-15
Posts: 7
Website

Re: Canon Digital camera

darklord wrote:

I am trying to download pictures off my camera to view/store them either on my eee or on a usb stick through it.

my camera shows up in the USB controller list (through advanced mode) but not as a usb device or memory card, so I can't seem to get the pictures off it.

I have a Canon 20D - does anyone know if I need a driver or if there is a trick to finding the camera in the file manager?

thanks

Just a note of interest: I connected my Sony Cybershot T-100 camera to my eee PC by USB cable. The computer recognized the camera and I was able to play MPG movies in the Media Player right off the camera. Very cool.

- Clark

Offline

 

#13 2008-01-18 4:45:24 pm

mike789
Member
From: Leeds, UK
Registered: 2008-01-12
Posts: 11

Re: Canon Digital camera

some Canon cameras also support USB mass storage as well as PTP

digikam/gwenview/kipi rely on the gphoto2 library v2.2.1 on the default install

you can see what cameras it supports, using the script
/usr/lib/libgphoto2/print-camera-list human-readable | more


Black eeepc 701 4G - 1G ram upgrade - Ubuntu-eee 8.04

Offline

 

#14 2008-01-28 9:35:54 pm

kaban
New member
Registered: 2008-01-21
Posts: 8

Re: Canon Digital camera

Aengus wrote:

I dont know if this is worth adding to the WIKI or not........


How to get a Canon Digital Camera (most models) recognised.


I have a Canon IXUS 430 otherwise known as the PowerShot S410 and I couldnt get it automatically recognised by the eeepc.

The camera, as somebody else has pointed out, was being reported correctly under Control Centre->Hardware information->Devices->USB Devices->UHCI Host Controller.

However Gwenview was not picking it up.

Gwenview does not pick it up as the Digital Camera Plugin is not enabled by default!!!

Open Gwenview
Select Settings->Configure Photo Manager

On the left hand side select the option "KIPI Plugins"

Enable the check box for "KIPI Digital Camera interface Plugin" and click Apply.

Now in the main Gwenview panel you can select Plugins->Import->Digital Camera.

This will bring up a Digital Camera Interface Panel

Select Setup.  This will bring up another panel in which you can "Auto-Detect"

If the camera is already recognised by the Control Centre then it should have no trouble grabbing the camera.

Back in the Digital Camera Interface Panel select a destination folder to download the photos and click "Connect"

Job done!

I spent a week on holiday without the internet unable to work this out and with 1Gb of diving photos to download.  I was not a happy bunny.


Aengus

That should be added to the wiki, imo. Very helpful. big_smile

One thing though. My camera is also PowerShot S410 and Gwenview detected it as Canon Digital IXUX 430, however when I click connect it gives me this error: "Failed to initialize camera."

So I went back to setup, selected the camera and hit edit.
There is a huge list of Canon cameras there and I selected "Canon PowerShot S410 Digital ELPH (normal mode)" as my camera.
After that everything worked great.

Thanks!

Offline

 

#15 2008-02-01 4:16:45 am

wout8b
New member
Registered: 2008-02-01
Posts: 1

Re: Canon Digital camera

Very helpful!

My Canon 350D was recognized in Gwenview using PTP mode. No further complications.

Many thanks.

Offline

 

#16 2008-02-02 1:59:32 pm

zzzing
New member
Registered: 2008-01-18
Posts: 5

Re: Canon Digital camera

@Aengus

Thanks for your post, now my Canon SD600 is recognized, and I can transfer the pics to my 8gb SD card.  Your info should be in the wiki if it is not already. I found it through the search feature.

Offline

 

#17 2008-02-10 5:35:42 pm

epcFrancois
New member
Registered: 2008-02-10
Posts: 1

Re: Canon Digital camera

Aengus wrote:

I dont know if this is worth adding to the WIKI or not........


How to get a Canon Digital Camera (most models) recognised.


I have a Canon IXUS 430 otherwise known as the PowerShot S410 and I couldnt get it automatically recognised by the eeepc.

The camera, as somebody else has pointed out, was being reported correctly under Control Centre->Hardware information->Devices->USB Devices->UHCI Host Controller.

However Gwenview was not picking it up.

Gwenview does not pick it up as the Digital Camera Plugin is not enabled by default!!!

Open Gwenview
Select Settings->Configure Photo Manager

On the left hand side select the option "KIPI Plugins"

Enable the check box for "KIPI Digital Camera interface Plugin" and click Apply.

Now in the main Gwenview panel you can select Plugins->Import->Digital Camera.

This will bring up a Digital Camera Interface Panel

Select Setup.  This will bring up another panel in which you can "Auto-Detect"

If the camera is already recognised by the Control Centre then it should have no trouble grabbing the camera.

Back in the Digital Camera Interface Panel select a destination folder to download the photos and click "Connect"

Job done!

I spent a week on holiday without the internet unable to work this out and with 1Gb of diving photos to download.  I was not a happy bunny.


Aengus

Thanks, works like a charm (PowerShot S50) , and nothing to install
- You save my vacation
- I'll have a beer to your health Aengus
Cheer

Offline

 

#18 2008-02-24 2:03:41 pm

monkly
Member
Registered: 2008-02-14
Posts: 39

Re: Canon Digital camera

exactly what I needed to know !
thank you Aengus

Offline

 

#19 2008-03-08 11:04:10 am

Britman
Senior Member
Registered: 2008-02-26
Posts: 379

Re: Canon Digital camera

Brilliant my camera was recognised no trouble. However as I have a Canon 40D it didn't see it as such and the 40D isn't on the list when you click add. Is there any update for this so it supports the 40D. Now I'm not too bothered if it the 40D doesn't appear on the add list, what I really really need is to be able to view RAW (CR2) files as that's what I shoot in. Is there a plugin I should get? bear in mind I'm a n00b at linux and installing anything under this.


There once was a buggy AI. Who decided her subject should die.
When the plot was uncovered, The subjected discovered That sadly the cake was a lie.

Offline

 

#20 2008-03-08 10:30:40 pm

plodr
Moderator
From: PA
Registered: 2007-12-30
Posts: 4440

Re: Canon Digital camera

Keep in mind I'm a picture taker and not a photographer, LOL.
This plugin for the GIMP recognizes your camera
http://ufraw.sourceforge.net/Cameras.html
Now the easiest thing is to stick the camera's SD card in the eeepc slot, COPY the images to the computer and manipulate them in the GIMP. The GIMP is similar to photoshop; having never used photoshop and still struggling at entry level for the GIMP, I can't offer you any help on photo manipulation.

For my cameras, I always copy my files to a windows computer and burn them as a data CD so I have a hard copy should anything happen to the card or the files on my computer.


4G Pearl White, 1 GB RAM, Xandros Easy Mode
HP5550 networked printer
Registered Linux User # 401459

Offline

 

#21 2008-04-20 2:38:14 pm

tylerismith
New member
Registered: 2008-04-20
Posts: 1

Re: Canon Digital camera

With the latest version of gwenview, as provided by the eeepc update in the add/remove programs, it updates gwenview with a version that doesn't have the plugins menu.  To bring the plugins menu back you need to download the correct gwenviewui.rc file from sourceforge.  As listed in this post: http://www.nabble.com/Gwenview-does-not … 61722.html

Offline

 

#22 2008-05-18 4:29:05 am

dracothered
Senior Member
Registered: 2008-04-21
Posts: 174

Re: Canon Digital camera

tylerismith wrote:

With the latest version of gwenview, as provided by the eeepc update in the add/remove programs, it updates gwenview with a version that doesn't have the plugins menu.  To bring the plugins menu back you need to download the correct gwenviewui.rc file from sourceforge.  As listed in this post: http://www.nabble.com/Gwenview-does-not … 61722.html

Here is the gwenviewui.rc file contents,

Code:

<?xml version="1.0"?>
 <!DOCTYPE gui SYSTEM "kpartgui.dtd">
 <kpartgui name="Gwenview" version="27">
 <MenuBar>
   <Menu name="file">
     <Action name="file_rename"/>
     <Action name="file_copy"/>
     <Action name="file_move"/>
     <Action name="file_link"/>
     <Action name="file_delete"/>
     <Separator/>
     <Action name="file_properties"/>
   </Menu>
   <Menu name="edit">
     <Action name="rotate_left"/>
     <Action name="rotate_right"/>
     <Action name="mirror"/>
     <Action name="flip"/>
   </Menu>
   <Menu name="view" noMerge="1">
     <text>&amp;View</text>
     <Action name="reload"/>
     <Separator/>
     <Action name="switch_to_view_mode" />
     <Action name="switch_to_browse_mode" />
     <Action name="fullscreen"/> 
     <Action name="slideshow"/>
     <Separator/>
     <Action name="list_mode" />
     <Action name="side_thumbnail_mode" />
     <Action name="bottom_thumbnail_mode" />
     <Action name="show_dot_files"/>
     <Separator/>
     <Menu name="colors">
         <text>&amp;Colors</text>
         <Action name="increase_gamma"/>
         <Action name="decrease_gamma"/>
         <Action name="increase_brightness"/>
        <Action name="decrease_brightness"/>
        <Action name="increase_contrast"/>
        <Action name="decrease_contrast"/>
        <Action name="adjust_bcg"/>
      </Menu>
     <Action name="view_zoom_to_fit"/>
     <Action name="view_zoom_to_width"/>
     <Action name="view_zoom_to_height"/>
     <Action name="view_zoom_in"/>
     <Action name="view_zoom_out"/>
     <Action name="view_actual_size"/>
     <Action name="view_zoom_lock"/>
   </Menu>
   <Menu name="go_web" noMerge="1">
     <text>&amp;Go</text>
     <Action name="first"/>
     <Action name="previous"/>
     <Action name="next"/>
     <Action name="last"/>
         <Separator/>
     <Action name="go_back"/>
     <Action name="go_forward"/>
     <Action name="go_home"/>
     <Separator/>
     <Action name="go_up"/>
     <Action name="first_sub_folder"/>
     <Action name="previous_folder"/>
     <Action name="next_folder"/>
   </Menu>
   <Action name="bookmarks"/>
   <Menu name="settings">
     <Action name="configure_tools" append="configure_merge"/>
   </Menu>
   <Menu name="plugins">
     <text>&amp;Plugins</text>
     <Menu name="kipi_images">
       <text>Images</text>
       <ActionList name="image_actions"/>
     </Menu>
     <Menu name="kipi_effects">
       <text>Effects</text>
       <ActionList name="effect_actions"/>
     </Menu>
     <Menu name="kipi_tools">
       <text>Tools</text>
       <ActionList name="tool_actions"/>
     </Menu>
     <Menu name="kipi_batch">
       <text>Batch Processing</text>
       <ActionList name="batch_actions"/>
     </Menu>
     <Menu name="kipi_import">
       <text>Import</text>
       <ActionList name="import_actions"/>
     </Menu>
     <Menu name="kipi_export">
       <text>Export</text>
       <ActionList name="export_actions"/>
     </Menu>
     <Menu name="kipi_collections">
       <text>Collections</text>
       <ActionList name="collection_actions"/>
     </Menu>
   </Menu>
   <Menu name="window">
     <text>&amp;Window</text>
     <ActionList name="winlist"/>
     <Separator/>
     <Action name="reset_dock_widgets"/>
   </Menu>
 </MenuBar>

 <ToolBar name="mainToolBar" noMerge="1" iconText="icontextright">
   <text>Main Toolbar</text>
   <Action name="switch_to_browse_mode"/>
   <Action name="switch_to_view_mode"/>
   <Action name="fullscreen"/>
   <Action name="slideshow"/>
 </ToolBar>

 <ToolBar name="locationToolBar">
   <text>Location Toolbar</text>
   <Action name="go_back" />
   <Action name="go_forward" />
   <Action name="go_up" />
   <Action name="go_home" />
   <Action name="clear_location" />
   <Action name="location_label" />
   <Action name="location_url" />
   <Action name="location_go" /> 
 </ToolBar>

 <StatusBar/>

 </kpartgui>

If you go here http://wiki.eeeuser.com/gwenviewui-rc_file_fix it will show you how to fix the gwenviewui.rc file.

Last edited by dracothered (2008-05-30 2:10:31 pm)


Asus EEE PC 900, Black, 1024MB Ram, Transcend 16GB SDHC
Xandros Linux OS, iceWM and iDesk
Got it and change the keyboard to Dvorak already..........
http://wiki.eeeuser.com/dvorak_keyboard

Offline

 

#23 2008-05-29 2:17:58 am

Joker B
New member
From: SF and surrounding planet
Registered: 2008-05-22
Posts: 8
Website

Re: Canon Digital camera

Hmm. I've tweaked my photomanager, and the KIPI importer is turned on, Plugins->Import->DigitalCamera appears in the menu.

My Canon 5D is connected, on, and appears in the Control Center as "Canon Digital Camera"

Using the plugin importer I can set it to "Canon 5D (PTP Mode)" but when I press "Connect" it claims that the camera isn't connected or turned off (works great with my macbbook though) - regardless of whether I select PTP or "PC Connection" modes on the camera.

Also surprisingly, the camera doesn't appear as a disk when in "PC Connection" mode (also unlike windows and macos)

Using a card reader works fine, but I'd prefer to have a cleaner way to import pix -- my goal is not so much to edit pix on the Eee as to use the Eee plus a La Cie "Orange Drive" as an image tank. The orange drive works great,and I can certainly move files from the CF reader -- it's just unnerving to have the camera rejected/ignored by gwenview.

Anyone else had similar issues (and hopefully solved them)?

Offline

 

#24 2008-05-30 3:25:39 am

baddog
Senior Member
Registered: 2008-05-07
Posts: 129

Re: Canon Digital camera

Aengus,

help for the Gwen..

i checked its preference and KIPI options and saw that the RAW conversion plugin is loaded and enabled my 900 (the checkbox is checked by default)... howecver, the prog is not able to view and CR2 files... RAW from both 5D and G9...

do u know what happend to the Gwen.. or should i omit anything else to be enable in Gwen?


regards

Offline

 

#25 2008-05-30 3:36:16 am

Joker B
New member
From: SF and surrounding planet
Registered: 2008-05-22
Posts: 8
Website

Re: Canon Digital camera

So since I'm going to have to use a card reader I mad my own little archive python script. I have to archive both pictures and audio clips, so it's nice to have a one-step method for either. Plug in the hard drive, plug in the card reader, open a terminal window and type "sudo python kbImport.py"

here is kbImport.py

Code:

# /usr/bin/python

# My quick import and archive script
#
# Usage:
#    sudo python kbImport.py
#
# Plug in a card reader and an external disk.
# The External disk should have a directory called "Pix" to archive images
# The External disk should have a directory called "Audio" to archive sounds
# Run "sudo python kbImport.py"
# Individual archive folders with names based on the CURRENT date will 
#    be created within those directories. This script is always non-
#    destructive -- if there is a name collision with a directory,
#    the new directory's name with be adjusted slightly.
#
# Images from any "DCIM" directories will copied to the Pix archive,
#   or if none is found, then the card reader will be searched for
#   MP3 and WAV files and those will be placed in the Audio archive.
#
# Kevin Bjorke
# http://www.photorant.com/

import sys
import os
import shutil
import time

disktop = "/disks/Removable/"

disks = os.listdir(disktop)

if len(disks) != 2:
  print "Sorry, wrong number of disks: %d" % (len(disks))
  for d in disks:
    print '"%s"' % (d)
  sys.exit(-1)

destdate = time.strftime("%Y-%m-%d")

# print "right number of disks, setting up for %s...." % (destdate)

# #

def copy_pix(FromDir,ArchDir):
  "Copy images"
  if not os.path.exists(ArchDir):
    print "Hey, image archive '%s' is vapor!" % (ArchDir)
    return None
  if not os.path.exists(FromDir):
    print "Hey, image source '%s' is vapor!" % (FromDir)
    return None
  if not os.path.isdir(FromDir):
    print "Hey, image source '%s' is not a directory!" % (FromDir)
    return None
  for kid in os.listdir(FromDir):
    fullpath = os.path.join(FromDir,kid)
    if os.path.isdir(fullpath):
      copy_pix(fullpath,ArchDir)
    else:
      print "%s..." % (kid)
      shutil.copy2(fullpath,ArchDir)

# #

def copy_tracks(FromDir,ArchDir):
  "Copy images"
  if not os.path.exists(ArchDir):
    print "Hey, destination archive '%s' is vapor!" % (ArchDir)
    return None
  if not os.path.exists(FromDir):
    print "Hey, track source '%s' is vapor!" % (FromDir)
    return None
  if not os.path.isdir(FromDir):
    print "Hey, track source '%s' is not a directory!" % (FromDir)
    return None
  for kid in os.listdir(FromDir):
    fullpath = os.path.join(FromDir,kid)
    if os.path.isdir(fullpath):
      copy_tracks(fullpath,ArchDir)
    else:
      fp2 = fullpath.upper()
      if fp2.endswith("MP3") or fp2.endswith("WAV"):
    print "%s..." % (kid)
    shutil.copy2(fullpath,ArchDir)
      else:
    print "Skipping %s" % (fullpath)

# #

def archive_dir_name(ArchDir,BaseName):
  "pick the name of a good dated archive dir"
  if not os.path.exists(ArchDir):
    print "Hey, master '%s' is vapor!" % (ArchDir)
    return None
  if not os.path.isdir(ArchDir):
    print "Hey, '%s' is not a directory!" % (ArchDir)
    return None
  arch = os.path.join(ArchDir,BaseName)
  if not os.path.exists(arch):
    return arch
  counter = 0
  while os.path.exists(arch):
    bn = "%s_%d" % (BaseName,counter)
    counter = counter + 1
    if counter > 20:
      return None
    arch = os.path.join(ArchDir,bn)
  return arch

# #

def seek_named_dir(LookHere,DesiredName):
  "Look for a DCIM directory, which should have pix"
  if not os.path.exists(LookHere):
    return None
  for subdir in os.listdir(LookHere):
    fullpath = os.path.join(LookHere,subdir)
    if subdir == DesiredName:
      return fullpath
  for subdir in os.listdir(LookHere):
    fullpath = os.path.join(LookHere,subdir)
    if os.path.isdir(fullpath):
      sr = seek_named_dir(fullpath,DesiredName)
      if sr is not None:
    return sr
  return None

# #

pixDir = None
pixDisk = None
audioDir = None
audioDisk = None
dcimDir = None
dcimDisk = None

for d in disks:
  disk = os.path.join(disktop,d)
  # print '"%s:"' % (disk)
  if pixDir is None:
    pixDir = seek_named_dir(disk,"Pix")
    if pixDir is not None:
      pixDisk = disk
  if audioDir is None:
    audioDir = seek_named_dir(disk,"Audio")
    if audioDir is not None:
      audioDisk = disk
  if pixDisk != disk:
    if dcimDir is None:
      # print "dcim seek %s" % (disk)
      dcimDir = seek_named_dir(disk,"DCIM")
      if dcimDir is not None:
    dcimDisk = disk

# print 'DCIM: "%s"' % (dcimDir)
# print 'Pix Dest: "%s"' % (pixDir)
# print 'Audio Dest: "%s"' % (audioDir)

if (dcimDir is None) or (pixDir is None):
  if audioDir is None:
    print "Sorry, don't know what to do now"
    sys.exit(-2)
  for d in disks:
    disk = os.path.join(disktop,d)
    if disk != audioDisk:
      srcDisk = disk
  destDir = archive_dir_name(audioDir,destdate)
  if destDir is None:
    print "Sorry, no destnation for audio"
    sys.exit(-3)
  os.mkdir(destDir)
  print "Archiving Audio from '%s'\n\tto '%s'" % (srcDisk,destDir)
  copy_tracks(srcDisk,destDir)
else:
  destDir = archive_dir_name(pixDir,destdate)
  if destDir is None:
    print "Sorry, no destnation for pix"
    sys.exit(-3)
  # print "Seeking pix from %s for %s...." % (dcimDir,destDir)
  # print "Creating archive dir '%s'" % (destDir)
  os.mkdir(destDir)
  print "Archiving Images from '%s'\n\tto '%s'" % (dcimDir,destDir)
  copy_pix(dcimDir,destDir)

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson