Skip to content

Delicious import / add not UTF-8 safe #27

@j4n

Description

@j4n

When importing from delicious, the gitmark_add.py script chokes on an UTF-8 character (µ) in a tag:

    adding mark None to repo False
    {
        "extended": "", 
        "hash": "....", 
        "description": "micro-OSC | CNMAT", 
        "rights": null, 
        "creator": "delicious:user", 
        "uri": "http://cnmat.berkeley.edu/research/uosc", 
        "private": false, 
        "meta": "....", 
        "time": "2009-02-23T00:07:07Z", 
        "tags": [
            "osc", 
            "\u00b5c", 
            "tm", 
            "pic"
        ]
    }
    osc
    [u'osc']
    µc
    [u'osc', u'\xb5c']
    tm
    [u'osc', u'\xb5c', u'tm']
    pic
    [u'osc', u'\xb5c', u'tm', u'pic']
    tags filename/Users/ja/Documents/gitmarks/public/tags/osc
    tags filename/Users/ja/Documents/gitmarks/public/tags/tm
    tags filename/Users/ja/Documents/gitmarks/public/tags/pic
    Traceback (most recent call last):
      File "./delicious_import.py", line 158, in <module>
        import_delicious_to_local_git(username, password)
      File "./delicious_import.py", line 108, in import_delicious_to_local_git
        err = addToRepo(mark,doPush=False)
      File ".../gitmarks_2/gitmark_add.py", line 107, in addToRepo
        return addToPublicRepo(gitmarksObj, doPush)
      File ".../gitmarks_2/gitmark_add.py", line 159, in addToPublicRepo
        print 'tags filename' + str(filename)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions