Jump to content


Photo

Comic strip viewer workflow

workflow plugins comics alleyoop

  • Please log in to reply
26 replies to this topic

#1 Benzi

Benzi

    Member

  • Member
  • PipPip
  • 122 posts
  • LocationCalicut, Kerala, India

Posted 19 March 2013 - 03:21 PM

An experimental workflow in Python. Displays a list of comics that you can read straight off of Alfred.

comics_view.png

Download: from here  (always the latest version)

Developer side note: The experimental part comes in the form of - it is very easy to extend this workflow if you know a little bit of Python / intermediate programming skills and have a solid RSS feed of a comic you like. Add the code for the new comic in the plugins folder, and as long as it follows the method signature the sample code provided has, you have a new feedback item and comic to read.

Source Code Repo: GitHub

 

Version History

v0.1 - Initial version

v0.2 - Added search support for the list of comics. So typing "comics dilb" will just list Dilbert strip option. Searches are performed against the title and subtitle of each strip. Added a couple more comics to the list based on requests, and two courtesy Jefferson).

 

 

Have fun.


Edited by Benzi, 07 April 2013 - 07:15 PM.

  • JorjGaidin, Cedric, Bart and 2 others like this

              Fun Comics | Lingo | Facts | Rotten Tomatoes | AlfredWorkflow.com Search

Productivity Todo | BulkRename | Wikipedia ML 

          Utility Battery | Battery2 |  TinyPNGScreen Capture | Rome2Rio Search | F.lux | Radium | Monkey Patch


#2 npeeps

npeeps

    Member

  • Member
  • PipPip
  • 20 posts

Posted 19 March 2013 - 03:45 PM

This is wonderful! Thanks for sharing! I'd love the ability to see Calvin and Hobbes as well! I don't really know my way around programming/RSS feeds, but the feed can be found here: http://calvinhobbesd....tumblr.com/rss

 

Is there any possibility that this could be included? Thanks :D



#3 Florian

Florian

    Advanced Member

  • Member
  • PipPipPip
  • 267 posts

Posted 19 March 2013 - 03:49 PM

This is an awesome workflow. Genius ;) 

Though, it'd be cool to make use of the quicklook functionality of Alfred. If the argument of an <item> is a url, then shift will display the quicklook of that URL. That would enable the user to see all comics without re-popping alfred everytime. What do you think?



#4 gammawert

gammawert

    Member

  • Member
  • PipPip
  • 24 posts
  • LocationBerlin, Germany

Posted 19 March 2013 - 04:08 PM

This is an awesome workflow. Genius ;)

Though, it'd be cool to make use of the quicklook functionality of Alfred. If the argument of an <item> is a url, then shift will display the quicklook of that URL. That would enable the user to see all comics without re-popping alfred everytime. What do you think?

 

First of all - I love it. Great idea.

 

But I agree with Florian regarding the usage of the shift-key. When I first tried the workflow in action it seemed intuitively to me to use shift.



#5 Benzi

Benzi

    Member

  • Member
  • PipPip
  • 122 posts
  • LocationCalicut, Kerala, India

Posted 19 March 2013 - 04:42 PM

This is wonderful! Thanks for sharing! I'd love the ability to see Calvin and Hobbes as well! I don't really know my way around programming/RSS feeds, but the feed can be found here: http://calvinhobbesd....tumblr.com/rss

 

Is there any possibility that this could be included? Thanks :D

 

Updated with Calvin and Hobbes  :) . Just redownload the workflow from the original link 


              Fun Comics | Lingo | Facts | Rotten Tomatoes | AlfredWorkflow.com Search

Productivity Todo | BulkRename | Wikipedia ML 

          Utility Battery | Battery2 |  TinyPNGScreen Capture | Rome2Rio Search | F.lux | Radium | Monkey Patch


#6 Benzi

Benzi

    Member

  • Member
  • PipPip
  • 122 posts
  • LocationCalicut, Kerala, India

Posted 19 March 2013 - 04:52 PM

Though, it'd be cool to make use of the quicklook functionality of Alfred. If the argument of an <item> is a url, then shift will display the quicklook of that URL. That would enable the user to see all comics without re-popping alfred everytime. What do you think?

 

 

But I agree with Florian regarding the usage of the shift-key. When I first tried the workflow in action it seemed intuitively to me to use shift.

 

First off, yes, the Shift key idea is good.

Now:

