Metadata: add description
355591
def metadata_add_description(self):
        
        service_description = {}
        if (self.args.json):
            service_description = json.loads(self.args.json)
        if (self.args.url):
            if "url" in service_description:
                raise Exception("json service description already contains url field")
            service_description["url"] = self.args.url
        if (self.args.description):
            if "description" in service_description:
                raise Exception("json service description already contains description field")
            service_description["description"] = self.args.description
        metadata = load_mpe_service_metadata(self.args.metadata_file)
        # merge with old service_description if necessary
        if ("service_description" in metadata):
            service_description = {**metadata["service_description"], **service_description}
        metadata.set_simple_field("service_description", service_description)
        metadata.save_pretty(self.args.metadata_file)
295931
function create_meta_info (meta_title, meta_description, meta_sort) {

  var yamlDocument = {};
  var meta_info_is_present = meta_title || meta_description || meta_sort;

  if (meta_info_is_present) {
    if (meta_title)       { yamlDocument.Title       = meta_title;              }
    if (meta_description) { yamlDocument.Description = meta_description;        }
    if (meta_sort)        { yamlDocument.Sort        = parseInt(meta_sort, 10); }

    return '---\n' + yaml.safeDump(yamlDocument) + '---\n';
  } else {
    return '---\n---\n';
  }

}
717935
def metadata(self):
        

        sheet = self.result.add_sheet("metadata")
        self.header(sheet, "metadata")

        n_row = 1  # row number

        for k in self.po.metadata:
            row = sheet.row(n_row)
            row.write(0, k)
            row.write(1, self.po.metadata[k])
            n_row += 1
            sheet.flush_row_data()
478245
def descriptions(self):
        """"""
        return {key: val[2] for key, val in six.iteritems(self.defaultParams)
                if len(val) >= 3}
1115736
def add_description(method):
    """"""

    @wraps(method)
    def wrapped(self, node, *args):
        return join([node.description, method(self, node, *args)], "\n")

    return wrapped
363808
public RunTime addDetail(String description){
		RunTime child = new RunTime(description);
		detail.put(description, child);
		return child;
	}
105207
def description(self, description):
        
        self._data['description'] = description
        request = self._base_request
        request['description'] = description
        return self._tc_requests.update(request, owner=self.owner)
293503
def set_description(self, description):
        """"""
        self._description = validate_type(description, type(None), *six.string_types)
73440
def add_description(description)
      return if ! description
      comment = description.strip
      add_comment(comment) if comment && ! comment.empty?
    end
906056
private function AddDescriptionField()
    {
        $name = 'Description';
        $this->AddField(Input::Text($name, $this->page->GetDescription()));
    }
167794
def put_admin_metadata(self, admin_metadata):
        """"""
        logger.debug("Putting admin metdata")
        text = json.dumps(admin_metadata)
        key = self.get_admin_metadata_key()
        self.put_text(key, text)
435617
def add_item_metadata(self, handle, key, value):
        
        _mkdir_if_missing(self._metadata_fragments_abspath)

        prefix = self._handle_to_fragment_absprefixpath(handle)
        fpath = prefix + '.{}.json'.format(key)

        _put_obj(fpath, value)
300851
def add_metadata_comments(self, d, metadata):
        

        if len(metadata) > 2:
            string_pairs = metadata[1:-1]  # get all metadata pairs
            for sp in string_pairs:
                # get the raw metadata key

                if isinstance(sp.children[0], Token):
                    token = sp.children[0]
                    assert token.type == "UNQUOTED_STRING"
                    key = token.value
                else:
                    # quoted string (double or single)
                    token = sp.children[0].children[0]
                    key = token.value

                # clean it to match the dict key
                key = self._mapfile_todict.clean_string(key).lower()
                assert key in d.keys()
                key_comments = self.get_comments(sp.meta)
                d["__comments__"][key] = key_comments

        return d
924890
def add_metadata(self, key, value):
        
        self._metadata[key] = value

        # write the current metadata to file
        json.dump(self._metadata, open(self.metadata_filename, 'w'),
                  indent=JSON_INDENT,
                  sort_keys=True)
1349369
def stk_description_metadata(description):
    
    description = description.strip()
    if not description:
        return []
    try:
        description = bytes2str(description)
    except UnicodeDecodeError as exc:
        log.warning('stk_description_metadata: %s: %s',
                    exc.__class__.__name__, exc)
        return []
    result = []
    for plane in description.split('\x00'):
        d = {}
        for line in plane.split('\r\n'):
            line = line.split(':', 1)
            if len(line) > 1:
                name, value = line
                d[name.strip()] = astype(value.strip())
            else:
                value = line[0].strip()
                if value:
                    if '' in d:
                        d[''].append(value)
                    else:
                        d[''] = [value]
        result.append(d)
    return result
1228797
def set_node_description(self, node: BaseEntity, description: str) -> None:
        """"""
        self._set_node_attr(node, DESCRIPTION, description)
525903
def add_custom_metadata(self, key, value, meta_type=None):
        
        self.metadata.append({'key': key, 'value': value, 'type': meta_type})