Jump to content

jarhead

Member
  • Posts

    59
  • Joined

  • Last visited

  • Days Won

    1

jarhead last won the day on February 25 2015

jarhead had the most liked content!

Contact Methods

  • Twitter
    http://twitter.com/jarhead

Profile Information

  • Location
    Nashville, TN

Recent Profile Visitors

1,229 profile views

jarhead's Achievements

Member

Member (4/5)

9

Reputation

  1. Strange. I'm running Sierra and it works perfectly.
  2. You don't need to go to tinypng_config in the workflow... just start typing tiny into Alfred and you will be provided with three options. One option will be "Enter/Change API Key". Choose this option and it will prompt for your API key. Paste your key, hit return and you should be good to go.
  3. See Carlos' post above regarding upgrading for Alfred 3... http://www.alfredforum.com/topic/3922-screenshots-11-capture-save-to-dropbox-get-link-and-manage-files-and-past-links/page-2#entry43776
  4. Figured this out playing with further. Thanks. Missed the obvious.
  5. Thanks David. Using $ctyw works... kind of. Adding a Large Text output shows that it is only sending http and not the entire website. Tried putting the website in quotes and single quotes unsuccessfully.
  6. I'm attempting to setup a workflow that allows you to enter a county name and then hit the Enter key to open the website assigned to that county. I have the terms along with their corresponding websites stored in a text file and separated by a colon like the following example: Anderson County:http://www.assessment.cot.tn.gov/re_assessment/SelectCounty.aspx?map=true&SelectCounty=001 Davidson County:http://www.padctn.org/prc/#/search/1 Hickman County:http://hickman.capturecama.com I have the following Input Script Filter setup but cannot figure out how to launch the website. I've tried using both an Open URL action and Run Script action with no luck. IFS=$'\n' match=($(grep -i {query} counties.txt)) echo '<?xml version="1.0"?>' echo '<items>' echo '' for i in ${match[@]}; do tncty=($(echo "$i" | cut -d\: -f1)) ctyw=($(echo "$i" | cut -d\: -f2)) echo "<item arg=\"$tncty\" valid=\"yes\">" echo "<title>$tncty Property Records</title>" echo "<subtitle>Enter → Search $tncty Property Records</subtitle>" echo "<icon>search.png</icon></item>" echo "" done echo "</items>" Any point in the right direction would be appreciated. Thanks.
  7. Workflow works great except for `td t`... I would submit the workflow at Packal.
  8. I noticed from the youtube-dl readme file, as of April 26, 2015, youtube-dl uses -f bestvideo+bestaudio/best as the default. Is there a way to tell if the workflow is using the most current version of youtube-dl? Thanks.
  9. Per Scott's suggestion, adding -f 137/22/18/17 to the workflow got rid of the numbered versions and the workflow is now working correctly.
  10. Fantastic workflow (not surprising really coming from you Vitor)... I'm having an issue where I followed the steps to keep video & audio and it works. For some reason, it creates a second version of both the video & audio. For example, using the workflow, it downloaded a video called "Best DIY GoPro Mounts.mp4"... it also created another version entitled "Best DIY GoPro Mounts.f136.mp4". It does the same with the audio... two m4a versions one including .f141.m4a. I just added --extract-audio --keep-video --quiet The script I'm using for dv following the instructions... export PATH="/usr/local/bin:$PATH" # deal with special characters export LANG=en_GB.UTF-8 IFS=$'\n' # set notifications notification() { ./_licensed/terminal-notifier/terminal-notifier.app/Contents/MacOS/terminal-notifier -title "DownVid" -message "${1}" } # update youtube-dl if it's more than 15 days old if [[ $(find youtube-dl -mtime +15) ]]; then python youtube-dl --update fi gettitle() { # file location filename=$(python youtube-dl --no-playlist --extract-audio --keep-video --quiet --output "${downdir}/%(title)s.%(ext)s" --get-filename "${link}") # title title=$(basename ${filename%.*}) # check if url is valid if [[ -z "${filename}" ]]; then notification "The url is invalid" exit 1 else notification "Downloading “${title}”" fi } getfile() { progressfile="/tmp/downvidprogress" python youtube-dl --no-playlist --extract-audio --keep-video --quiet --newline --output "${downdir}/%(title)s.%(ext)s" "${link}" > "${progressfile}" # add metadata xmlencodedurl=$(echo "${link}" | perl -MHTML::Entities -CS -pe'$_ = encode_entities($_, q{&<>"'\''})') xattr -w com.apple.metadata:kMDItemWhereFroms '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><array><string>'"${xmlencodedurl}"'</string></array></plist>' "${filename}" rm "${progressfile}" } # download printf "{query}" > "/tmp/downvidcurrentquery" if [[ "{query}" == "addToWatchList"* ]]; then link=$(cat "$(echo {query} | sed 's/addToWatchList //')") downdir="${HOME}/Downloads" gettitle getfile osascript -e "tell application \"Alfred 2\" to run trigger \"add_to_watchlist\" in workflow \"com.vitorgalvao.alfred.watchlist\" with argument \"${filename}\"" else link="$(cat {query})" downdir="${HOME}/Desktop" gettitle getfile fi notification "Downloaded “${title}”"
  11. Still does not work if I remove the javascript: portion. Chrome console references the following: Uncaught ReferenceError: ajaxurl is not defined That is in reference to some portion of jQuery being used in the Wordpress theme and not the bookmarklet javascript being run. I can just keep running the bookmarklet from my bookmarks bar since I run everything else using your workflow. Just wasn't sure if you new of a fix. Thanks.
  12. Hey Vitor- Use this workflow daily. Thanks. I've run into an error with one bookmarklet that I use to post to Wordpress. The Linkmarklet Wordpress plugin generates a bookmarklet depending on the options selected in the plugin. The javascript generated looks like this: javascript:var d%3Ddocument,w%3Dwindow,e%3Dw.getSelection,k%3Dd.getSelection,x%3Dd.selection,s%3D(e%3Fe():(k)%3Fk():(x%3Fx.createRange().text:0)),f%3D%27http://prodougtivity.com/wp-content/plugins/linkmarklet%27,l%3Dd.location,e%3DencodeURIComponent,u%3Df%2B%27%3Fu%3D%27%2Be(l.href.replace(new RegExp(%27(https%3F:%5C/%5C/)%27,%27gm%27),%27%27))%2B%27%26t%3D%27%2Be(d.title)%2B%27%26s%3D%27%2Be(s)%2B%27%26v%3D4%26m%3D%27%2B(((l.href).indexOf(%27https://%27,0)%3D%3D%3D0)%3F1:0)%3Ba%3Dfunction()%7Bif(!w.open(u,%27t%27,%27toolbar%3D0,resizable%3D1,scrollbars%3D1,status%3D1,width%3D720,height%3D570%27))l.href%3Du%3B%7D%3Bif (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0)%3B else a()%3Bvoid(0) And when run through your _cleanbookmarklet script: javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://prodougtivity.com/wp-content/plugins/linkmarklet',l=d.location,e=encodeURIComponent,u=f+'?u='+e(l.href.replace(new RegExp('(https?:\/\/)','gm'),''))+'&t='+e(d.title)+'&s='+e(s)+'&v=4&m='+(((l.href).indexOf('https://',0)===0)?1:0);a=function(){if(!w.open(u,'t','toolbar=0,resizable=1,scrollbars=1,status=1,width=720,height=570'))l.href=u;};if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else a();void(0) Tried it with both Chrome & Safari unsuccessfully using your bookmarklet workflow. When running from bookmarks bar, the bookmarklet generates a new window with information pre-filled like so: Any ideas? Thanks.
  13. EDIT: A more thorough write-up can be found here... While attempting to find ways to implement Alfred Remote into my workflow, I learned that Photoshop supports Applescript (can't believe it took me this long to find out). Combining Alfred Remote & Photoshop is cool. Among other things, you can launch Photoshop Actions. As an example, I use Photoshop actions to highlight portions of a document and then create a tear effect that I use in Keynote presentations. Before, I had to remember the keyboard shortcuts I assigned to the various actions and run them at various times. This worked okay. Now, with Alfred Remote, it is a much easier process. I can make a selection (or selections) using the marquee tool in Photoshop and with the press of a button in Alfred Remote, the selection is highlighted. I then begin the tear effect action. I can then apply a brush to the top, left, right and bottom each with a separate button. I have buttons for decreasing and increasing brush size (although I still primarily use the bracket keys) and a final action that saves the image to my desktop and closes it in Photoshop. Example Applescript for running an action in Photoshop... on alfred_script() tell application "Adobe Photoshop CC 2014" do action "cool action" from "Main Action" end tell end alfred_script Example Applescript for pressing a key on the keyboard (left bracket key)... on alfred_script() tell application "Adobe Photoshop CC 2014" tell application "System Events" to key code 30 end tell end alfred_script Now, using my left hand, I run the various actions from Alfred Remote on my iPhone/iPad while applying the brushes with my right hand using my mouse/trackpad. I've used this setup to the point that I can do it all without looking at my iPhone/iPad to press buttons. Video demonstration (I performed the actions slower in the video so the button presses in Alfred Remote can be seen)...
  14. For those having issues, download this version of the workflow: New OmniFocus Inbox Task.alfredworkflow It is the same version provided by khit but with the modified Applescript provided above. If you still encounter issues, make sure to delete the prior version of the workflow before installing this version.
×
×
  • Create New...