Jump to content

senecando

Member
  • Posts

    11
  • Joined

  • Last visited

senecando's Achievements

Helping Hand

Helping Hand (3/5)

3

Reputation

  1. Can you give me an example of something that isn't working? I imagine it has to do with quotes or other symbols that screw with the CLI.
  2. Hey all! It's been a while, but I've just made two smallish updates: * You can now choose either Safari or Chrome and it'll sort it out for you. Set browser to "Chrome" at the top * The extension no longer requires Brett's Ruby script. This may be a step backwards for functionality (not for how I imagine most people to use it), but it'll make it much easier to set up. If this causes any one any trouble, let me know and I'll try to sort it out! Thanks folks!
  3. Not off the top of my head. I don't know enough about Chrome's applescript support. It should be doable. You'll just have to rework this block in the applescript attached to the lw command: tell application "Safari" set theTitle to name of front document set theURL to URL of front document end tell Let me know if you get something to work.
  4. I use dropbox as well and it is working for me. Have you installed the Day One CLI tools from their website?
  5. If you have this extension and the necessary scripts installed, using "log" and then your text will do just that. Alternatively, if you do not want to download Brett's script, and want to just use the CLI, create a workflow: Keyword → Terminal Action ("echo "{query}" | dayone new") → Notification The main problem with this is that it throws up a terminal window, which isn't ideal.
  6. 2013-04-15b: Added a notification letting using know that the script ran successfully. Requested here. Twinpeaks, does this work for you? JV
  7. Another update: 2013-04-15:Added lwq and lwq!, which add a link and any text in your clipboard as a quote. Added an easier way to change the text separating the link and comment. Added images to the readme.
  8. Hola Mr. Nickwild. I think, at some point, I'll make it easier to change this. But for the time being, you can replace the hypens you see in the applescript with \n\n and that will separate your comment and the link with a new line. Is that what you mean? Here is what my script looks like afterwards: on alfred_script(q) -- Set the location of the Script set scriptLocation to "/Users/johnvining/Dropbox/scripts/logtodayone.rb" -- Set what comes before the link in your entry set prefix to "Reading: " tell application "Safari" set theTitle to name of front document set theURL to URL of front document end tell if q is equal to "" set urlStr to prefix & "[" & theTitle & "](" & theURL & ")" do shell script scriptLocation & " \"" & urlStr & "\"" else if character 1 of q is equal to "!" # Starred Entries if q is equal to "!" set urlStr to "!" & prefix & "[" & theTitle & "](" & theURL & ")" do shell script scriptLocation & " \"" & urlStr & "\"" else set urlStr to "!" & prefix & "[" & theTitle & "](" & theURL & ") \n\n " set croppedQ to text 2 through -1 of q do shell script scriptLocation & " \"" & urlStr & croppedQ & "\"" end if else set urlStr to prefix & "[" & theTitle & "](" & theURL & ") \n\n " do shell script scriptLocation & " \"" & urlStr & q & "\"" end if end alfred_script In the next version I'll include an easier way to change the text between the link and your comment. This is what I get: -- JV
  9. I'll add that to a list of things to look into. It seems difficult so far, since I'd have to see first if the Day One CLI gives anything back to the script.rb that is running it, and how I could grab that myself. I'm not sure. Any one have any ideas?
  10. I've updated the commands a bit to make more sense and to allow for starring entries: log logs to Day One. This can use the time and starring syntax outlined here. lw, "log web", logs the frontmost website and title as a link: Reading: Pulled pork - Wikipedia, the free encyclopedia lw delicious! does the same, but with a comment: Reading: Meatloaf - Wikipedia, the free encyclopedia - delicious! lw! does the same as above as a starred entry. It's updated at Git Hub and can be found here: https://github.com/senecando/Day-One-Alfred-Tools Let me know if anyone has any ideas or questions!
  11. Day One Alfred Tools This started out as something for myself, but it looks like there is some interest (and it was just mentioned on MPU), so I thought I'd clean up this page a bit. Please let me know how things are working and if there are any features you'd like to see. Thanks! It can be downloaded on Git Hub by clicking on the workflow and selecting "view raw": https://github.com/senecando/Day-One-Alfred-Tools The README is below, but I find it's a bit easier to read at the Git Hub link above. What it needs At this point, this Alfred Workflow requires: The Day One CLI Brett Terpstra’s logtodayone.rb script, found here That you’re using Safari When you first import it, you will want to: Change the location of logtodayone.rb in the log script Change the location of logtodayone.rb in the lw script Change, if you’d like, the variables for formatting in the lw scriptprefix: What comes before a link. Default is Reading: separator: What separates a link and a comment. Default is -. Change to \n\n if you would like the comment to be on a separate line. quoteSeparator: What separates a link and a quote. Default is :\n\n>. What it doeslog logs to Day One. This can use the time and starring syntax outlined here. lw and lw!– “log web” – log the frontmost website and title as a link. lw!creates a starred entry. lw comment and lw! comment do the same, but with a comment. lwq and lwq! create an entry with a link and the text on the clipboard as a quote. Errors: Everything worked out unless You got a notification with just a title and no text. You got a notification with a title and an error. You didn’t get a notification. What it doesn’t do yet Features Add a lwq comment function. Create an easier way to change the location of logtodayone.rb in each of the scripts, preferably through Alfred itself. Combine the log and lw scripts. Add support for Chrome and Firefox. Incorporate Terpstra’s time functions in the web-logging commands. BugsTick marks don’t work. When the script can’t get to Safari, it fails silently. What’s changed 2013–04–15b: Added a notification letting using know that the script ran successfully. Requested here.2013–04–15a:Added lwq and lwq!, which add a link and any text in your clipboard as a quote. Added an easier way to change the text separating the link and comment. Requested here. Added images to the readme.
×
×
  • Create New...