Hmmm.... that is going to be a bit tricky. If I need to get the arg to be the URL of the strip, for every strip I would need to access the feeds first (before even showing the list of comics), strip out URL and populate it in the feedback items. I suppose such a naive approach would slow things down. Unless some sort of caching mechanism is introduced, so that it has to fetch the latest URLS for all comics just once per day. Bottomline, its going to take some time if I go down that route + might be slow if the internet speed is not that great, which in this day and age, happens to be true for some folks [me :-(]

 

Second, XKCD (one of my usuals) has this little thing that the real punch line of the comic is in the alt text of the image. So, if you were hovering your mouse over the comic in the website, you can read it. Can't achieve that with quick look, afaik. (For  XKCD here, I am generating an HTML on the fly and then using quick look to show that page, so...)

 

Shift idea was cool though. Will think about it more :)


              Fun Comics | Lingo | Facts | Rotten Tomatoes | AlfredWorkflow.com Search

Productivity Todo | BulkRename | Wikipedia ML 

          Utility Battery | Battery2 |  TinyPNGScreen Capture | Rome2Rio Search | F.lux | Radium | Monkey Patch


#7 gammawert

gammawert

    Member

  • Member
  • PipPip
  • 24 posts
  • LocationBerlin, Germany

Posted 19 March 2013 - 07:12 PM

even though I don't understand all you said (I am not that tech-savvy) – it makes sense to me, to keep it as it is. and as I said before this is a great workflow, which I will integrate in my morning routine ;)

 

thank you for creating it.



#8 Cedric

Cedric

    Newbie

  • Member
  • Pip
  • 13 posts

Posted 19 March 2013 - 07:34 PM

This is awesome. Would it be possible to add Saturday Morning Breakfast as well ?

 

Cheers.



#9 Benzi

Benzi

    Member

  • Member
  • PipPip
  • 122 posts
  • LocationCalicut, Kerala, India

Posted 19 March 2013 - 08:05 PM

This is awesome. Would it be possible to add Saturday Morning Breakfast as well ?

 

Cheers.

 

Added. Just try redownloading the workflow from the original download link and see if it works.


Edited by Benzi, 19 March 2013 - 08:06 PM.

  • Cedric likes this

              Fun Comics | Lingo | Facts | Rotten Tomatoes | AlfredWorkflow.com Search

Productivity Todo | BulkRename | Wikipedia ML 

          Utility Battery | Battery2 |  TinyPNGScreen Capture | Rome2Rio Search | F.lux | Radium | Monkey Patch


#10 npeeps

npeeps

    Member

  • Member
  • PipPip
  • 20 posts

Posted 19 March 2013 - 08:07 PM

Updated with Calvin and Hobbes  :) . Just redownload the workflow from the original link 

Thank you SO much! This is amazing! :D



#11 Jefferson

Jefferson

    Newbie

  • Member
  • Pip
  • 17 posts

Posted 19 March 2013 - 08:29 PM

Great idea.  This can replace all my normal comic workflows.  Two questions:

 

1) Any chance of moving the source to github?

2) I wrote plugins for Penny Arcade and CTRL + ALT + DEL comics (here).  Any chance of getting them added?

 

Thanks!

 

Edit - Any clue why the alphabetical sorting is wrong for the Dilbert comic (here)?


Edited by Jefferson, 19 March 2013 - 08:36 PM.


#12 Benzi

Benzi

    Member

  • Member
  • PipPip
  • 122 posts
  • LocationCalicut, Kerala, India

Posted 19 March 2013 - 08:45 PM

Great idea.  This can replace all my normal comic workflows.  Two questions:

 

1) Any chance of moving the source to github?

2) I wrote plugins for Penny Arcade and CTRL + ALT + DEL comics (here).  Any chance of getting them added?

 

Thanks!

 

Edit - Any clue why the alphabetical sorting is wrong for the Dilbert comic (here)?

 

Just added the code to GitHub : https://github.com/B...d/comics-alfred

 

re: the Dilbert order, I think Alfred is doing a sort of the feedback items based on most used.


              Fun Comics | Lingo | Facts | Rotten Tomatoes | AlfredWorkflow.com Search

Productivity Todo | BulkRename | Wikipedia ML 

          Utility Battery | Battery2 |  TinyPNGScreen Capture | Rome2Rio Search | F.lux | Radium | Monkey Patch


#13 Jefferson

Jefferson

    Newbie

  • Member
  • Pip
  • 17 posts

