tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit b4d4ef57cf2642fe9f0cccd0a10a5df6d714518b
parent 2cb9ace7dbd7f6dc563c41c14f443436fb5d3a8e
Author: rob <rob@tarina.org>
Date:   Fri, 13 Nov 2020 18:09:36 +0200

backup films now works, if there is a film folder with same name but different filmhash, put _new to end of film folder

Diffstat:
MREADME.md | 1+
Mdocs/tarina-manual.md | 11+++++++++++
Mtarina.py | 23+++++++++++++----------
3 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/README.md b/README.md @@ -29,6 +29,7 @@ Hardware The parts are built around the world by different manufacturers. They've been chosen on the basis of features, quality, openness, availabilty and price. One of the central ideas of the project is to have a camera that could be upgraded or repaired by the fact that you easily just switch a component. The casis of the camera is all 3d printable with a design that has the key element of flipping the lens 180 (gonzo style). Here's the main components: [Raspberry Pi 3](https://www.raspberrypi.org/products/raspberry-pi-3-model-b/)<br> +[Raspberry Pi High Quality Camera](https://www.raspberrypi.org/products/raspberry-pi-high-quality-camera/?resellerType=home) or <br> [Arducam 5 MP OV5647 camera module with CS lens 2718](https://www.ebay.com/itm/OV5647-Camera-Board-w-CS-mount-Lens-for-Raspberry-Pi-3-B-B-2-Model-B-/281212355128?txnId=1913825600018)<br> [3.5 inch 800x480 TFT Screen](https://www.aliexpress.com/store/product/U-Geek-Raspberry-Pi-3-5-inch-800-480-TFT-Screen-HD-HighSpeed-LCD-Module-3/1954241_32672157641.html)<br> [USB via vt1620a Sound card](https://www.aliexpress.com/item/Professional-External-USB-Sound-Card-Adapter-Virtual-7-1-Channel-3D-Audio-with-3-5mm-Headset/32588038556.html?spm=2114.01010208.8.8.E8ZKLB)<br> diff --git a/docs/tarina-manual.md b/docs/tarina-manual.md @@ -151,6 +151,17 @@ This is a good performance card. [Aliexpress](https://www.aliexpress.com/item/32676225311.html?spm=a2g0o.productlist.0.0.11ed1b664kPdEf&algo_pvid=d9155fff-7ddc-47bb-9512-f7e686fe69ac&algo_expid=d9155fff-7ddc-47bb-9512-f7e686fe69ac-0&btsid=e2f36205-1c37-47bc-9a94-c006837f0992&ws_ab_test=searchweb0_0,searchweb201602_7,searchweb201603_55) +Raspberry Pi High Quality Camera (recommended) +---------------------------------------------- +Price ~60 eur + +This is the recommended camera module for Tarina, 12.3 megapixel Sony IMX477 sensor, 7.9mm diagonal image size, and back-illuminated sensor architecture, with adjustable back focus and support for C- and CS-mount lenses. + +**Links** +**Buy** +[Raspberry pi](https://www.raspberrypi.org/products/raspberry-pi-high-quality-camera/?resellerType=home) + + Arducam 5 MP OV5647 camera module with CS lens ---------------------------------------------- Price ~30 eur diff --git a/tarina.py b/tarina.py @@ -2375,28 +2375,28 @@ def copytousb(filmfolder): try: p = subprocess.check_output('stat -f -c %T /media/usb0', shell=True) filesystem = p.decode() - print(filesystem) + print('filesystem info: ' + filesystem) except: writemessage('Oh-no! dont know your filesystem') waitforanykey() return for filmname in films: #check filmhash - usbpath = 'media/usb0/tarinafilms/'+filmname + filmname = filmname[0] + usbpath = '/media/usb0/tarinafilms/'+filmname usbfilmhash = '' filmhash = '' - subsequentfilm = 1 while True: if os.path.exists(usbpath) == False: break try: - with open(filmfolder + filmname + '.videohash', 'r') as f: + with open(filmfolder + filmname + '/.filmhash', 'r') as f: filmhash = f.readline().strip() print('filmhash is: ' + filmhash) except: print('no filmhash found!') try: - with open(usbpath + '.videohash', 'r') as f: + with open(usbpath + '/.filmhash', 'r') as f: usbfilmhash = f.readline().strip() print('usbfilmhash is: ' + usbfilmhash) except: @@ -2404,15 +2404,18 @@ def copytousb(filmfolder): if usbfilmhash == filmhash: print('same moviefilm found, updating clips...') break - subsequentfilm += 1 - usbpath += str(subsequentfilm).zfill(3) + else: + writemessage('Found a subsequent moviefilm...') + print('same film exist with different filmhashes, copying to subsequent film folder') + time.sleep(2) + usbpath += '_new' try: os.makedirs(usbpath) - writemessage('Copying film ' + filmname) + writemessage('Copying film ' + filmname + '...') except: - writemessage('Updating existing film ' + filmname) + writemessage('Found existing ' + filmname + ', copying new files... ') try: - run_command('rsync -avr -P ' + filmfolder + filmname + ' /media/usb0/tarinafilms/' + filmname) + run_command('rsync -avr -P ' + filmfolder + filmname + '/ ' + usbpath) except: writemessage('couldnt copy film ' + filmname) waitforanykey()