https://developer.zendesk.com/rest_api/docs/core/bookmarks#create-bookmark
971936
def bookmark_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/bookmarks.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
275813
def parse_bookmark_data (data):
    
    for url, name in parse_bookmark_json(json.loads(data)):
        yield url, name
477661
def add_bookmark(title, href, attributes = {}, &block)
      attributes = attributes.merge :title => title, :href => href
      add_child build(:bookmark, attributes, &block)
    end
276243
def parse_a_bookmark line
      line = line.strip
      if line =~ /^<DT><H3/
        @h3_tags << h3_tags(line)
      elsif line =~ /^<\/DL>/
        @h3_tags.pop
      elsif line =~ /<DT><A HREF="http/
        @bookmarks << NetscapeBookmark.from_string(line)
        if (not @h3_tags.empty?) && (not @bookmarks.last.nil?)
          @bookmarks.last.add_tags @h3_tags
        end
      elsif line =~ /^<DD>/
        @bookmarks.last.description = line[4..-1].chomp
      end
    end
246173
protected I_CmsXmlContentValue getBookmark(String path, Locale locale) {

        return m_bookmarks.get(getBookmarkName(path, locale));
    }
1127028
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException
    {
        if ((iHandleType == DBConstants.BOOKMARK_HANDLE) && (bookmark instanceof String))     // It is okay to pass in a string, but convert it first!
            if ((this.getRecord().getCounterField() != null) || (this.getRecord().getKeyArea(DBConstants.MAIN_KEY_AREA).getKeyFields() > 1))
        {   // As a convenience convert a string bookmark to the proper bookmark
            try   {
            	bookmark = Converter.stripNonNumber(bookmark.toString());
                bookmark = new Integer((String)bookmark);
            } catch (NumberFormatException ex)  {
                bookmark = new StrBuffer((String)bookmark);
            }
        }
        if ((this.getRecord().getEditMode() == Constants.EDIT_IN_PROGRESS)
            || (this.getRecord().getEditMode() == Constants.EDIT_CURRENT))
        {
            Object oldBookmark = this.getHandle(iHandleType);
            if (bookmark != null) if (bookmark.equals(oldBookmark)) if (!this.getRecord().isModified(false))
                return this.getRecord();        // This is already your current record!
        }

        m_objectID = null;      // No current record
        m_dataSource = null;
        if (iHandleType == DBConstants.FULL_OBJECT_HANDLE)
        {
            if (!(bookmark instanceof String))
                return null;
            int iIndex = ((String)bookmark).lastIndexOf(HANDLE_SEPARATOR);
            if ((iIndex == -1) || (iIndex == ((String)bookmark).length() - 1))
                return null;
            String strRecord = ((String)bookmark).substring(0, iIndex);
            int iRecordIndex = strRecord.lastIndexOf(HANDLE_SEPARATOR, iIndex - 1);
            int iDBIndex = strRecord.lastIndexOf(HANDLE_SEPARATOR, iRecordIndex - 1);
            if (!strRecord.substring(iRecordIndex + 1, iIndex).equalsIgnoreCase(this.getRecord().getTableNames(false)))
                if (!strRecord.substring(iDBIndex + 1, iRecordIndex).equalsIgnoreCase(this.getDatabase().getDatabaseName(false)))
                    return null;    // Not the correct record or database
            bookmark = ((String)bookmark).substring(iIndex + 1);
            iHandleType = DBConstants.OBJECT_ID_HANDLE;
        }
        m_bIsOpen = false;
        boolean bSuccess = this.doSetHandle(bookmark, iHandleType);
        m_bIsOpen = true;
        if (bSuccess)
        {
            m_iRecordStatus = DBConstants.RECORD_NORMAL;
            this.getRecord().setEditMode(Constants.EDIT_CURRENT);
            Object[] rgobjEnabledFields = null;
            try {
                rgobjEnabledFields = this.getRecord().setEnableFieldListeners(false);
                this.dataToFields(this.getRecord());
            } catch (DBException ex)    {
                throw ex;
            } finally {
                this.getRecord().setEnableFieldListeners(rgobjEnabledFields);
            }
            this.getRecord().handleValidRecord(); // Display Fields
            return this.getRecord();
        }
        else
        {
            m_iRecordStatus = DBConstants.RECORD_INVALID | DBConstants.RECORD_AT_BOF | DBConstants.RECORD_AT_EOF;
            this.getRecord().handleNewRecord();     //? Display Fields (Should leave record in an indeterminate state!)
            this.getRecord().setEditMode(Constants.EDIT_NONE);  // Unknown status
            return null;
        }
    }