Posted 19 March 2013 - 08:57 PM

Just added the code to GitHub : https://github.com/B...d/comics-alfred

 

re: the Dilbert order, I think Alfred is doing a sort of the feedback items based on most used.

 

Thanks!

 

Ya, I think you're right about Alfred doing the sort order based on most used.

 

Edit - Also, any chance of getting Penny Arcade and CTRL + ALT+ DEL added by default?  :P


Edited by Jefferson, 19 March 2013 - 09:11 PM.


#14 Benzi

Benzi

    Member

  • Member
  • PipPip
  • 122 posts
  • LocationCalicut, Kerala, India

Posted 20 March 2013 - 09:20 AM

Edit - Also, any chance of getting Penny Arcade and CTRL + ALT+ DEL added by default?  :P

 

Sure added them. Also check out the latest version from the download link - v0.2 has filtering support. And if you really want it, you can assign a hotkey to a particular strip too.

 

PS: I think I had to slightly modify the CTRL one because the version you gave me wasn't working for me straight off for some reason.


Edited by Benzi, 20 March 2013 - 09:21 AM.

  • Jefferson likes this

              Fun Comics | Lingo | Facts | Rotten Tomatoes | AlfredWorkflow.com Search

Productivity Todo | BulkRename | Wikipedia ML 

          Utility Battery | Battery2 |  TinyPNGScreen Capture | Rome2Rio Search | F.lux | Radium | Monkey Patch


#15 Anthony

Anthony

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 21 March 2013 - 12:49 AM

Hi Benzi,

 

Just discovered this workflow and I love it! 

 

BUT... (there's always a "but"...) would it be possible to add a setting for display size or resolution?  I'm on a 15" Retina MacBook Pro and the comics display too small to comfortably read without sticking my nose on the screen :)

 

I don't know a thing about coding, but perhaps a sticky "x2" "x4" display size setting would be something you'd consider?

 

Anyway, love you work :)

 

Cheers,

 

Anthony.



#16 samispade

samispade

    Newbie

  • Member
  • Pip
  • 16 posts
  • LocationHerts., UK

Posted 29 March 2013 - 04:14 PM

Hello Benzi,

 

Having trouble with seeing these as well as Anthony. I've been playing around with your Dilbert workflow and have managed to modify this to display in Preview using AppleScript to resize and position the window. I would like to do this with Comics workflow as well, but need the full path name of the comic strip file as an output from your /bin/bash Run Script to feed into my osascript. As a complete newcomer to Alfred, Python, et al, I'm a bit stuck on how to do this. Could you give me any pointers?

 

Thanks for all your work on this and your other workflows.



#17 Benzi

Benzi

    Member

  • Member
  • PipPip
  • 122 posts
  • LocationCalicut, Kerala, India

Posted 29 March 2013 - 06:27 PM

Hello Benzi,

 

Having trouble with seeing these as well as Anthony. I've been playing around with your Dilbert workflow and have managed to modify this to display in Preview using AppleScript to resize and position the window. I would like to do this with Comics workflow as well, but need the full path name of the comic strip file as an output from your /bin/bash Run Script to feed into my osascript. As a complete newcomer to Alfred, Python, et al, I'm a bit stuck on how to do this. Could you give me any pointers?

 

Thanks for all your work on this and your other workflows.

 

Hello, if you are comfortable navigating around the workflow's folder, here goes:

 

In the main workflow folder, there is a plugins folder which hosts all the comics extension. Each comic extension is responsible for displaying its strip - so the path of the strip can be easily got. Example, this workflow also has a Dilbert plugin, and if you have had a chance to look at that, if would behave very similar to my other Dilbert extension, except that the code is inside the plugins folder.

 

The run() method in main.py (inside each plugin folder) is where you would be able to get the full path name of the comic strip. The strip is downloaded locally to the workflow folder, and is usually called strip.png / strip.gif. In Python you need to call methods like os.path.join and os.path.basename etc to get the full path, and then you need to run a AppleScript script from within Python. (I am fairly new to Python as a language myself, so I find the StackOverflow site very helpful to get code snippets and hints on how to get some simple stuff done)   

 

If all this is a bit too much to follow already, if you can share your AppleScript code for opening files in Preview, I could have look and give you something more concrete...


              Fun Comics | Lingo | Facts | Rotten Tomatoes | AlfredWorkflow.com Search

Productivity Todo | BulkRename | Wikipedia ML 

          Utility Battery | Battery2 |  TinyPNGScreen Capture | Rome2Rio Search | F.lux | Radium | Monkey Patch


