Jump to content

mdreizin

Member
  • Posts

    9
  • Joined

  • Last visited

Posts posted by mdreizin

  1. It works just perfect!

     

    Is there any way to add support of chrome's history? I would almost forget about url bar in chrome, If I have history in alfred. 

     

     
    I did quick research and here is some technical details:
     
    Google Chrome/Chromium application locks "History" database :( when it is running and it means that if you try to open and search something via database you will get:
    $ sqlite3 "/Users/$USER/Library/Application Support/Google/Chrome/Default/History"
    SQLite version 3.7.12 2012-04-03 19:43:07
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    sqlite> select * from urls;
    Error: database is locked
    sqlite> 
    From my point of view this feature wouldn't useful, because you have to remember to close the application before searching.
  2. I've created a small command line tool which should hopefully help you re-normalise any strings:

     

    https://dl.dropboxusercontent.com/u/6749767/Alfred/normalise.zip

     

    If you include this in your workflow itself, you should be able to run it directly like this:

     

    usage: ./normalise -form NFC й

     

    You can add -verbose after NFC to see what is happening, or no arguments to see the options.

     

    Let me know if that helps at all :)

     

     
    Hi Andrew,
     
    It helps me to resolve my issue.
     
    Thanks a lot ;)
  3. Alfred uses NSTask to bridge across to the scripting language. Cocoa automatically normalises any passed in arguments with decomposition which splits the characters down as you see. You'll need to re-normalise into the format you need.

     

    http://en.wikipedia.org/wiki/Unicode_equivalence#Normalization

     

    I've done plenty of research over this, one beta build even had a way to set the normalisation type in the workflow, but NSTask always re-normalised so it was removed.

     

    Cheers,

    Andrew

     

    Andrew, thanks a lot for the reply. I will try to de-normalize strings in my code.

  4. It seems app has an issue is related to incorrect encoding of {query} / script block.
     
    For instance I'm typing "й" symbol and app sends it as 4 bytes, but actually it is 2 bytes in utf-8.
     
    Could you please explain me:

    • How does app encode {query} / script block?
    • What kind of encodings does it use for that?

    If you will try to run "init.rb" via terminal you will get:
     

    ruby -Ku "init.rb" "й"
    
    <?xml version="1.0"?><items><item uid="stats-0" valid="yes"><title>System</title><subtitle>hex: ["d0b9"], size: 2</subtitle><icon>icon.png</icon></item><item uid="stats-1" valid="yes"><title>Query</title><subtitle>hex: ["d0b9"], size: 2</subtitle><icon>icon.png</icon></item></items>

    BUT if you will try to run code via workflow you will get:

    <?xml version="1.0"?><items><item uid="stats-0" valid="yes"><title>System</title><subtitle>hex: ["d0b9"], size: 2</subtitle><icon>icon.png</icon></item><item uid="stats-1" valid="yes"><title>Query</title><subtitle>hex: ["d0b8cc86"], size: 4</subtitle><icon>icon.png</icon></item></items>

    You can find the workflow here.
     

    OS X 10.8.3
    Alfred 2.0.2 (178)
    Ruby 1.8.7 / 1.9.x / 2.0.x
    
×
×
  • Create New...