Jump to content

_oho

Member
  • Content Count

    27
  • Joined

  • Last visited

About _oho

  • Rank
    Member

Contact Methods

  • Twitter
    _oho
  • Website URL
    http://blog.hoachuck.biz

Profile Information

  • Location
    Paris
  1. )) Ok, crossing my hands on my back, looking at the ground and blushing ... I have to admit that it was the fastest route based on what google gave me first. I'm a poor marketing guy ;( Your rock, it's even better! In particularly because I needed to get rid of standard output that prevented generating feedback on Alfred ... I then could easily add stdout= on the subprocess.call: FNULL = open(os.devnull, 'w') retcode = subprocess.call(['sips', '-s', 'format', 'png', 'out.jpg', '--out', 'out.png'], stdout=FNULL, stderr=subprocess.STDOUT) I was fighting using my command line to fi
  2. Thanks guys for putting me on the right track (and pushing me not to be too lazy). There is indeed a way to manage it from command line without having to setup painful image management lib dependencies (like PIL in python - for instance). I have just verified that the following command line from python does the trick (convert a base64 bit encoded jpeg data text to a local png file): os.system("echo " + data + " | perl -MMIME::Base64 -ne 'print decode_base64($_)' > out.jpeg && sips -s format png out.jpeg --out out.png") supposing that you have: import os and data is somethi
  3. Hum..., cool I didn't know sips at all! And it look really handful and simple as from command line. Thank for the tip. This said, in my very particular case, the original image is a 64bits encoded jpeg data text. Quickly looking at sips, I don't see any way to use as input a base64 image. Can we ? Could it be that I have missed something ? O.
  4. Thank! I'll have a look, it's still possible that I did something too complicated, but I couldn't find on Python an easy way to convert base64 jpeg to png file. For info only (might be useful for others) I did something like : def Base64ToPng(base64DataTxt,filename,destination_path): import base64 import re from PIL import Image from io import BytesIO base64JustDataTxt = re.sub(r'data\:image\/jpeg;base64, ', "", base64DataTxt) #logging.error('base64JustDataTxt:\n' + base64JustDataTxt) im = Image.open(BytesIO(base64.b64decode(base64JustDataTxt))) im.save(destination_path
  5. Thank you for your note RodgerWW. Yes, I believe I will not have much other choices than do the conversion locally. Actually I wanted to avoid too much dependencies from local side and provide from backend all the content needed to display my result from the workflow without need of some kind of local processing. I have just did convert from backend side my base64 jpeg image to a base64 png image hoping that Alfred would accept a base64 image if it were png. I believe there are no other options to provide with a local png as file only (in top of application icon option) - right ? I w
  6. Hello, I can't find in the forum anything similar to my bellow question, so I hope this is not a yet again asked question ... I was trying to set 64bit encoded data image at the place of an image name in Workflow result display, but this does not work. Is there a was to do it or it's just not possible at all yet ? Example: <items> <item uid="123456" arg="http://google.com" valid="YES"> <title>My row title</title> <subtitle>some kind of subtitle</subtitle> <icon type="filetype"> data:image/jpeg;base64, /9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQ
  7. "contact list result" is the keyword used to call newt script filter that just do in bash: cat << INFO `more /tmp/ldap-result.xml` INFO Meaning that your /tmp/ldap-result.xml should not exist or be not well formed. Try to see if you have a /tmp/ldap-result.xml. Also, my parsing is expected a specific type of info from your ldapsearch result. if the result is different, it will not work. O.
  8. Hello Chris, I don't know if you have already solved your problem? Sorry for late reply, I'm on vacation and as commonly stated, "with limited email access" Looking at the python script, what you probably want to set first is your ldap host. So first line to change is line 4: LDAP_HOST="". In my cas it's something like LDAP_HOST="ldap://myCompanyInterlaHost.internalDomain" Next step is to find out the options (in red) to set in line 24. ldap_result=Popen(["ldapsearch", "-S", "displayName", "-x", "-b", "dc=localInfoToChange,dc=fr", "-H", LDAP_HOST, "-LLL", "(displayName="+KEYWORD+"*
  9. Hello, very nice workflow. I found issues while using it (did not work at first place). After investigation I found that: 1) I did not set first the option to "Enable access for assistive devices and applications" (see: http://support.apple.com/kb/HT6026). Without this, the workflow does not work. 2) my language is in French and it did not work unless I set "deviceselected" as «class utf8» as follow: set deviceselected to the value of text field 1 of row i of table 1 of scroll area 1 of tab group 1 of window 1 as «class utf8» Indeed, my headphone is named: "écouteur" ... I wanted to
  10. [version 1.1 on GitHub does fix a regression that prevented multiple image selection] Hello, I have a Macbook pro retina. And every time I need to share a screenshot with friends or co-workers, I have to resize them as this screenshots will just be too big to be shared on their original size. Then I wrote this quick and dirty workflow that does resize you images selection while choosing your preferred percentage. Personally I usually use 40% ... When I say quick and dirty, it's because I use a build-in automator function that does just that for me. But I had to create as many "a
  11. Hello Segphaul, this look really cool. unfortunately, I can't make it to work Do I need some python library install to make it work ? Like installing pygments? Am I the only one for whom this does not work out of the box ? O.
  12. Hello, Here is a yet another "System file show/hide toggle". Sorry for spamming, I should have search before, as wile writing this note, I see this have been done already here. You can still download it from GitHub. O.
  13. [sorry this workflow might interest only a limitted number of persons - I thought I would still share it here] WWDC Search 1.1 workflow Dependency: be registred as an Apple developper. This workflow comes with a bash script that download WWDC 2013 video sessions (and PDF presentations). To download WWDC sessions, you must have Apple developper portal credentials Usage: wwdc <keyword> Options: while typing "wwdc", you will have option to search for: the pdf (presentation) version of a session, then open it or download it if not already downloded. the video version of
  14. Hello mikedvzo, in my case LDAP request does not require authentication as it's 1) inside my company network and 2) the directory I'm querying does provide only basics info. If I needed to perform an authenticated request and take the password from keychain (while using python), I would start looking from there: https://pypi.python.org/pypi/keyring#what-is-python-keyring-lib Tell us if you can move forward with this ? O.
  15. I knew I would do something stupid. This is all me ;( Thanks for the tip! O.
×
×
  • Create New...