192265
def save_bookmark(self, slot_num):
        """"""
        bookmarks = CONF.get('editor', 'bookmarks')
        editorstack = self.get_current_editorstack()
        if slot_num in bookmarks:
            filename, line_num, column = bookmarks[slot_num]
            if osp.isfile(filename):
                index = editorstack.has_filename(filename)
                if index is not None:
                    block = (editorstack.tabs.widget(index).document()
                             .findBlockByNumber(line_num))
                    block.userData().bookmarks.remove((slot_num, column))
        if editorstack is not None:
            self.switch_to_plugin()
            editorstack.set_bookmark(slot_num)
351605
protected function getListBookmark()
    {
        $conditions = $this->query_filter;
        $conditions['user_id'] = $this->uid;
        $conditions['limit'] = $this->data_limit;

        return (array) $this->bookmark->getList($conditions);
    }
1064983
function setBookmarkURL () {
  var query = {};
  var options = form.getOptions();
  options.parse.json || (query["allow-json"] = "no");
  options.parse.yaml || (query["allow-yaml"] = "no");
  options.parse.text || (query["allow-text"] = "no");
  options.parse.json.allowEmpty || (query["allow-empty"] = "no");
  options.parse.binary || (query["allow-unknown"] = "no");
  options.resolve.external || (query["refs-external"] = "no");
  options.dereference.circular || (query["refs-circular"] = "no");
  options.validate.schema || (query["validate-schema"] = "no");
  options.validate.spec || (query["validate-spec"] = "no");

  var method = form.method.button.val();
  method === "validate" || (query.method = method);

  var url = form.url.val();
  url === "" || (query.url = url);

  var bookmark = "?" + qs.stringify(query);
  form.bookmark.attr("href", bookmark);
}
937031
def set_bookmark(self, slot_num):
        """"""
        if self.data:
            editor = self.get_current_editor()
            editor.add_bookmark(slot_num)
142427
def bookmarks(self):
        """"""
        cmd = [HG, 'bookmarks']
        output = self._command(cmd).decode(self.encoding, 'replace')
        if output.startswith('no bookmarks set'):
            return []
        results = []
        for line in output.splitlines():
            m = bookmarks_rx.match(line)
            assert m, 'unexpected output: ' + line
            results.append(m.group('name'))
        return results
535569
function () {
            var me = this;
            if (!me.lastBk) {
                me.lastBk = me.selection.getRange().createBookmark(true);
            }
            me.container.style.display = 'none'
        }
1164203
def bookmark_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/bookmarks/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
1128606
def parse_bookmark_file (file):
    
    for url, name in parse_bookmark_json(json.load(file)):
        yield url, name
44507
def bookmark_show(bookmark_id_or_name):
    
    client = get_client()
    res = resolve_id_or_name(client, bookmark_id_or_name)
    formatted_print(
        res,
        text_format=FORMAT_TEXT_RECORD,
        fields=(
            ("ID", "id"),
            ("Name", "name"),
            ("Endpoint ID", "endpoint_id"),
            ("Path", "path"),
        ),
        simple_text=(
            # standard output is endpoint:path format
            "{}:{}".format(res["endpoint_id"], res["path"])
            # verbose output includes all fields
            if not is_verbose()
            else None
        ),
    )
128634
function( normalized ) {
			var bookmarks = [];

			for ( var i = 0; i < this.length; i++ )
				bookmarks.push( this[ i ].createBookmark2( normalized ) );

			return bookmarks;
		}
991816
function createPagesMetadata(src, dest) {
  return new Promise((resolve, reject) => {
    const thisTaskName = swlog.logSubStart('create metadata file');
    const outputStr = sketchtoolExec(`metadata ${src}`)
    const ignoredPages = ['Symbols', 'Icon Sheet', '------------']

    let customObj = { categories: [] };
    const dataObj = JSON.parse(outputStr);

    // Loop through pages, then arboards, to create a
    // simple mapping of names (ignoring certain pages)
    // and naming pages "categories" and artboards "icons"
    for (const pageId in dataObj.pagesAndArtboards) {
      if (dataObj.pagesAndArtboards.hasOwnProperty(pageId)
        && ! ignoredPages.includes(dataObj.pagesAndArtboards[pageId].name)) {

        const tempObj = {
          name: dataObj.pagesAndArtboards[pageId].name,
          icons: []
        };

        for (const ab in dataObj.pagesAndArtboards[pageId].artboards) {
          if (dataObj.pagesAndArtboards[pageId].artboards.hasOwnProperty(ab)) {
            tempObj.icons.push(dataObj.pagesAndArtboards[pageId].artboards[ab].name);
          }
        }
        tempObj.icons.sort();
        customObj.categories.push(tempObj);
      }
    }
    fs.writeFileSync(`${dest}/metadata.json`, JSON.stringify(customObj, null, 4), 'utf-8');
    swlog.logSubEnd(thisTaskName);
    resolve();
  });
}