Drew Perttula
2004-07-04 09:32:21 UTC
All I want (so far) is to download new photos to my computer, and I have
had a horrible time getting any wxpy to work.
So I wrote the following cmdline program which downloads files
from a phone into a local dir, skipping files that have already been
downloaded. Files are compared by name and date only. (Downloaded files
get their mtime set to the phone's time.)
Also, my Samsung A620 puts a 148-byte header on its jpegs. This program
tests if there's a jpeg after that number of bytes and if there is, it
rewrites the file as a proper jpeg with the header as a jpeg comment.
Now the jpeg is easy to view and the header is still saved in case I
want it someday.
Program help:
% ./phone-xfer -h
usage: phone-xfer [options]
options:
-h, --help show this help message and exit
-v, --verbose enable bitpim logging
-pPORT, --port=PORT phone port, default to /dev/usb/ttyACM0
-P, --progress enable bitpim progress meter
-sPHONEDIR LOCALDIR, --sync=PHONEDIR LOCALDIR
download files from PHONEDIR into LOCALDIR, skipping
files where the local file has a newer time
-t, --tree display all the directories on the phone filesystem
--no-samsung disable jpeg header -> jpeg comment transformation
My usage:
% phone-xfer -P -s digital_cam/jpeg ~/phonecam
Reading digital_cam/jpeg/20040625124622000 [================================================================================>]
Reading digital_cam/jpeg/20040629222543000 [================================================================================>]
Reading digital_cam/jpeg/20040703140753000 [================================================================================>]
Reading digital_cam/jpeg/20040627124737000 [================================================================================>]
%
My software is free, but let's talk about how to coordinate versions
(like, give me cvs) if you want to include it with bitpim.
http://bigast.com/post/phone-xfer
http://bigast.com/post/progress.py
had a horrible time getting any wxpy to work.
So I wrote the following cmdline program which downloads files
from a phone into a local dir, skipping files that have already been
downloaded. Files are compared by name and date only. (Downloaded files
get their mtime set to the phone's time.)
Also, my Samsung A620 puts a 148-byte header on its jpegs. This program
tests if there's a jpeg after that number of bytes and if there is, it
rewrites the file as a proper jpeg with the header as a jpeg comment.
Now the jpeg is easy to view and the header is still saved in case I
want it someday.
Program help:
% ./phone-xfer -h
usage: phone-xfer [options]
options:
-h, --help show this help message and exit
-v, --verbose enable bitpim logging
-pPORT, --port=PORT phone port, default to /dev/usb/ttyACM0
-P, --progress enable bitpim progress meter
-sPHONEDIR LOCALDIR, --sync=PHONEDIR LOCALDIR
download files from PHONEDIR into LOCALDIR, skipping
files where the local file has a newer time
-t, --tree display all the directories on the phone filesystem
--no-samsung disable jpeg header -> jpeg comment transformation
My usage:
% phone-xfer -P -s digital_cam/jpeg ~/phonecam
Reading digital_cam/jpeg/20040625124622000 [================================================================================>]
Reading digital_cam/jpeg/20040629222543000 [================================================================================>]
Reading digital_cam/jpeg/20040703140753000 [================================================================================>]
Reading digital_cam/jpeg/20040627124737000 [================================================================================>]
%
My software is free, but let's talk about how to coordinate versions
(like, give me cvs) if you want to include it with bitpim.
http://bigast.com/post/phone-xfer
http://bigast.com/post/progress.py