Jump to content

Cliff

Member
  • Posts

    27
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    Cliff reacted to dfay in Case Converter (including Title Case) - now working on MacOS 12.3   
    Updated March 26, 2022 to use Python 3 for MacOS 12.3 
     
    Now featuring Universal Action triggers and hotkeys for the following five actions:
     
    Uppercase
    Lowercase
    Capitalize - capitalizes all words (e.g. Posting A New Topic In Share Your Workflows)
    Title Case - capitalizes word except for "the", "in", "of" etc. according to American English title conventions (e.g. Posting a New Topic in Share Your Workflows)
    Sentence Case - capitalizes only the first letter of the first word & converts the rest to lower case
     
    All of these are set to Copy to Clipboard and Paste by default.
     
    There's also a script filter cc which lets you view the query converted and select your choice (like the Code Case workflow).
     
    You can also connect a hot key directly to the cc script filter directly to view the output options without typing the cc command and pasting your text.
     

     
    Download:
     
    https://www.dropbox.com/s/8fydkkef1t699et/Case Converter 3.alfredworkflow?dl=0
     
    NB This is a new link and will download as a new workflow - you'll need to migrate any hotkeys and delete or disable the older version.
     
    Here's the old Python 2 version in case anyone wants it:
     
    https://www.dropbox.com/s/3k2lh21g5wnqrkp/Case Converter 2.alfredworkflow?dl=0
     
    The original version is described below and still available, if anyone prefers it.
     
    Workflow Version:
     
    This workflow converts the case of the text on the clipboard.
     
    http://dfay.fastmail.fm/alfred/Case%20Converter.alfredworkflow
     
    There are two workflows which display the following five options:
     
    Uppercase
    Lowercase
    Capitalize - capitalizes all words (e.g. Posting A New Topic In Share Your Workflows)
    Title Case - capitalizes word except for "the", "in", "of" etc. according to American English title conventions (e.g. Posting a New Topic in Share Your Workflows)
    Sentence Case - capitalizes only the first letter of the first word & converts the rest to lower case
     
    The keyword case will transform the text on the clipboard without pasting the result.
    The keyword casep will transform the text on the clipboard and paste (using Applescript System Events)
     
    Hotkey Version:
     
    Here is a version for use with hotkeys which will operate on the active selection in OS X and paste it with the converted text.  These all have a half second delay prior to pasting, which is necessary for Applescript to be able to paste.
     
    http://dfay.fastmail.fm/alfred/Case%20Hotkeys.alfredworkflow
     
    Notes and Revision History:
     
    These use the Title Case perl script found at https://raw.github.com/ap/titlecase/master/titlecase .
     
    If you manage academic citations with BibDesk, Zotero, Papers, Mendeley, etc., Title Case conversion is especially useful for cleaning up downloaded citations.
     
    Updated May 3, 2013 with nicer colored icon thanks to mjv ( http://www.alfredforum.com/user/4384-mjv/ )
     
    Updated February 5, 2014 to handle Sentence Case and to add a second keyword to paste after conversion.
     
    Updated May 20, 2014 with hotkeys
  2. Like
    Cliff reacted to stevenla in ts - timestamp parsing and formatting   
    Alfred workflow to get or format timestamps

    Usagets: returns the current timestamp in various formats
    ts [DATETIME STRING]: returns the given datetime string in various formats
     
    Config
    The default timezone is "America/Los_Angeles". You can change this by modifying the code in the Script Filter trigger in Alfred.
      Download: https://github.com/stevenla/ts-alfred-workflow/releases
  3. Like
    Cliff reacted to jgpippin in Unix timestamp: Fetch timestamp for any date   
    Download: http://cl.ly/0l210T3y2L1y
     
    This workflow has three major functions, which are really only useful for developers.
    Fetch current unix timestamp. Convert a unix timestamp into the DATETIME format. Fetch a unix timestamp for a future date. Examples:
    "ts" : 1363987228 "ts 1363987228" : 2013-03-22 05:20:28  "ts next thursday" : 1364443200 "ts 3/5/2013" : 1362502800 "ts 1 year ago" : 1332451288 The results are displayed as a notification and copied into the clipboard.  You may optionally edit the workflow and enable pasting into the foremost application.
     
    Note that this workflow uses a PHP script, and so uses the date.timezone value in your Mac's php.ini file.  If you get inaccurate timestamps, check that value (usually found at /etc/php.ini.default).
     
     
  4. Like
    Cliff reacted to deanishe in Comma-separated, build and open multiple URLs   
    That is the expected behaviour, tbh. When you run a .php file, the interpreter only executes what's between <?php … ?> tags, and so GitHub highlights only these parts as PHP. Anything outside the PHP tags is passed straight through by the interpreter and is treated as plaintext by GitHub unless it detects HTML.
  5. Like
    Cliff reacted to deanishe in Comma-separated, build and open multiple URLs   
    There are a few questionable things about the script, but the obviously broken bit is your incorrect usage of system().
     
    If you look at the relevant docs, system() takes the command as a single string. You need system("open $url");
  6. Like
    Cliff got a reaction from vitor in Comma-separated, build and open multiple URLs   
    Well I tried this in Alfred's PHP scripting and it didn't do anything:
    https://gist.github.com/cliffordp/a0ce681f51504649cd75cc9c22a53b2a (the opening PHP tag is there only to enable syntax highlighting; it's not actually added in my script)
     
    I'd guess that the syntax for PHP is the same as your Ruby because of PHP's system(). I also tried exec() and passthru() but none of these 3 worked.
     
    If someone could please advise how-to in PHP, I'd surely appreciate it just for learning's sake.
     
    However, @vitor, you've been a great help. Thank you so much for that.
  7. Like
    Cliff reacted to vitor in Comma-separated, build and open multiple URLs   
    "{query}".gsub(/[^\d,]/, '').split(',').each { |v| system('open', "https://example.com/issues/#{v}") }  
     
    open is a system command (it’s in /usr/bin/open); you can call it from any language. I’m just not a php user, so I don’t know how to do that one-liner without researching it.
  8. Like
    Cliff reacted to Andrew in Easily share snippets (possible to export/import snippets only)?   
    This isn't currently possible, but something I have a note for and will be considering in the future
  9. Like
    Cliff reacted to bachya in Lastpass Integration   
    For what it's worth, I've created a fairly robust LastPass Alfred workflow; much more to come! http://www.alfredforum.com/topic/5293-lp-vault-manager-a-workflow-for-lastpass/
  10. Like
    Cliff reacted to Vero in Lastpass Integration   
    Looks like someone answered your request here:
    http://www.alfredforum.com/topic/5221-lastpass-workflow/
     
    Note that I haven't tested this workflow as I'm not a LastPass user, but I thought I'd update this thread to make you all aware
     
     
     
     
     
×
×
  • Create New...