#18 samispade

samispade

    Newbie

  • Member
  • Pip
  • 16 posts
  • LocationHerts., UK

Posted 29 March 2013 - 07:00 PM

Hello Benzi,

 

I've been looking there and playing around with adding "return", but nothing seemed to work. Here is  a link to my take on your Dilbert workflow which contains the code:-

 

https://dl.dropbox.c....alfredworkflow

 

Preview has to have AppleScript enabled as shown in the link in the readme. Make sure you have a backup of Preview first as I managed to screw mine up at the first attempt when I followed some older instructions, but the instructions on the link work, at least for Mountain Lion.

 

I'm having some other problems when I try to split the Run script into 2 separate scripts for bash and osascript, but I'm going to ask about that in the help forum.

 

If you're fairly new to Python I'm very impressed. Have to spend more tome looking at StackOverflow. Thanks for the tip.



#19 Benzi

Benzi

    Member

  • Member
  • PipPip
  • 122 posts
  • LocationCalicut, Kerala, India

Posted 29 March 2013 - 08:02 PM

Hello Benzi,

 

I've been looking there and playing around with adding "return", but nothing seemed to work. Here is  a link to my take on your Dilbert workflow which contains the code:-

 

https://dl.dropbox.c....alfredworkflow

 

Preview has to have AppleScript enabled as shown in the link in the readme. Make sure you have a backup of Preview first as I managed to screw mine up at the first attempt when I followed some older instructions, but the instructions on the link work, at least for Mountain Lion.

 

I'm having some other problems when I try to split the Run script into 2 separate scripts for bash and osascript, but I'm going to ask about that in the help forum.

 

If you're fairly new to Python I'm very impressed. Have to spend more tome looking at StackOverflow. Thanks for the tip.

 

Managed to get it working for Dilbert now with the comics workflow - here is a modified version (only contains Dilbert comic for testing) that opens the strip in Preview. This is more of an example of what changes needs to be done to other comics plugins if you want to use Preview throughout. The code change is to download the strip and then print the path of the strip. In the applescript section, I changed the shell script command. Should be straightforward to follow once you open up main.py.

 

Keyword is comics2 and should only list Dilbert as an option.

 

To get all comics to work like this, we need to update the plugins to print out the path to the downloaded strip. (One heck of a hurdle to get Preview apple scriptable - too bad, else this approach could have made for a nice workflow update :))

 

EDIT - just read the post after this, just realized if you double tap on the image from the original workflow, it will open up in Preview....


Edited by Benzi, 29 March 2013 - 08:10 PM.

              Fun Comics | Lingo | Facts | Rotten Tomatoes | AlfredWorkflow.com Search

Productivity Todo | BulkRename | Wikipedia ML 

          Utility Battery | Battery2 |  TinyPNGScreen Capture | Rome2Rio Search | F.lux | Radium | Monkey Patch


#20 Benzi

Benzi

    Member

  • Member
  • PipPip
  • 122 posts
  • LocationCalicut, Kerala, India

Posted 29 March 2013 - 08:08 PM

Hi Benzi,

 

Just discovered this workflow and I love it! 

 

BUT... (there's always a "but"...) would it be possible to add a setting for display size or resolution?  I'm on a 15" Retina MacBook Pro and the comics display too small to comfortably read without sticking my nose on the screen :)

 

I don't know a thing about coding, but perhaps a sticky "x2" "x4" display size setting would be something you'd consider?

 

Anyway, love you work :)

 

Cheers,

 

Anthony.

 

It is a bit of a hurdle to get this done easily (previous couple of posts in the thread, I have been helping out someone who wants to get this to open up in Preview).

 

I can't control the quality of the strips image, but one option you could try is as follows: when comics displays the strip of a comic, double tap on the image, and it should open up automatically in Preview - from there, you can zoom in and read the strip. A bit of a hassle, but the only workable approach at the moment I'm afraid... Will keep looking for a better solution though.

 

Hope this helps...


              Fun Comics | Lingo | Facts | Rotten Tomatoes | AlfredWorkflow.com Search

Productivity Todo | BulkRename | Wikipedia ML 

          Utility Battery | Battery2 |  TinyPNGScreen Capture | Rome2Rio Search | F.lux | Radium | Monkey Patch




Also tagged with one or more of these keywords: workflow, plugins, comics, alleyoop

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users