Jump to content

jarhead

Member
  • Content Count

    59
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by jarhead

  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.
  15. I really don't see what the problem is. I simply shared MY workflow (per the forum name). It is not hard at all to replace Byword with your editor of choice. You literally replace the text Byword with the name of your editor OR you can modify it to your liking.
  16. I prefer Byword for my Jekyll posts. All other Markdown files I edit via Sublime Text. You can obviously edit it to your liking.
  17. A simple workflow for creating Jekyll content (posts, drafts & pages). Markdown files are created & opened in Byword for editing. Also keywords for running Jekyll locally (including watching for changes) and publishing via rsync. A complete walkthrough available here. Also available on Github.
  18. Thanks Rodger. That did it. My final script... file=$(echo "$( date '+%Y-%m-%d-' ){query}.md" | tr " " "-") touch ~/folder/_posts/"$file" && open -a "Byword" ~/folder/_posts/"$file" And thanks to Tyler as well.
  19. Still learning my way around Terminal so I know I'm missing something. I've tried adding | tr " " "-" after touch ~/folder/_posts/$( date '+%Y-%m-%d-' )"$file" which clearly is not correct. I'm not sure how the echo command would be used here. To have the file opened in my editor, I just had to point it to the path. open -a "Byword" ~/folder/_posts/"$file"
  20. I have a simple bash file to create a new markdown file named with the current date as well as the file name I input via {query} which works correctly... file="{query}".md touch ~/folder/_posts/$( date '+%Y-%m-%d-' )"$file" Is there an easy way to add code to replace spaces in the file name with dashes? Obviously, the date is formatted correctly. It would be so much easier to just type "this is the name of my file" versus "this-is-the-name-of-my-file". Also, how would I then have the file opened in my editor of choice? Usually the following works but for some reason is not. Probably the way I'm referencing $file. open -a "Byword" "$file" Thanks.
  21. You can also setup a Web Search in Alfred to do this. Under Alfred Preferences, select Web Search and then click the Add Custom Search button in the bottom right. In the Search URL: field, enter http://explainshell.com/explain?cmd={query} and click the box next to Encode spaces as +. Add your title, keyword and icon & save your search.
  22. This should work for Chrome... tell application "Google Chrome" set theTitle to title of active tab of first window set theURL to URL of active tab of window 1 end tell
  23. Check out this article over at Nettuts on capturing responsive web pages.
  24. Did you create a list first & then add your add item to the newly created list?
×
×
  • Create New...