Jump to content

milopus

Member
  • Posts

    24
  • Joined

  • Last visited

Reputation Activity

  1. Like
    milopus got a reaction from Torrey in Native QRCode Generator   
    wow, this is a fantastic and useful workflow.  Thanks!
  2. Like
    milopus reacted to Torrey in Native QRCode Generator   
    Summary
     
    All of the QR code generator workflows I've come across use a dependency, such as an external installation, embedded app, or web service. Given that MacOS can create QR codes natively, that's what I did with this workflow.
     
    Usage
     
    I've configured this to use two different keywords, qrc & qrp. The qrc keyword creates a QR code that copied to the clipboard. The other keyword, qrp does the same thing, except at the end it'll open the QR code in Preview to allow saving as an image/pdf.
     
    When using either qrc or qrp without a parameter this workflow will attempt to use text contained on the clipboard. This same flow is followed if you set a hotkey for the selection and nothing is selected.
     
    Download
     
    https://github.com/TorreyBetts/Alfred-QRCode/releases/download/v1.0.3/QR.Code.alfredworkflow
     
    GitHub
     
    https://github.com/TorreyBetts/Alfred-QRCode
  3. Like
    milopus reacted to Little Brighter in Ultimate Currency Converter   
    Hello!
     
    Ever wanted to quickly convert currencies within your Alfred Window but all existing workflows lack this one or that one feature and the exotic currency you need for your next post-pandemic holiday trip is missing?
     
    That’s why we have created the Ultimate Currency Converter – first just for ourselves, but it might also be helpful for you.
     

     
    Get it from here: Ultimate Currency Converter – GitHub Release Page
     
    For usage information: just play around with the currency keyword or look at the README.
     
    In case you have any bug findings, any suggestions or wishes, please don’t hesitate to post here or open a GitHub issue.
     
    And if this workflow turns out to be helping you, consider to help us with our coffee bill :-) → paypal.me/n8g1
     
    Best
     
     – Erik from Little Brighter
  4. Like
    milopus reacted to stephancasas in Mouseless Messenger — iMessage/SMS Preview and Reply for Alfred   
    Mouseless Messenger
     
    Mouseless Messenger offers you rapid keyboard-driven access to send and read conversations in the macOS Messages app via Alfred — all without ever interacting with the Messages app.
     
    Click Here to Download the Latest Release
     
    Installation
    Before the workflow can be used, you'll need to provide Alfred with Full Disk Access privileges via System Preferences:
    Open System Preferences Choose Security and Privacy Choose Privacy Select Full Disk Access Unlock the 🔒 in the bottom left corner. Enable the checkbox for Alfred. If unavailable, use the ➕ button to add Alfred.  
    ⚠️ Privilege Escalation
    Full Disk Access is used to provide Alfred with access to the Messages database. However, by providing Alfred with this access, you are providing ALL Alfred workflow with access — not just Mouseless Messenger.
     
    Be sure you trust your installed workflows before allowing this.
     
    Usage
    The workflow is triggered by the keyword msg. On run, you'll be provided with the your eight (8) most recent conversations in the Messages app.
     
    To preview a message thread, press the SHIFT key while a conversation is selected. Press it again to dismiss the conversation preview. To reply to a message thread, press the ENTER or RETURN key while a conversation is selected, then type your reply in the provided input space and press ENTER to send it.  
    In order for the message to send, the Messages app must be running in the background. The window doesn't need to be in the foreground (or even visible), but the app itself must be running.
     
    Support the Workflow
    I built Mouseless Messenger because I code all day and don't like to take my hands off the keyboard. If you find it useful, please consider buying me a coffee so that I can keep building cool things like this.
     
    If you have a feature you'd like added, or an issue which needs attention, please open an issue on GitHub.




  5. Like
    milopus reacted to Bruce2905 in Making Python 2 Workflows work on macOS Monterey 12.3 and above   
    I am using ESV Bible Online, which previously was able to select a verse, and paste it into the front most app. It no longer works, but instead searches for the scripture online. I ran the workflow in Debugging Mode, and received the following error messages:
     
    [12:59:55.990] Logging Started...
    [13:00:21.426] ESV Online Bible[Script Filter] Queuing argument '(null)'
    [13:00:21.453] ESV Online Bible[Script Filter] Script with argv '(null)' finished
    [13:00:21.457] ERROR: ESV Online Bible[Script Filter] Code 127: /bin/bash: line 1: python: command not found
     
    Any ideas on how to make this work?
  6. Like
    milopus reacted to Vero in ESV Online Bible   
    Pop by this thread and share your details
     
     
     
     
  7. Like
    milopus reacted to ibnuh in Character & Word Counter Workflow   
    Github Repo: https://github.com/ibnuh/alfred-character-counter-workflow
     

     
    Character & Word Counter for Alfred
    An Alfred Workflow that count character & word for you
     
    Installation
    Download from Release 1.0
    Usage
    Keyword: cw
    Development
    Clone the repository Open your favourite terminal
    composer install Credits
    Icons by flaticon.com PHP helper class for Alfred Workflows by joetannenbaum/alfred-workflow
  8. Like
    milopus reacted to forgetfulfellow in Bible Verse and Keyword Lookup Workflow   
    ***This Workflow Requires the Internet***
    ---------------------------------------------
    V 0.1 - Search the ESV by Verse
    V 0.2 - Search the ESV by keyword
    V 0.3 - Search the NASB by Verse
    ---------------------------------------------
     
    Hey everyone,
     
    I just created a workflow for quick and easy lookup of verses from the Alfred bar. 
     
    1) Type in ESV, followed by the book, chapter, and verse:
     
    The verse from the ESV bible will be automatically copied to your clipboard, and a notification will be in your notification center with the entire verse.
     

     
    2) Type in ESVS along with your search phrase:
     
    Alfred will look up the phrase in the ESV Bible and return all options that contain that set of words. Choose between a submenu of verses, and it will be copied to your clipboard.
     

     
    3) Type in NASB along with the chapter and verse
     
    "Same as ESV Verse Look Up"
     
     
    At this moment, the ESV and NASB are supported. Feel free to request a different version of the bible that you use, and I'll be more than happy to add it 
     
    Here's the download link: http://bit.ly/18TUkbX
     
    There may be a few bugs that affect an extreme minority of verses due to formatting; I believe I've taken care of it, but please feel free to report bugs as well.
  9. Like
    milopus reacted to caleb531 in YouVersion Suggest: look up Bible references quickly and easily   
    What does it do?  
       
     
    YouVersion Suggest is a workflow which allows you to search across the YouVersion Bible for any verse, chapter, or book (in any version).  
     
       
     
    http://cdn.img42.com/b7f33b8ceda61bea6dfe557f42cbd6b9.png  
     
       
     
    Why do I want it?  
     
       
     
    I created YouVersion Suggest because I wanted to great simplify the effort required to look up any Bible reference (be it a verse or chapter or book in a particular version). As a believer in Christ, I think that quick and easy access to Scripture is important, and so that's exactly what I've tried to do.  
     
       
     
    How does it work?  
     
       
     
    Type the yv keyword in Alfred, followed by a space and a phrase representing the bible reference you wish to find. The phrase can be part of a book name, chapter, verse, or range of verses. You may also include an optional version (translation) at the end of your query. As you type, YouVersion Suggest will display a list of suggestions matching your query.  
     
       
     
    Examples  
     
       
     
    'luke' => Luke  
     
    'eph 3' => Ephesians 3  
     
    '1t3e' => 1 Thessalonians 3 (ESV), 1 Timothy 3 (ESV)  
     
    'mat 6:34 nlt' => Matthew 6:34 (NLT)  
     
    '1 co 13.4-7' => 1 Corinthians 13:4-7  
     
       
     
    What versions/translations are available?  
     
       
     
    Currently, English is the only supported language, but the following versions are all supported:  
     
       
     
    AMP, ASV, BOOKS, CEB, CEV, CEV, CEVUK, CPDV, DARBY, DRA, ESV, ERV, GNB, GNBDC, GNBDK, GNT, GNTD, GWT, HCSB, ISR98, KJV, LEB, MSG, NIV, NIVUK, NLT, NET, NKJV, NCV, NASB, NABRE, NIRV, OJB, RV1885, TLV, WEB  
     
       
     
    YouVersion Suggest uses NIV as the default translation, but of course, you can easily specify your preferred version when searching.  
     
       
     
    Where can I download it?  
     
       
     
    You can download the latest version from GitHub. I hope you like it!  
  10. Thanks
    milopus reacted to Andrew in Adding AirDrop Support to Alfred   
    Huh, well I never... I wonder when they just became apps within Finder!!
     
    I'll add these into Alfred 4.0.8
     
    Cheers,
    Andrew
  11. Like
    milopus reacted to deanishe in ESV Online Bible   
    I noticed an encoding error in my script when I entered "job" as the query (probably something to do with "smart" quotes).
     
    If you don't mind, I "Pythonified" the script and implemented the caching I mentioned. The script below catches and displays API errors (apparently the API returns a detail field if something went wrong), handles non-ASCII text, and caches the results for queries for 40 days (by default), which takes the response time from ~0.8 seconds to ~0.02 seconds for responses that are in the cache.

    Hitting ⌘L on the result will show the passage in Alfred's Large Type window, and ⌘C will copy the same to the clipboard.
     
    So if you'd like to, try this:
    # encoding: utf-8 """Alfred Script Filter to search the ESV Bible.""" from __future__ import print_function from hashlib import md5 import json import os import re import subprocess import sys from time import time from urllib import urlencode API_KEY = '<redacted>' API_URL = 'https://api.esv.org/v3/passage/text/' API_OPTIONS = { 'include-passage-references': 'false', 'include-first-verse-numbers': 'false', 'include-verse-numbers': 'false', 'include-footnotes': 'false', 'include-footnote-body': 'false', 'include-short-copyright': 'false', 'include-passage-horizontal-lines': 'false', 'include-heading-horizontal-lines': 'false', 'include-headings': 'false', 'include-selahs': 'false', 'indent-paragraphs': '0', 'indent-poetry': 'false', 'indent-poetry-lines': '0', 'indent-declares': '0', 'indent-psalm-doxology': '0' } # HTTP request headers API_HEADERS = { 'Accept': 'application/json', 'Authorization': 'Token ' + API_KEY, } # Directory for this workflow's cache data CACHEDIR = os.getenv('alfred_workflow_cache') CACHE_MAXAGE = 86400 * 40 # 40 days def log(s, *args): """Write message to Alfred's debugger. Args: s (basestring): Simple string or sprintf-style format. *args: Arguments to format string. """ if args: s = s % args print(s, file=sys.stderr) class ESVError(Exception): """Base error class.""" class NotFound(ESVError): """Raised if no passage was found.""" def __str__(self): """Error message.""" return 'No passage found' class APIError(ESVError): """Raised if API call fails.""" class Cache(object): """Cache results of API queries. Attributes: dirpath (str): Path to cache directory. """ def __init__(self, dirpath): """Create a new cache. Args: dirpath (str): Directory to store cache files. """ log('cache directory=%s', dirpath) self.dirpath = dirpath if dirpath is None: # not being run from Alfred return # Alfred doesn't create the directory for you... if not os.path.exists(dirpath): os.makedirs(dirpath) else: # remove old cache files self.clean() def search(self, query): """Perform API query, using cached results if not expired. Args: query (unicode): Search string. Returns: Passage: Passage from API or cache. """ cachepath = None if self.dirpath: cachepath = os.path.join( self.dirpath, md5(query.encode('utf-8')).hexdigest() + '.json' ) # ------------------------------------------------------ # Try to load data from cache if cachepath and os.path.exists(cachepath): # Expired cache files were deleted when `Cache` was created log('[cache] loading passage for "%s" from cache ...', query) with open(cachepath) as fp: data = json.load(fp) return Passage.from_response(data) # ------------------------------------------------------ # Fetch data from API # Combine query and options into GET parameters params = dict(q=query.encode('utf-8')) params.update(API_OPTIONS) # Execute request data = fetch_url(API_URL, params, API_HEADERS) passage = Passage.from_response(data) if cachepath: # Cache response with open(cachepath, 'wb') as fp: json.dump(data, fp) return passage def clean(self): """Remove expired cache files.""" i = 0 for fn in os.listdir(self.dirpath): p = os.path.join(self.dirpath, fn) if time() - os.stat(p).st_mtime > CACHE_MAXAGE: os.unlink(p) i += 1 if i: log('[cache] deleted %d stale cache file(s)', i) class Passage(object): """A Bible passage. Attributes: fulltext (unicode): Passage text as paragraphs ref (unicode): Canonical passage reference summary (unicode): Passage text on one line with_ref (unicode): Passage as paragraphs + reference """ @classmethod def from_response(cls, data): """Create a `Passage` from API response. Args: data (dict): Decoded JSON API response. Returns: Passage: Passage parsed from API response. Raises: NotFound: Raised if ``data`` contains no passage(s). """ if not data.get('canonical') or not data.get('passages'): raise NotFound() ref = data['canonical'] s = data['passages'][0] summary = re.sub(r'\s+', ' ', s).strip() p = cls(ref, summary, s) log('---------- passage -----------') log('%s', p) log('---------- /passage ----------') return p def __init__(self, ref=u'', summary=u'', fulltext=u''): """Create new `Passage`.""" self.ref = ref self.summary = summary self.fulltext = fulltext self.with_ref = u'{}\n\n({} ESV)'.format(fulltext.rstrip(), ref) def __str__(self): """Passage as formatted bytestring. Returns: str: Full text of passage with reference. """ return self.__unicode__().encode('utf-8') def __unicode__(self): """Passage as formatted Unicode string. Returns: unicode: Full text of passage with reference. """ return self.with_ref @property def item(self): """Alfred item `dict`. Returns: dict: Alfred item for JSON serialisation. """ return { 'title': self.ref, 'subtitle': self.summary, 'autocomplete': self.ref, 'arg': self.with_ref, 'valid': True, 'text': { 'largetype': self.with_ref, 'copytext': self.with_ref, }, } def fetch_url(url, params, headers): """Fetch a URL using cURL and parse response as JSON. Args: url (str): Base URL without GET parameters. params (dict): GET parameters. headers (dict): HTTP headers. Returns: object: Deserialised HTTP JSON response. Raises: APIError: Raised if API returns an error. """ # Encode GET parameters and add to URL qs = urlencode(params) url = url + '?' + qs # Build cURL command cmd = ['/usr/bin/curl', '-sSL', url] for k, v in headers.items(): cmd.extend(['-H', '{}: {}'.format(k, v)]) # Run command and parse response output = subprocess.check_output(cmd) log('---------- response -----------') log('%r', output) log('---------- /response ----------') data = json.loads(output) if 'detail' in data: # 'detail' contains any API error message raise APIError(data['detail']) return data def exit_with_error(title, err, tb=False): """Show an error message in Alfred and exit script. Args: title (unicode): Title of Alfred item. err (Exception): Error whose message to show as item subtitle. tb (bool, optional): If `True`, show a full traceback in Alfred's debugger. """ # Log to debugger if tb: import traceback log(traceback.format_exc()) else: log('ERROR: %s', err) # Send error message to Alfred output = { 'items': [{'title': title, 'subtitle': str(err)}] } json.dump(output, sys.stdout) sys.exit(1) # 1 indicates something went wrong def main(): """Run Script Filter.""" log('.') # Ensure real log starts on a new line # Fetch user query and decode to Unicode query = sys.argv[1].decode('utf-8') cache = Cache(CACHEDIR) try: passage = cache.search(query) except ESVError as err: exit_with_error(query, err, False) except Exception as err: exit_with_error(query, err, True) # Show passage in Alfred json.dump({'items': [passage.item]}, sys.stdout) if __name__ == '__main__': start = time() main() log('------ %0.3fs ------', time() - start)  
  12. Like
    milopus reacted to deanishe in ESV Online Bible   
    Then get clicking on that heart-type thing on my posts. I've got days to win  
  13. Like
    milopus reacted to emmanuel in ESV Online Bible   
    Thank you both for contributing to this workflow!

    I've been meaning to publish this to GitHub but never got around to it. Now that it's evident there's a larger community surrounding this (both here on the forum and others e-mailing me), I'll put it up asap! The ESV API requires an API key that has been approved for use. Feel free to use the key that is present. It's been approved as this workflow's key. I think publishing the API key should be fine. I'll add some comments about proper/ethical use of the key. Let me know if any of you have suggestions on this though!
     
    @deanishe Is there a way to "bundle" these packages into the Alfred workflow so that users won't need to follow extra instructions during installation?
     
    @JGC You're totally right that the input "pr 31:30" behaves incorrectly, oops! Looks like the test verses I used didn't account for the returned output structure of these specially-formatted, multi-line passages from the API. You're more than welcome to try to tackle this and submit a PR once I publish the code !
  14. Thanks
    milopus reacted to emmanuel in ESV Online Bible   
    This workflow allows you to quickly look up bible passages and copy them to your clipboard. It submits passage reference queries to the wonderful ESV API (https://api.esv.org/) and parses the response. The API is smart enough to handle many variations and abbreviations!
     
    Download and use it here: ESV Online Bible (on Packal)
     
    GitHub repo: https://github.com/emmanueljl/ESV-Bible-Alfred-workflow
     

  15. Like
    milopus got a reaction from emmanuel in ESV Online Bible   
    thank you sooooo much.  I've been waiting for this update.  This is a huge time saver for me and my whole family.
     
  16. Thanks
    milopus reacted to emmanuel in ESV Online Bible   
    Thank you for your patience! My auth key was finally approved, and the workflow on Packal has been updated with the fix.
  17. Like
    milopus reacted to Subject22 in Open current Safari tab in Chrome - Improved   
    I removed Flash from my system long ago but occasionally I need to make use of the version bundled with Chrome to view certain web pages properly. There are a few workflows like this around, but as the only browsers I use are Safari and Chrome I wanted something a little more direct than Send URL which led me to this alternative made by Runar. There were a few issues with that workflow, so I made a version which (hopefully) deals with everything in a tidy and intelligent manner. 
     
    If Safari is either not open, or has no windows open, the workflow will post a notification saying so. If you'd like it to also post notifications when URLs are successfully sent to Chrome open the workflow folder (right click the workflow in Alfred and click Show in Finder) and edit the appropriate line in open_in_chrome.scpt (it's clearly marked). The reverse behaviour is also available (i.e.: sending URLs from Chrome to Safari).
     

     
     
    Hat tip to Carlos-Sz for getting Alfred to run the Applescript properly 🙂
     
    Download (v1.0.2): Open in Chrome
    GitHub
    Keywords: openinchrome, openinsafari
  18. Like
    milopus reacted to Ritashugisha in Luxinate - Download video and audio from YouTube and SoundCloud   
    ▶ Luxinatev7.01
    ~ DEPRECATED ~
    This workflow is currently not supported...
     
    Luxinate is an Alfred.v2 workflow designed to automate the use of "youtube-dl" and "ffmpeg" to download streamed media from a large set of supported sites.
     
     
    — QUICK OVERVIEW —
    Luxinate has several available options.

    The default "Luxinate" option will allow you to download video, audio, or even both!

    The "Advanced Luxinate" action modifier will allow you to select a specific download quality or format.

    Several built in settings allows you to configure Luxinate to your personal preference.

    All of your downloads will be saved for your future reference.

     
     
    ▶ Download v7.01
    ~ Enjoy ♥ Ritashugisha
    — View on Github
    — Previous Versions
  19. Like
    milopus reacted to deanishe in Multilingual translation dictionary with Glosbe.com   
    Translate between hundreds of languages with Glosbe.com.
     

    By default, the workflow is set up to translate between German and English:
    .ende English query — show German translations of English query. .deen German query — show English translations of German query. ENTER — copy selected translation to the clipboard. CMD+ENTER — open translation in browser. glosbehelp — open the included help file in your browser. glosbelang [query] — view and search supported languages. To use other language pairs, you will have to edit the workflow, either changing the included English <-> German Script Filters or adding your own using them as a template.  
    For more information and to download the workflow, see the Packal page or grab it from GitHub.
×
×
  • Create New...