parameters: (json_dict, bookmarks)
docstring: Given a *json_dict*, updates *bookmarks* with each URL as it is found
      within.
  
      .. note:: Only works with Netscape-style bookmarks.json files.
docstring_summary: Given a *json_dict*, updates *bookmarks* with each URL as it is found
      within.
docstring_tokens: Given a * json_dict * updates * bookmarks * with each URL as it is found within .
function: def get_ns_json_bookmarks(json_dict, bookmarks):
      """
      Given a *json_dict*, updates *bookmarks* with each URL as it is found
      within.
  
      .. note:: Only works with Netscape-style bookmarks.json files.
      """
      if json_dict.has_key('children'):
          for child in json_dict['children']:
              if child['type'] == 'text/x-moz-place':
                  if not bookmarks[0].has_key(child['uri']):
                      # Browser won't let you load file: URIs from HTTP pages
                      if child['uri'][0:6] not in ['place:', 'file:/']:
                          # Note the use of json_dict as bookmarks[1] here:
                          tags = get_json_tags(bookmarks[1], child['uri'])
                          if not tags:
                              tags = ['Untagged']
                          if child.has_key("annos"):
                              notes = child["annos"]
                          else:
                              notes = ""
                          if child['lastModified'] > 9999999999999:
                              # Chop off the microseconds to make it 13 digits
                              child['lastModified'] = int(child['lastModified']/1000)
                          elif child['lastModified'] < 10000000000:
                              child['lastModified'] = int(child['lastModified']*1000)
                          if child['dateAdded'] > 9999999999999: # Delicious
                              # Chop off the microseconds to make it 13 digits
                              child['dateAdded'] = int(child['dateAdded']/1000)
                          elif child['dateAdded'] < 10000000000: # Chrome
                              child['dateAdded'] = int(child['dateAdded']*1000)
                          bm = {
                              'url': child['uri'],
                              'name': child['title'].strip(),
                              'tags': tags,
                              'notes': notes,
                              'visits': 0, # visits
                              'updated': child['lastModified'], # updated
                              'created': child['dateAdded'], # created
                              'updateSequenceNum': 0, # updateSequenceNum
                              'images': {} # No icons in JSON :(
                          }
                          bookmarks[0].update({child['uri']: bm})
              elif child['type'] == 'text/x-moz-place-container':
                  get_ns_json_bookmarks(child, bookmarks)
function_tokens: def get_ns_json_bookmarks ( json_dict , bookmarks ) : if json_dict . has_key ( 'children' ) : for child in json_dict [ 'children' ] : if child [ 'type' ] == 'text/x-moz-place' : if not bookmarks [ 0 ] . has_key ( child [ 'uri' ] ) : # Browser won't let you load file: URIs from HTTP pages if child [ 'uri' ] [ 0 : 6 ] not in [ 'place:' , 'file:/' ] : # Note the use of json_dict as bookmarks[1] here: tags = get_json_tags ( bookmarks [ 1 ] , child [ 'uri' ] ) if not tags : tags = [ 'Untagged' ] if child . has_key ( "annos" ) : notes = child [ "annos" ] else : notes = "" if child [ 'lastModified' ] > 9999999999999 : # Chop off the microseconds to make it 13 digits child [ 'lastModified' ] = int ( child [ 'lastModified' ] / 1000 ) elif child [ 'lastModified' ] < 10000000000 : child [ 'lastModified' ] = int ( child [ 'lastModified' ] * 1000 ) if child [ 'dateAdded' ] > 9999999999999 : # Delicious # Chop off the microseconds to make it 13 digits child [ 'dateAdded' ] = int ( child [ 'dateAdded' ] / 1000 ) elif child [ 'dateAdded' ] < 10000000000 : # Chrome child [ 'dateAdded' ] = int ( child [ 'dateAdded' ] * 1000 ) bm = { 'url' : child [ 'uri' ] , 'name' : child [ 'title' ] . strip ( ) , 'tags' : tags , 'notes' : notes , 'visits' : 0 , # visits 'updated' : child [ 'lastModified' ] , # updated 'created' : child [ 'dateAdded' ] , # created 'updateSequenceNum' : 0 , # updateSequenceNum 'images' : { } # No icons in JSON :( } bookmarks [ 0 ] . update ( { child [ 'uri' ] : bm } ) elif child [ 'type' ] == 'text/x-moz-place-container' : get_ns_json_bookmarks ( child , bookmarks )