Jump to content

jmjeong

Member
  • Posts

    86
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by jmjeong

  1. How are you generating the XML? Are you sure it's actually UTF-8 encoded?

     

    It still looks like an encoding problem (i.e. it's correctly encoded for xmlformat, but not when generated by your script).

     

    Thank you for the comments. I will test it more and post the result. 

  2. Today, it happened again.  :-(

    I added encoding="utf-8" in xml header. 

     

     

    13990073744_aeacf0ff03.jpg

     

     

    Starting debug for 'pinboard'

     

    [ERROR: alfred.workflow.input.scriptfilter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 5.)'. Row 1, Col 189: 'Extra content at the end of the document' in XML:

    <item arg="http://www.cocos2d-iphone.org/getting-started/" uid="com.jmjeong.alfredv2.pinboard-27"><title>Getting Started | Obj-C based 2D engine for iOS, OSX and Android</title><subtitle>http://www.cocos2d-iphone.org/getting-started/</subtitle><icon>item.png</icon></item><item arg="http://blog.naver.com/PostView.nhn?blogId=namkoong&logNo=130076721452&parentCategoryNo=&categoryNo=&viewDate=&isShowPopularPosts=false&from=postView" uid="com.jmjeong.alfredv2.pinboard-28"><title> 싱가폴에서의 브롬톤 : 네이버 블로그</title><subtitle>http://blog.naver.com/PostView.nhn?blogId=namkoong&logNo=130076721452&parentCategoryNo=&categoryNo=&viewDate=&isShowPopularPosts=false&from=postView</subtitle><icon>item.png</icon></item><item arg="http://blog.naver.com/PostView.nhn?blogId=neo_flavor&logNo=60195970808" uid="com.jmjeong.alfredv2.pinboard-29"><title> 브롬톤 S2L RG 2013년식, 나의 3번째 브롬톤. : 네이버 블로그</title><subtitle>http://blog.naver.com/PostView.nhn?blogId=neo_flavor&logNo=60195970808</subtitle><icon>item.png</icon></item><item arg="http://jpsarda.tumblr.com/post/24983791554/mix

    ....

    ....

     

     

    There is no error when the exact same output is displayed with xmlformat script

     

    cat << EOB

    <?xml version="1.0" encoding="utf-8"?><items><item arg="http://shopping.naver.com/search/all_search.nhn?query=%EC%BD%94%EC%BF%A4%20%EA%B7%B8%EB%A6%AC%EB%93%9C%EC%9E%87&frm=NVSCPRO" uid="com.jmjeong.alfredv2.pinboard-0"><title>코쿤 그리드잇 검색결과 : 네이버 지식쇼핑</title><subtitle>http://shopping.naver.com/search/all_search.nhn?query=%EC%BD%94%EC%BF%A4%20%EA%B7%B8%EB%A6%AC%EB%93%9C%EC%9E%87&frm=NVSCPRO</subtitle><icon>item.png</icon></item><item arg="http://radiofun.tumblr.com/post/83412070151/flipboard-layout-duplo" uid="com.jmjeong.alfredv2.pinboard-1"><title>nothing special • Flipboard의 Layout 엔진, Duplo</title><subtitle>http://radiofun.tumblr.com/post/83412070151/flipboard-layout-duplo</subtitle><icon>item.png</icon>

    ...

    EOB

     

     

     

    Any comments are welcome. 

  3. It looks like an encoding issue.

    Try adding the encoding argument to your XML header:

     

    <?xml version="1.0" encoding="utf-8"?>
    
    It goes without saying that you should also ensure that the XML is encoded with the corresponding, err, encoding.

     

     

    Thank you for your comments. Adding the encoding argument solves the problem. 

     

    I will check it with another data set.

  4. Hi, I am using Alfred v2.2(243)

     

    I am author of alfred-pinboard and other workflows. You can look up my workflow from github.com/jmjeong/alfred-extension

     

    I have some question about alfred workflow extension. I tried to find document about this, but I failed. 

     

    1. Is there any limit of items of workflow: the maximum number of items,  and maximum size of string?

    2. Is there any time lime for script to be executed?

     

    The result of of alfred-pinboard output is as follows when it is executed in the shell. 

     


     

    When it is executed in the alfred shell, the error message is displayed.  But it is random, sometime it is ok, but sometimes it displays error. 

     

    Starting debug for 'pinboard'

     

    [ERROR: alfred.workflow.input.scriptfilter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 4.)'. Row 1, Col 1: 'Document is empty' in XML:

    ></item><item arg="https://fnd.io/#/" uid="com.jmjeong.alfredv2.pinboard-33"><title>Experience the App Store and iTunes Anywhere | fnd</title><subtitle /><icon>item.png</icon></item><item arg="http://ludens.kr/741" uid="com.jmjeong.alfredv2.pinboard-34"><title>저작권 문제없는 고퀄리티 사진을 구할 수 있는 사이트 10곳 #Ludens</title><subtitle /><icon>item.png</icon></item><item arg="http://www.istockphoto.com/" 

     

    Screenshot%20of%20Alfred%20Preferences.j

     

     

    To test if the result xml is wrong, I make simple workflow to display the first result. 

     


     

    The result is ok. 

     

    ptest.png

     

     

    The first result xml seems to be ok in this test.  

     

    I don't guess why alfred-pinboard displays error. Most of the time, it is ok, but sometimes it displays error. 

     

    If you need any resource to reproduce this error, I could provide it. 

  5. Yet another alfred2-pinboard workflow. It provides INSTANT pinboard search and various functionality.

     

    Updated:

     

    - v1.2 : Remove the dependency of cron job 

    - v1.1 : add [send to Pocket]

     

     

    ::: Version 2.0 is released. <2014-05-27 Tue>

  6. You can grab it from GitHub. Exporting the source stopped after icon.png.

     

    I tried, but I can't find any problem. 

     

    export.json file is as follows:

     

     

    {
        "workflow-export" :
       {"directory" : "~/git/alfred-extension/test",
    "enable": true},
        "source-export":
    {"directory" : "~/git/alfred-extension/test",
    "enable": true}
    }
     
    Exported src directory is as follows:
     

    test.png

  7. Your workflow is really usefull when developing own workflows. With the source export I don't have to sync my git repo with the workflow folder manually. That's great.

    Recently, I moved all image ressources of my workflow into an img subfolder. Unfortunately, your export script does not include subdirectories. I am too inexperienced with Python to fix it on my own. Could you please modify your export script to also include directories?

    I would also prefer not to include the export.json in the packaged workflow file. As it is only usefull on my machine I do not really want to install a file with my local paths at someone else's machine.

     

    Version 2.6 handles sub-directory correctly now and adds export.json file to ignore list. 

  8. Indeed, that's tricky! But it seems Shawn Rice, the author of the help workflow was able to decrypt it, see http://www.alfredforum.com/topic/1653-workflows-help-workflow/

     

    That's just in case you wanted to add this, I personally don't use much hotkeys :-)

     

    Thanks again for this great workflow

     

    Thank you for the information. I will look up it. 

     

    -> Version 2.5 now displays hotkey information, too. 

  9. Ok, I now why it wasn't working ~/Dropbox/Library/Alfred 2/ I have space in the folder name, when I removed the space, it started to work. Could you fix the workflow to work also with spaces in folder names? Thanks.

     

    You're right. There was a problem if folder name has space. I released 2.4 version which fixed it. 

  10. Hi, it's not working for me.

     

    I edited the export.json file to this:

     

    {
        "workflow-export" :
    	    {"directory" : "~/Desktop",
    		 "enable": true},
        "source-export":
    		{"directory" : "~/Desktop",
    		 "enable": false}
    }
    

     

     

    Export always fail and it also created folder src in ~/Downloads. Am I doing something wrong? Thanks.

     

     

    I tried it in Battery.alfredworkflow, but I can't find any problem about export function. 

    Did you tried the new version? You can the latest version from https://github.com/jmjeong/alfred-extension/tree/master/managealfredextension   FYI, export.json file should be located in extension directory where you want to export such as "/user.workflow.DD0D36FD-8588-4FFE-8FC6-XXXXXXX".

  11. Tidy up LaunchPad in Mountain Lion(LinkDownload)



    screenshot.png

    Usage
     

    tdl appname :: Remove app icon from LaunchPad
    

     
    Mountain Lion's Launchpad is pretty good but it's still hard to get something out of it after you put it in if you didn't get it at the Mac App Store. If Launchpad Control is overkill for you, this might help.

     

    References

     

     

    Version History

    1.2 - March 30, 2013

    • Add help item
    • Sort app names alphabetically

    1.1 - March 30, 2013

    • Fix a problem of filename with korean encoding

    1.0 - March 30, 2013

    • Initial release
  12. Good Idea. 

     

     

    I begin to add to my workflow too.  I encountered the following error message.

    Jaemok-ui-Mac-Pro:user.workflow.3070F65C-8B64-42DB-BD0F-B69A2EB95612 jmjeong$ python feedback.py
    Traceback (most recent call last):
      File "feedback.py", line 107, in <module>
        do_feedback()
      File "feedback.py", line 32, in do_feedback
        local = json.load(f, encoding="utf-8")
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 278, in load
        **kw)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
        return cls(encoding=encoding, **kw).decode(s)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
        obj, end = self.scan_once(s, idx)
    ValueError: Expecting , delimiter: line 4 column 5 (char 163)
     
  13. Okay, when I run that from the command line, I get this:

    Traceback (most recent call last):
      File "main.py", line 29, in <module>
        plist = plistlib.readPlist(os.path.join(dirname, d, 'info.plist'))
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 78, in readPlist
        rootObject = p.parse(pathOrFile)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 406, in parse
        parser.ParseFile(fileobj)
    xml.parsers.expat.ExpatError: no element found: line 1, column 0
    
    Hope that's helpful. :huh:

    Try this version : https://github.com/jmjeong/alfred-extension/blob/master/managealfredextension/ManageAlfredExtension.alfredworkflow

  14. Very nice. And one more Dashboard widget can be put into retirement :D .

     

    Any way to specify how many days ahead it looks? (I'd like more if possible).

     

    You can specify the duration by 'agenda n'. 'agenda 7' display the 7 days event and remiders. 

     

    Also, maybe selecting one of the items could open to that item in iCal/Reminders app?

     

    I would like to add this feature at the first time. But it seems to be impossible because iCalBuddy does not return any information to open the record.

  15. Great!! I had this kind of extension planned to do, but my idea is to build an extension to browse other installed extensions, see their keywords and basic description, and launch them on enter (re-open Alfred with the keyword typed in). What do you think?

    If you download the new version, you can launch the selected extension with shift modifier.

  16. Great!! I had this kind of extension planned to do, but my idea is to build an extension to browse other installed extensions, see their keywords and basic description, and launch them on enter (re-open Alfred with the keyword typed in). What do you think?

     

    That's good idea.  I updated the extension.  In version 4, you can launch the selected extension with shift key.

  17. Thanks it is working fine now!

    This workflow is awesome !

     

    It would be great to have also the hotkey, but I don't know if this is easy to get from the plist.

     

    Cheers!

     

    You can get hot key information from plist variable in main.py  

     

    For example,  Cntl-Command-E is represented as  '{'type': 'alfred.workflow.trigger.hotkey', 'config': {'leftcursor': False, 'argument': 0, 'hotkey': 14, 'action': 0, 'hotstring': 'E', 'hotmod': 1310720, 'modsmode': 0}', but I don't know the whole information how to interpret.

×
×
  • Create New...