Jump to content

psicologo

Member
  • Posts

    18
  • Joined

  • Last visited

Everything posted by psicologo

  1. I heavily used a New File workflow to create a new file (default is txt) with a simple command. It stopped working after the latest Mac OS update. Anyone have an idea of how it might be updated to work? It looks like it runs two scripts (see screenshot), but that's beyond my ability to comprehend/fix the first one dir_path="$(osascript -l JavaScript -e ' const frontmost_app_name = Application("System Events").applicationProcesses.where({ frontmost: true }).name()[0] if (frontmost_app_name === "Finder") { decodeURI(Application("Finder").insertionLocation().url()).slice(7).slice(0, -1) } else if(frontmost_app_name === "Path Finder") { decodeURI(Application("Path Finder").finderWindows[0].target.url()).slice(7).slice(0, -1) } else { decodeURI(Application("Finder").desktop.url()).slice(7).slice(0, -1) } ')" IFS=$'/\n' for file in ${@}; do file_extension="$([[ "${file}" == *.* ]] && echo ".${file##*.}" || echo '')" file_no_extension="${file%.*}" [[ -z "${file_extension}" ]] && file_extension=".txt" file_location="${dir_path}/${file_no_extension}${file_extension}" touch "${file_location}" if [[ "${open_files}" == 'yes' ]]; then open "${file_location}"; fi done the second one # THESE VARIABLES MUST BE SET. SEE THE ONEUPDATER README FOR AN EXPLANATION OF EACH. readonly remote_info_plist="https://raw.githubusercontent.com/vitorgalvao/alfred-workflows/master/${alfred_workflow_name}/source/info.plist" readonly workflow_url="https://raw.githubusercontent.com/vitorgalvao/alfred-workflows/master/${alfred_workflow_name}/${alfred_workflow_name}.alfredworkflow" readonly download_type='direct' readonly frequency_check='4' # FROM HERE ON, CODE SHOULD BE LEFT UNTOUCHED! function abort { echo "${1}" >&2 exit 1 } function url_exists { curl --silent --location --output /dev/null --fail --range 0-0 "${1}" } function notification { readonly local notificator="$(find . -type d -name 'Notificator.app')" if [[ -n "${notificator}" ]]; then "${notificator}/Contents/Resources/Scripts/notificator" --message "${1}" --title "${alfred_workflow_name}" --subtitle 'A new version is available' return fi readonly local terminal_notifier="$(find . -type f -name 'terminal-notifier')" if [[ -n "${terminal_notifier}" ]]; then "${terminal_notifier}" -title "${alfred_workflow_name}" -subtitle 'A new version is available' -message "${1}" return fi osascript -e "display notification \"${1}\" with title \"${alfred_workflow_name}\" subtitle \"A new version is available\"" } # Local sanity checks readonly local_info_plist='info.plist' readonly local_version="$(/usr/libexec/PlistBuddy -c 'print version' "${local_info_plist}")" [[ -n "${local_version}" ]] || abort 'You need to set a workflow version in the configuration sheet.' [[ "${download_type}" =~ ^(direct|page|github_release)$ ]] || abort "'download_type' (${download_type}) needs to be one of 'direct', 'page', or 'github_release'." [[ "${frequency_check}" =~ ^[0-9]+$ ]] || abort "'frequency_check' (${frequency_check}) needs to be a number." # Check for updates if [[ $(find "${local_info_plist}" -mtime +"${frequency_check}"d) ]]; then if ! url_exists "${remote_info_plist}"; then abort "'remote_info_plist' (${remote_info_plist}) appears to not be reachable."; fi # Remote sanity check readonly tmp_file="$(mktemp)" curl --silent --location --output "${tmp_file}" "${remote_info_plist}" readonly remote_version="$(/usr/libexec/PlistBuddy -c 'print version' "${tmp_file}")" if [[ "${local_version}" == "${remote_version}" ]]; then touch "${local_info_plist}" # Reset timer by touching local file exit 0 fi if [[ "${download_type}" == 'page' ]]; then notification 'Opening download page…' open "${workflow_url}" exit 0 fi download_url="$([[ "${download_type}" == 'github_release' ]] && curl --silent "https://api.github.com/repos/${workflow_url}/releases/latest" | grep 'browser_download_url' | head -1 | sed -E 's/.*browser_download_url": "(.*)"/\1/' || echo "${workflow_url}")" if url_exists "${download_url}"; then notification 'Downloading and installing…' curl --silent --location --output "${HOME}/Downloads/${alfred_workflow_name}.alfredworkflow" "${download_url}" open "${HOME}/Downloads/${alfred_workflow_name}.alfredworkflow" else abort "'workflow_url' (${download_url}) appears to not be reachable." fi fi
  2. any chance there might be an update? It's empty when opened
  3. Sorry to ask, but would you mind providing a bit more detail? https://github.com/zhaocai/alfred2-keylue-workflow/issues/4 I was able to install bundlr, but I'm not sure how to do step 1- open the workflow. For future Googlers, the steps read: * open the workflow in terminal * make sure you have `bundler` installed - http://bundler.io/ * in the workflow directory run `bundle install --standalone` which installs the `2.3.0` gems in `bundle/ruby/2.3.0`. * 💵
  4. Hi all, Might anyone have a textexpander workflow they're willing to share? I'm sticking with textexpander for now since I also use it on iOS. I found one from 2015 that seems broken https://github.com/ramiroaraujo/alfred-textexpander-workflow
  5. By unformatted I didn’t mean not formatted in the citation style. That’s working fine. I’ll look into it a bit more so I can better describe what I meant.
  6. Nevermind, I do get an error as soon as I type anything after "bc" [2019-02-01 20:33:15][ERROR: input.scriptfilter] Code 1: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- alfred (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from ./main.rb:8:in `<main>'
  7. I think I've set it up correctly, but when I type "bc" no projects pop up. Starting to type the name of the project doesn't show the project. In the screenshot on the GitHub website I noticed you wrote "WO" after "bc" to get the projects show. Any tips? I'd appreciate help. What I've tried: 1. the address i received is https://3.basecamp.com/XXXXXX/ I removed the "3" 2. I tried this, no errors showed @grantholle Try putting your variables in quotes like this: basecamp_username="xxxxxx". If that doesn't work, try this for me: open Alfred preferences click on the Basecamp workflow click the little bug in the top right corner to bring up the debug panel run "bc " see if it puts out any errors and post them here
  8. It's great that you took the time to work on this considering you're not using it! If I knew how to code I might give it a try, but it's beyond my abilities and what I have time to learn (at least for now). Out of curiosity, how much coding does this require? Given that you did this more or less for fun, I think tackling this may be more of a hassle than it's worth. Let's see if I can explain the request in a bit more detail. When you install Zotero, it installs a plugin in Microsoft Word that you can use to insert citations. The citations inserted by Zotero have embedded code. The "add bibliography" button gets Zotero to "read" all the citations throughout the text to automatically generate a full bibliography. The nice thing about this is that you can delete or add new citations in your text to modify your bibliography to reflect your changes. The Alfred workflow inserts the unformatted text into the document. This text cannot be read by the zotero plugins. Your plugin is much faster than Zotero's own word plugin at searching. I just returned to using Zotero, so I may be wrong, but I think I used to be able to insert unformatted references and then you could have zotero process the citations in whichever citation style I wanted. I can't seem to find an option for that. For example, in Papers (another similar piece of software) I can choose to insert unformatted software (for example {Ruvalcaba:2015hk} )and then reformat the document to APA style. I found this link of someone explaining unformatted citations better than I https://forums.zotero.org/discussion/4772/unformatted-entry-a-la-endnote
  9. Hi Deanishe This is awesome! Thank you so much for all the work you've done on this Worklfow. I was hoping you could help me with one thing. I looked over the readme and GitHub to try and answer my question, but is there a way to insert the citation in a way that Zotero can read? This would be helpful in terms of generating bibliographies based on existing citations in the papers. No worries if this is not an option (I'm not even sure if it's possible).
  10. I git this error, can anyone offer guidance on this? [2018-02-25 01:52:36][ERROR: input.scriptfilter] Code 1: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- alfred (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from ./main.rb:8:in `<main>' [2018-02-25 01:52:36][ERROR: input.scriptfilter] Code 1: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- alfred (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from ./main.rb:8:in `<main>' [2018-02-25 01:52:36][ERROR: input.scriptfilter] Code 1: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- alfred (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from ./main.rb:8:in `<main>'
  11. Hi everyone, I tried searching for a solution to this issue. It seems like the type of thing people would talk about since it's happened to me in a few workflows and seems like a common thing I run into, but I'm not quite sure how to describe the problem. So when using this wokflow http://www.packal.org/workflow/reminders alfred always defaults to google search when I try to use it. I call up Alfred using my shortcut, then I type "ra" and the add to reminders workflow does show up (see screenshot), but as soon as I navigate to it and press enter it defaults to a search. Same thing happens if I type out the whole thing then press space. Any ideas what may be happening? Is this an older workflow that needs to be updated or am I doing something wrong? Are there any threads that might be helpful? I'd appreciate any help. I'm on macOS Sierra 10.12.6 (not sure if this helps)
  12. Sorry to resurrect this old post, but does anyone have this workflow or an alternative that does the same thing?
  13. I made this simple, but useful, workflow to help me search for social science articles. It search jstor, google scholar, and Taylor and Francis online. It's probably only useful to people in the social sciences and if you have access to the journals through a university. SS SEARCH DOWNLOAD Instructions: 1. install workflow 2. change your shortcut 3. Highlight author or title or article reference and press your shortcut 3 tabs will pop up with a search for whatever you highlighted on jstor, google scholar, and t and f. Hopefully some ppl find this useful. I use it when reading articles and I want to look up a citations or more publications by an author. I borrowed from Corentin Cras-Méneur's Jstor's workflow and Rud Faden's google scholar search workflow.
  14. Ahh yeah, I was worried about that. I usually access those links on campus (since I live in family student housing) so it automatically logs me in. I doubt they'd share any information freely. When you click on those links, you does it even let you search? thanks for pointing that out -Omar
  15. Hi everyone, I need some help figuring out how to have Alfred search 4 academic data bases based on text i've highlighted. Usually, when I'm reading a research article I like up an author or a referenced article/book. Sometimes I have to go through several search engines one by one until I find the paper. I was able to figure out how to do google scholar and jstor based on some previously released workflows (using hotkeys and open url)... but have no idea how to do these 2 following serch engines. http://search.proquest.com/psycinfo/ http://search.proquest.com/eric/ Does anyone have an idea of how to figure out the search syntax? For example for google scholar it's http://scholar.google.dk/scholar?hl=en&q={query} I'd appreciate the help. I know enough to realize that my highlighted text gets replaced in the "query" section of the syntax... but that's as far as my knowledge of this stuff goes. I'd appreciate the help and plan to share the final workflow.
  16. Has anyone had any luck updating this workflow to get the in Alfred functions working? I was able to get some features working thanks to saggymac, but wasn't able to make the other suggested changes (if it can't open in textwrangler or a text app then I'm lost).
×
×
  • Create New...