The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Logging OmniFocus done items to DayOne through Hazel (http://forums.omnigroup.com/showthread.php?t=27370)

Guus 2013-02-09 02:06 AM

That did the trick! I had a feeling something else had to be done but this shell stuff is new to me. Bit like .bat in Windows ;-)

Thanks again for your help!

Guus

Bill Westwood 2013-02-11 07:43 AM

I cannot seem to get this working. I have DayOne installed & the CLI. I have downloaded the entire script & made it executable (having failed to get it working by embedding it); I have selected it in Hazel. When I complete a task in OF, nothing happens. I have tried running the rule from Hazel and stopping & restarting OF. No DoneToday.txt files have appeared. I don't know what I am doing wrong

RobTrew 2013-02-11 08:12 AM

1 Attachment(s)
[QUOTE=Bill Westwood;120264]I cannot seem to get this working.[/QUOTE]

Might be worth checking whether there are any details of your rule which differ from this:

[IMG]http://forums.omnigroup.com/attachment.php?attachmentid=2712&stc=1&d=1360602675[/IMG]

Also, have you tested the CLI from Terminal.app ?

RobTrew 2013-02-11 08:20 AM

Also, what happens if you run OmniFocusLogDone2DayOne.sh directly from the bash prompt in Terminal.app ?

Any error messages ?

(Assuming you have made it executable with [CODE]chmod +x [I]filepath[/I][/CODE])

Bill Westwood 2013-02-11 08:37 AM

I have made the script executable as per your instructions.
Nothing happens when I try to run it.
My rule is identical except for the title:Log OmniFocus items done today to DayOne
How do I test the CLI?

RobTrew 2013-02-11 08:44 AM

[QUOTE=Bill Westwood;120268]I have made the script executable as per your instructions.
Nothing happens when I try to run it.
My rule is identical except for the title:Log OmniFocus items done today to DayOne
How do I test the CLI?[/QUOTE]


[QUOTE=Bill Westwood;120268]How do I test the CLI?[/QUOTE]
Depending on where you have installed it to, you should be able to use a command line like:
[CODE]/usr/local/bin/dayone[/CODE]

to check that it is running.

What command line did you use to check the script from Terminal.app ?

Did it generate no error messages ? That would indicate that it is essentially running.

Bill Westwood 2013-02-11 08:50 AM

This is the reply generated by entering the code above:

Last login: Mon Feb 11 16:27:34 on ttys000
Bill-Westwoods-MacBook-Pro:~ billwestwood$ /usr/local/bin/dayone
Usage: dayone [-d=<date>] [-s=true|false] [-p=<path>]
[-j=<path>] [-h] <command>
Options:
-d, --date=<date> Creation date of the entry.
-s, --starred=true|false Starred value.
-p, --photo-file=<path> File path to a photo to attach to entry.
-j, --journal-file=<path> Location of Day One Journal file.
-h, --help Show this information.

Commands:
new Adds a new entry using text from stdin

Examples:
dayone new
Waits for you type something and then creates a new entry in the default journal

echo "Hello World" | dayone new
Creates a new entry containing the specified text

dayone new < ~/Desktop/note.txt
Creates a new entry containing the contents of the file note.txt

RobTrew 2013-02-11 08:56 AM

Good, so the CLI is running, and, as before:

[INDENT]What command line did you use to check the script from Terminal.app ?[/INDENT]
Did it generate no error messages ?

(That would indicate that it is essentially running.)

Bill Westwood 2013-02-11 09:30 AM

Sorry, but I don't know how to do that

RobTrew 2013-02-11 11:41 AM

Two stages:
1. Make the .sh file executable
2. Run it from the command line.


[B]Make the .sh file executable[/B][LIST][*]In Terminal.app, type [I]chmod +x[/I] and leave a space after it,[*]drag the .sh file from a Finder window into the Terminal window,[*]hit the enter key to add the x (executable) attribute to the .sh file.[/LIST]
[B]Run it from the command line[/B][LIST][*]Again, drag the .sh file into the Terminal window, to get its full path, and[*]hit the enter key to run it.[*]Make a note of any error messages which appear.[/LIST]


All times are GMT -8. The time now is 02:48 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.