--- /dev/null
+#!/bin/bash
+
+
+set -x
+TMPDIR="$(mktemp -d)"
+
+
+
+if [ "$0" == "dropbox_to_read" ]; then
+ PDF_FILE=$(bibtex_to_paper --only-print "$1")
+ mkdir -p "$TMPDIR/a"
+ mkdir -p "$TMPDIR/b"
+ cp -l "$PDF_FILE" "$TMPDIR/a/file.pdf";
+ if [ -e "${PDF_FILE}.annot" ]; then
+ cp "$PDF_FILE" "$TMPDIR/b/file.pdf";
+ chmod u+w "$TMPDIR/b/file.pdf"
+ qprint -d "${PDF_FILE}.annot" | patch -d "$TMPDIR/b" --binary;
+ else
+ chmod u+w "$TMPDIR/b/file.pdf"
+ cp "$PDF_FILE" "$TMPDIR/b/file.pdf";
+ fi;
+ cp "$TMPDIR/b/file.pdf" ~/Dropbox/research_papers/to_read/"$(basename "$PDF_FILE")";
+ rm -f "$TMPDIR/a/file.pdf"
+ rm -f "$TMPDIR/b/file.pdf"
+ rmdir "$TMPDIR/a" "$TMPDIR/b" "$TMPDIR"
+fi;
+
+if [ "$0" == "dropbox_read" ]; then
+ echo "Currently not implemented";
+ exit 1;
+fi;