I just got an iPad and I foolishly got the TexTouch application. Foolishly, because due to Apple regulation, TexTouch can't compile Tex. It syncs the .tex file to a computer using Dropbox. On the distant computer, it gets caught by another program that compiles the .tex file to PDF and sends it back. But (surprise!) that distant program in Windows and Mac only. And I'm on Linux. So I thought, why not use inotify? To make things a bit simpler, I actually used pyinotify so I wouldn't have to deal with tons of compilation. BUT when Dropbox drops a file, here are, in pyinotify vernacular, the events that happen. (Obviously, "first doc.tex" is the name of the file I'm syncing.)
event: <Event dir=False mask=0x20 maskname=IN_OPEN name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x1 maskname=IN_ACCESS name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x10 maskname=IN_CLOSE_NOWRITE name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event cookie=151401 dir=False mask=0x40 maskname=IN_MOVED_FROM name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event cookie=151402 dir=False mask=0x80 maskname=IN_MOVED_TO name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x4 maskname=IN_ATTRIB name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x20 maskname=IN_OPEN name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x1 maskname=IN_ACCESS name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x10 maskname=IN_CLOSE_NOWRITE name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x20 maskname=IN_OPEN name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x1 maskname=IN_ACCESS name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x10 maskname=IN_CLOSE_NOWRITE name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x20 maskname=IN_OPEN name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x1 maskname=IN_ACCESS name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x10 maskname=IN_CLOSE_NOWRITE name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x20 maskname=IN_OPEN name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x1 maskname=IN_ACCESS name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
event: <Event dir=False mask=0x10 maskname=IN_CLOSE_NOWRITE name=first doc.tex path=/home/eje211/Dropbox/TexTouch pathname=/home/eje211/Dropbox/TexTouch/first doc.tex wd=1 >
What can I make of that? The only events that appear to be unique are the IN_MOVE_FROM and IN_MOVE_TO events. But it looks like a BAD idea to monitor those. Is there a way to detect an event that is initiated by Dropbox? Should I use something other than inotify or pyinotify?