
Bhishan
Member-
Content Count
137 -
Joined
-
Last visited
Content Type
Profiles
Forums
Articles
Media Demo
Everything posted by Bhishan
-
@vitor Thanks, it worked, but partially. The workflow I tested: I also tried to put ` inside the bracket [`>.\s] but it did not work. Many many python tutorials are given in the following format: For example:, https://docs.python.org/2/library/collections.html Original text to copy: >>> # Tally occurrences of words in a list >>> cnt = Counter() >>> for word in ['red', 'blue', 'red', 'green', 'blue', 'blue']: ... cnt[word] += 1 >>> cnt Counter({'blue': 3, 'red':
-
Alfred workflow to send email if battery is less than x %
Bhishan replied to Bhishan's topic in Workflow Help & Questions
@deanishe Thanks for clarification and apologies for wording. -
Edit with… 4.0 for Alfred 3: A QuickCursor alternative
Bhishan replied to Carlos-Sz's topic in Share your Workflows
I liked the workflow, but, sadly it did not work in my machine. Info: Macos 10.13.4 (mac os high sierra) date: May 21, 2018 Usage: selected some text, go to alfred and type editwith Then type Notes.app Then nothing happens, it DOES NOT open notes.app with the selected text. similarly, it does not work with any app. Has anybody used this workflow on High Sierra ?- 75 replies
-
- quickcursor
- markdown
-
(and 1 more)
Tagged with:
-
I have created top 20 most anticipated Hollywood movies of 2018. Scroll down to see the movies other than first 9 movies. We can see how many days until the movies. Also, we can click the SHIFT button to see the QuickView of Wikipedia. The workflow is shared on github. We can add and edit the workflow easily. Enjoy the movies and enjoy the workflow!
-
Is it possible to write an Alfred workflow to turn off wifi after the certain time?
-
There is an excellent tutorial about Alfred Script Filter creation explained in this link. Its so easy to create args in that workflow, but how can we use the arguments passed into the script filter in other actions in the same workflow? In the shared workflow, how can we use the variable "Alfred" ? The workflow is shared in github.
-
The last bash script in the workflow has following code: query=$1 if [ $query = "hide" ]; then defaults write com.apple.Dock autohide -bool TRUE; killall Dock fi if [ $query = "show" ]; then defaults write com.apple.Dock autohide -bool FALSE; killall Dock fi Can we refactor this code so that it would look nicer, and still works on Alfred? My attempt was this, but it did not work: [[ "${1}" == 'var_show' ]] && defaults write com.apple.Dock autohide -bool FALSE; killall Dock [[ "${1}" == 'var_hide' ]] &&
-
@vitor Thanks a lot. It works now. But, can we change the bash script like this: # Wanted version [[ "${1}" == 'var_show' ]] && defaults write com.apple.Dock autohide -bool FALSE; killall Dock [[ "${1}" == 'var_hide' ]] && defaults write com.apple.Dock autohide -bool TRUE; killall Dock # Ugly but working version: query=$1 if [ $query = "hide" ]; then defaults write com.apple.Dock autohide -bool TRUE; killall Dock fi if [ $query = "show" ]; then defaults write com.apple.Dock autohide -bool FALSE; killall Dock fi
-
@vitor I deleted the redundant python script, but this still does not work. The List Filter is giving problem, If I delete LIST FILTER the script works, but I want to keep it. Is there any way I keep the list filter and when we click on "Hide" on list filter, it will hide the dock ? The updated link is shared here.
-
I have created an Alfred workflow to show the number of days until some events. We can add any number of events to our taste and also define some other commands such that if we click "FIFA" in this workflow it will show the 2018 Russia Worldcup Schedule. We can find the workflow in my github Days Until Events . Usage: Double-click the downloaded file and click on [x] to see the description how to use this. # Usage: Click on FIFA button to see the worldcup schedule (The time is EST USA). Note: you can download the schedule of your time-zone
-
Regex - Run and save regular expressions!
Bhishan replied to Matthew Lancellotti's topic in Share your Workflows
How to use this workflow ? In Alfred 3, I tried "regex tr/that/this" It gives error: Could not open your RegexSequences.pl file. -
How to run only specific actions from a List Filter ?
Bhishan replied to Bhishan's topic in Workflow Help & Questions
@vitor Apologies for that, I have updated the question. Is it possible to use {arg} to run the selected action from list action, in above workflow? -
@deanishe Thanks for the reference. That's a great article, but unfortunately, there is no example workflow to execute the theory explained. Feature Request: If there are some simple example workflow it would be great and a lot of new users will benefit from them. I tried to follow exactly the instruction and printed given format in python, but to no avail: import sys output = """ {"alfredworkflow:" { "arg": "https://www.google.com", "variables": {"browser": "Google Chrome"}}} """ print(output.lstrip()) In bash script: echo $brows
-
@deanishe I would love to use single script But the problem is two values are combined into single variable and they can not be used separately. Here is the python script to print two numbers: from __future__ import with_statement, print_function, division import sys import os import datetime date_format = "%m/%d/%Y" # Using variables cmu = os.getenv('fifa') # Calulating days difference today_str = datetime.date.today().strftime(date_format) today = datetime.datetime.strptime(today_str, date_format) someday = datetime.datetime.strptime(cmu, date_format) days_diff =
-
I have defined two environment variables and used them to get the variables. For example: environment variable: fifa = 6/14/2018 and python script gives dfifa = 30 environment variable: cmu = 6/16/2018 and python script gives dcmu = 32 Now, When we use {var:dfifa} and {var:dcmu} only one variable works. The workflow is shared in github. How can we fix the problem ? Thanks.
-
[SOLVED] Could not read argument names in File Action
Bhishan replied to Bhishan's topic in Discussion & Help
Thanks a lot. This worked finally: # Read user given arguments mins=$(echo "$min_sec" | cut -d' ' -f1) secs=$(echo "$min_sec" | cut -d' ' -f2) duration=$( bc -l <<<"60*$mins + $secs" ) # duration in seconds # Input mp3 file name and output file name base="${infile%%.mp3}" output="${base}"_trim.mp3 # Example: /opt/local/bin/ffmpeg -ss 0 -t 120 -i in.mp3 out.mp3 # This will trim from 0 seconds to 120 seconds, i.e. two minutes. # # /opt/local/bin/ffmpeg -ss 0 -t $duration -i "$infile" "$output" # Practice # touch "$mins".txt # This will write a file in directory of this