Skip to main content

Add tasks to OmniFocus from Linux

Project description

Command line to OmniFocus script, via email or Dropbox and Hazel

Installation

Using pip

  1. Install as usual from PyPI.

  2. Put a file in your $PATH with your preferred Python version.

    • I’m using /usr/local/bin/ofpy as an example, change OFPY_DEST if needed

  3. Make it executable.

Python3 Example:

pip3 install ofpy

OFPY_DEST=/usr/local/bin/ofpy
OFPY_PATH=$(python3 -c 'import ofpy; print(str(ofpy.__path__[0]) + "/ofpy.py")')

echo "/usr/bin/env python3 $OFPY_PATH" > $OFPY_DEST
chmod u+x $OFPY_DEST

Python2 Example:

pip install ofpy

OFPY_DEST=/usr/local/bin/ofpy
OFPY_PATH=$(python -c "import os; import ofpy; print(os.path.join(os.getcwd(), ofpy.__path__[0], 'ofpy.py'))")

echo "/usr/bin/env python $OFPY_PATH" > $OFPY_DEST
chmod u+x $OFPY_DEST

It should ignore the python3 shebang in ofpy.py if done this way. If not, edit the shebang.

Manually

Download or git clone

cd ofpy/ofpy
chmod u+x ofpy.py
ln -s $PWD/ofpy.py /usr/local/bin/ofpy

Set up to default to Python3 – edit the shebang in ofpy.py if you need Python2.

Configuration

  1. Run ofpy without arguments. You should see a logging message about creating ~/.ofpy_config.

  2. Edit ~/.ofpy_config and fill in your values.

Usage

Inline from the command line.

ofpy "This is my first task."

Inline from the command line without quotes (watch out for apostrophes and quotes)

ofpy This is my second task.

Compose the task in your favorite CLI editor (set in config, defaults to vim).

ofpy

More details at http://n8henrie.com/2014/09/ofpy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ofpy-0.22.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file ofpy-0.22.tar.gz.

File metadata

  • Download URL: ofpy-0.22.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ofpy-0.22.tar.gz
Algorithm Hash digest
SHA256 f7ff9583e46f6e9d58fef85232a0d07c61c6963482526d141033701f77e848c2
MD5 7e035b87f1416f46bdd44b043340fd52
BLAKE2b-256 6a818a982dfa102481ae56a55c3fd1a4ba0ccf0cf2e87754124bee7a20cf4613

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page