Jump to content

raguay.customct

Member
  • Posts

    708
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by raguay.customct

  1. Hi, My latest tutorial is now published: http://computers.tutsplus.com/tutorials/creating-alfred-workflows-in-haskell--cms-24277 It explains my Haskell Alfred library and how to use it to make workflows. I had fun writing it. Richard
  2. Just made a new version with a lot of code cleanup and moved to the latest version of the Alfred Haskell Library.
  3. I just updated the library to have conditionally adding items to the XML. I have updated the Haskell Text Converter Workflow to make use of this.
  4. I just added the text converting workflow that demonstrates the use of this library: http://www.alfredforum.com/topic/5967-haskell-text-converter/ Let me know if you have any other questions.
  5. This workflow demonstrates the Haskell Alfred Library. The workflow allows text to be converted to different formats. The following commands are: ht:conv This command takes a string in the Alfred Prompt. You then pick the type of conversion you want. The result is pushed on to the clipboard. ht:start This command starts a dedicated web server for performing the text conversion. ht:stop This command closes the dedicated web server. You then use a GET requests to port 8000 of your localhost with the conversion type and the string. It will return to you the converted string. Example: http://localhost:8000/title/this is a test will return This is a Test There is a hotkey for numbering the lines of text in the clipboard. There is also an external trigger for taking text from the clipboard and allowing the user to select a converter. There is a hotkey for triggering that external trigger also that takes the current selection and puts it into the clipboard. Packal: http://www.packal.org/workflow/haskell-text-converter My Github: https://github.com/raguay/MyAlfred My Website: http://www.customct.com/ Version: 1.2 - July 31, 2015
  6. Hi, This is a Haskell library for making workflows. It's just like the PHP or Ruby libraries listed in the Library section. The cases.hs file is a sample workflow that uses the library. It implements a script filter and some actions. I am currently writing a tutorial on how to use the library for Tuts+. I'll post it here when it goes live (but, it might be a while. They have a large backlog.).
  7. Hi, Could you please add my new Alfred Workflow Library in Haskell to the list of Alfred libraries. You can find it here: https://github.com/raguay/AlfredLibraryInHaskell Thanks.
  8. No problem. Your welcome. Glad you find it useful.
  9. I forgot to mention: With this update, I will no longer be syncing the Mjolnir workflow with this one. The Mjolnir program is not currently being updated and the applescript running submodule no longer works. Since I am making use of that, the two workflows will no longer be syncronized. I no longer use Mjolnir for these reasons and will only be updating the Hammerspoon workflow going forward.
  10. Hi, I just upgraded the Hammerspoon workflow to have an upgrade option and integration with the AnyBar workflow for the caffienate function. The hs:upgrade command will upgrade all future version without messing with the init.lua file. But, for this, you have to run hs:install to now to create this functionality. The install creates the .hammerspoon/init.lua file with a line to load the alfred.lua file. The hs:upgrade will then only effect the alfred.lua file. If the AnyBar workflow and program are installed, then an indicator is shown. If caffenate is active, red "zzz" will be shown. Otherwise, grey "zzz" are shown. Give it a try and let me know how it works for you.
  11. Hi, That errors says you did not set the working directory properly. The workflow is used to step through a directory of directories that have files. You use the Alfred browser to go to the top directory and use the file action "Set Processing Directory". Then you use "dp:nextdir" to go to the first directory there. Then you use "dp:nextfile" to copy the path of the first file in the first directory in to the clipboard (or pasteboard. I'm just used to calling it the clipboard, but Apple has other words). That way you can step through each file in order (by ls standard and not Finder ordering). If you only have one level of directories, you could put it into a sublevel and then use the workflow. I made the workflow to step through Closed Captions files for attaching to videos where the videos are group by courses. Therefore, the directory structures is: SRTDirectories Course1dir file1 file2 Course2dir file1 Something like that. But, I figured others might find it useful, also. Let me know if this is helpful. Richard
  12. If the following file has text in it, it is assuming that the editor is already open: ~/Library/Application Support/Alfred 2/Workflow Data/com.customct.AlfredEditor/windows.txt where '~' is your home directory. Delete that file and the editor should open again. I have a bug in the logic for determining if an editor is open. The problem being, NW.js doesn't allow more than one instance open at a time. Therefore, I am trying to use a secondary loader to spawn a new window instead of a new instance. But, it keeps getting off here and there. I am currently migrating to the Ace editor instead of CodeMirror editor. More robust in functionality. Keep watching for updates.
  13. Hi, Just updated this one. Fixed some bugs with names that have special symbols.
  14. Picat Workflow This workflow is for programing using the [Picat](http://picat-lang.org/) language. The following commands are available: pic:install This will download and install Picat in to the ~/Documents directory. It then sets up the variables to use in all the other commands. pic:showdir This shows the directory of the install Picat program to the user. pic:setscript This sets the Picat script to execute in the other commands. pic:editscript This opens the Picat script in to the code editor that is setup with pic:seteditor. pic:seteditor This allows for setting the code editor to use to edit Picate scripts. pic:run This runs the currently selected Picat script. pic:suser This opens the Picat User Manual. pic:stutorial This opens the Picat Tutorial. pic:sstarted This opens the Picat Getting Started Manual. There are also three File commands to use in the Alfred Browser: Edit Picat File Allows you to edit the selected Picat file in the Alfred Browser using the editor setup in the pic:seteditor. Run Picat File This runs the current Picat file in the Alfred Browser. Run Files through Picat Program This will pipe the current file to the currently setup Picat script. Packal: http://www.packal.org/workflow/picat-workflow My Website: http://customct.com/ My GitHub: https://github.com/raguay/MyAlfred
  15. AnyBar Workflow AnyBar is an application that sits in the menu bar and displays the currently set graphic. It is updated by UDP requests. This worklfow is to make using it easy. I am working to integrate this with my Hammerspoon workflow to show the state of Mac sleep. This workflow requires the anybar application to be installed. The easiest way to install is by home-brew cask: brew cask install anybar If you do not have home-brew cask installed, follow the instructions here: [HomeBrew Cask](http://caskroom.io/). If you do not have HomeBrew installed, follow the instructions here: [HomeBrew](http://brew.sh/). Then execute the above line. Once installed, you can use the features of this workflow: anybar:launch Launches anybar with optional port number. anybar:setgraphic Set the graphic for the anybar application. It will give a list of usable graphics. Start typing and the list will be narrowed down to the ones that match. Select the one and the last launched Anybar will be changed to that graphic. anybar:setport This allows you to set the port number of the AnyBar app. anybar:setup This copies the graphics I created to the ~/.AnyBar directory. There is a file action, Copy to Anybar, that will copy a png graphic to the ~/.AnyBar directory so that it can be used with the program. There are two External Triggers: SetGraphic and Launch. The SetGraphic external trigger expects a string with the name of the graphic, a '|', and a port number. The Launch external trigger expects a UDP port number to launch the AnyBar program on. Packal: http://www.packal.org/workflow/anybar-workflow My web site: http://customct.com GitHub: https://github.com/raguay/MyAlfred
  16. Oops. I thought I had changed that line. I just fixed the tutorial to copy the library file and put the tcconverter.swift file as it's own file. Thanks for spotting that. From XCode 6 beta to XCode 6.3, there has been a lot of changes to Swift! The first compile line creates .o files. The .o file is the object code unlinked. It is the executable code that has placeholders instead of addressress for branching statements. Relative addresses are compiled in on the link stage. The second line creates the library file that other programs can dynamically load the library instead of statically linking them. The third line creates the .swiftmodule and . swiftdoc files needed by the linker to link the library to the final program. These are mostly used by XCode itself and not so much with the 4th stage. The last line compiles our tcconverter code, links it to the Alfred library, and creates the final execuatable, tcconverter. I hope this de-mystifies it some for you. Compiling is complicated up front, but runs so much faster than interpreting. The Swift compiler is much easier to use than like the gcc compiler for C code! You can really get bogged down in options for some compilers. But, if your system is fast enough, I much prefer interpreters!
  17. I have updated the tutorial and the github account. Thanks for bring this to my attention.
  18. Hi, I have been having trouble getting the latest Xcode installed (file system corruption required me to re-install all). The items you mentioned would be in line with the changes. I will make the changes to the github repo for it. Thanks.
  19. I created a workflow for this quickly so that you can see how to do them: https://db.tt/QL8JIKwP You can use this as a template to create many others as well. I hope this is helpful.
  20. I have written a series of articles on using Alfred for Mac Tuts+. They are: Alfred Workflows for Beginners Alfred Workflows for Intermediates Alfred Workflows for Advanced Alfred Debugging Track Project Time With Alfred Timekeeper Use a Mac to Monitor Website Uptime or Other Regular Tasks Alfred Workflows in Swift It's not an ebook, but it will get you going using Alfred with practical examples. If there is a topic you need and it is not covered, let me know. You can also look at all of my workflows on my website: http://customct.com/alfred-2-workflows
  21. Hi, I finally created my first theme. I based it on the Wild-Cherry Theme for Sublime Text and iTerm2. You can get them on Packal: http://www.packal.org/theme/wild-cherry-dark-theme http://www.packal.org/theme/wild-cherry-light-theme
  22. Hi, It still did not fix it this morning. The logs show that it has not run today and LaunchControl doesn't show an error. It is definitely not being ran after a sleep. Looks like launchd definitely has a bug there. Using other solutions for now....
  23. It does, but I mostly have it control what programs are launched when running battery and what to use for printing. So, I launch it before going on the move and use it while on the move. I run so many utilities that unloading one does help my load. I am still trying to get all the settings good, but it gets distracting sometimes. That one is a hard one to really master.
  24. If it doesn't work, I will use Keyboard Maestro's Run on Wake to get it working. Don't know SleepWatcher, but I already have Keyboard Maestro running. Don't need too many programs going. Yes, I have the latest 10.10.3. I haven't noticed anything else having issues, but I do not have any Launch Agents that run on sleep ControlPlane works fine and I believe it uses launch agents. But, I only run ControlPlane when on the go.
×
×
  • Create New...