通过wifi快速同步单反照片到Android手机——使用Airnef Python脚本

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lylwo317/article/details/86538465

前言

本人使用的是尼康D750,自带wifi功能,奈何配套的Android App太难用了,至于怎么难用,我这里就不细说了,用过的都懂。总不能白瞎了wifi功能吧。找了一阵子发现了两个第三方通过逆向工程制作的工具。一个是qDslrDashboard这个app,功能很强大,可以通过手机控制相机,也可以浏览下载相机的照片,还可以协助拍摄延时摄影。另一个就是Airnef,一个python脚本,对PC有封装gui。实现照片拷贝下载,将制定时间点之后的照片下载下来,不会重复下载已删除的照片,可以实时同步拍摄照片。这些都是我最急需的功能。所以我就通过Termux搭建python环境来运行Airnef

上面介绍的两个工具索尼和佳能带有wifi功能的相机也能使用

这样我在手机上就非常轻松的实现了同步单反中jpeg照片功能。这里简单的做一下使用介绍

1. 使用Termux搭建Python运行环境

网上有很多文章了,我就不重复了。谷歌或者百度就可以解决了

2. 下载解压Airnef到Android手机中

下载地址:http://www.testcams.com/airnef/Version_1.1/airnef_v1.1_Source.zip
我将脚本放在 /sdcard/qpython/scripts/airnef/airnefcmd.py

3. 运行脚本

python /sdcard/qpython/scripts/airnef/airnefcmd.py -h
查看帮助

4. 使用别名简化脚本使用

.zshrc 文件中加入


#获取今天的日期,这里只拷贝今天的
date=date +'%m/%d/%y'

alias airnef_realtime="python /sdcard/qpython/scripts/airnef/airnefcmd.py --action getfiles --ipaddress 192.168.1.1 --realtimedownload only --logginglevel normal --extlist NEF JPG --outputdir /sdcard/DCIM/NIKON --ifexists skip --slot second --transferorder oldestfirst --startdate ${date} --cameratransferlist ignore --downloadexec sh /sdcard/qpython/scripts/airnef/previewImage.sh \"@pf@\""

alias airnef_copy="python /sdcard/qpython/scripts/airnef/airnefcmd.py --action getfiles --ipaddress 192.168.1.1 --realtimedownload disabled --logginglevel normal --extlist NEF JPG --outputdir /sdcard/DCIM/NIKON --ifexists skip --slot second --transferorder oldestfirst --startdate ${date} --cameratransferlist ignore"

alias airnef_copy_and_realtime="airnef_copy && airnef_realtime"

实现图片预览的脚本
/sdcard/qpython/scripts/airnef/previewImage.sh

#!/system/bin/sh

echo "Preview Image"

am start -a android.intent.action.VIEW -t image/jpeg -d file://$1

猜你喜欢

转载自blog.csdn.net/lylwo317/article/details/86538465