page descriptions
 <meta name="description" content="Description goes here." />
973565
def description(options={})
      options ||= {}
      if options.is_a? String
        TopHat.current['description'] = options

      else
        default_description = options.delete(:default)
        options[:name] = 'description'
        options[:content] = TopHat.current['description'].blank? ? default_description : TopHat.current['description']

        meta_tag(options) if options[:content]
      end
    end
955838
def description(self, request, id, description):
        
        request.data = json.dumps({
            "description": description
        })
        return self.send(request, id).json()['html_url']
1046837
private static void addDescriptions(Entry entry, String... descriptions) {
        try {
            entry.add(SchemaConstants.OBJECT_CLASS_ATTRIBUTE, SchemaConstants.DESCRIPTIVE_OBJECT_OC);
            if (descriptions == null) {
                // case 1
                entry.add(SchemaConstants.EMPTY_FLAG_ATTRIBUTE, String.valueOf(false));
            } else if (descriptions.length == 1 && descriptions[0].isEmpty()) {
                // case 2
                entry.add(SchemaConstants.EMPTY_FLAG_ATTRIBUTE, String.valueOf(true));
            } else {
                // case 3
                entry.add(SchemaConstants.STRING_ATTRIBUTE,
                        StringUtils.join(descriptions, ServerConfig.multipleValueSeparator));
            }
        } catch (LdapException e) {
            throw new LdapRuntimeException(e);
        }
    }
862564
function() {
    var metadata = {};
    var values = {};
    var metaElements = this._doc.getElementsByTagName("meta");

    // Match "description", or Twitter's "twitter:description" (Cards)
    // in name attribute.
    var namePattern = /^\s*((twitter)\s*:\s*)?(description|title)\s*$/gi;

    // Match Facebook's Open Graph title & description properties.
    var propertyPattern = /^\s*og\s*:\s*(description|title)\s*$/gi;

    // Find description tags.
    this._forEachNode(metaElements, function(element) {
      var elementName = element.getAttribute("name");
      var elementProperty = element.getAttribute("property");

      if ([elementName, elementProperty].indexOf("author") !== -1) {
        metadata.byline = element.getAttribute("content");
        return;
      }

      var name = null;
      if (namePattern.test(elementName)) {
        name = elementName;
      } else if (propertyPattern.test(elementProperty)) {
        name = elementProperty;
      }

      if (name) {
        var content = element.getAttribute("content");
        if (content) {
          // Convert to lowercase and remove any whitespace
          // so we can match below.
          name = name.toLowerCase().replace(/\s/g, '');
          values[name] = content.trim();
        }
      }
    });

    if ("description" in values) {
      metadata.excerpt = values["description"];
    } else if ("og:description" in values) {
      // Use facebook open graph description.
      metadata.excerpt = values["og:description"];
    } else if ("twitter:description" in values) {
      // Use twitter cards description.
      metadata.excerpt = values["twitter:description"];
    }

    metadata.title = this._getArticleTitle();
    if (!metadata.title) {
      if ("og:title" in values) {
        // Use facebook open graph title.
        metadata.title = values["og:title"];
      } else if ("twitter:title" in values) {
        // Use twitter cards title.
        metadata.title = values["twitter:title"];
      }
    }

    return metadata;
  }
970421
def _page_text(page, nowrap=False):
    
    title = page.data['title']
    title = "%s\n%s" % (title, "=" * len(title))

    desc = page.data.get('description')
    if desc:
        desc = "_%s_" % desc

    img = _text_image(page)

    pars = page.data.get('extext')

    if pars:
        # pars = pars.replace(' * ', '\n * ')
        pars = re.sub(r'[ ]+\*[ ]+', '* ', pars)

    if pars and not nowrap:
        parlist = []
        for par in pars.split("\n\n"):
            parlist.append("\n".join(textwrap.wrap(par)))

        disambiguation = page.data.get('disambiguation')
        if disambiguation:
            parlist.append(' * ' + "\n * ".join(page.data.get('links')))

        pars = "\n\n".join(parlist)

    url = '<%s>' % page.data['url']

    txt = []
    txt.append(title)
    txt.append(desc)
    txt.append(url)
    txt.append(pars)
    txt.append(img)

    return "\n\n".join([x for x in txt if x])
750493
function getPageMeta() {
        var data = detectFeatures();

        data.title = document.title;
        data.url = window.location.href;
        data.path = document.location.pathname;
        data.referrer = document.referrer;
        data.url_section = window.location.pathname.split('/').filter(function(part){
            return part.length !== 0;
        }).map(function(part){
            return part.replace(/\.[^/.]+$/, "");
        });
        data.hash = window.location.hash;
        data.query_string = window.location.search;

        return data;
    }
571998
protected IModel<String> newDescription()
	{
		return ResourceModelFactory.newResourceModel(
			ResourceBundleKey.builder().key("page.meta.description").defaultValue("").build(),
			this);
	}
362844
def get_description(self):
        """"""
        if self._description:
            return self._description

        try:
            trailerURL= "http://trailers.apple.com%s" % self.baseURL
            response = urllib.request.urlopen(trailerURL)
            Reader = codecs.getreader("utf-8")
            responseReader = Reader(response)
            trailerHTML = responseReader.read()
            description = re.search('<meta *name="Description" *content="(.*?)" *[/]*>'
                                    ,trailerHTML)
            if description:
                self._description = description.group(1)
            else:
                self._description = "None"
        except:
            self._description = "Error"
        return self._description
1072190
protected void initDetailPageInfos() {

        for (CmsUUID id : m_data.getDetailPageTable().getAllIds()) {
            CmsDetailPageInfo info = m_data.getDetailPageTable().get(id);
            m_allDetailPageInfos.put(id, info);
        }
    }
385871
def _html_title(page):
    
    link = "<a href=\"%s\">%s</a>" % (page.data.get('url'),
                                      page.data.get('title'))
    desc = page.data.get('description')
    if desc:
        link += "&mdash;<i>%s</i>" % desc
    else:
        link += "&mdash;<i>description</i>"
    if link:
        return "<p>%s</p>" % link
314389
def sitemap_meta_description
      return controller.sitemap_meta_data[:description].blank? ? nil : tag(:meta, {name: :description, content: controller.sitemap_meta_data[:description]}, false, false)
    end
976166
public function checkPageSubjectInMetaDescription() {
        if ($this->checkPageSubjectDefined()) {

            if (preg_match('/' . preg_quote($this->owner->SEOPageSubject, '/') . '/i', $this->owner->MetaDescription)) {
                return true;
            }
            else {
                return false;
            }
        }
        return false;

    }
592177
def add_page(self, title=None, content=None, old_url=None,
                 tags=None, old_id=None, old_parent_id=None):
        
        if not title:
            text = decode_entities(strip_tags(content)).replace("\n", " ")
            title = text.split(". ")[0]
        if tags is None:
            tags = []
        self.pages.append({
            "title": title,
            "content": content,
            "tags": tags,
            "old_url": old_url,
            "old_id": old_id,
            "old_parent_id": old_parent_id,
        })
621825
public function metaData()
    {
        Meta::setTitle($this->title)
          ->set("description", $this->description)
          ->set("og:type", "profile", "property")
          ->set("og:title", $this->title, "property")
          ->set("og:description", $this->description, "property")
          ->set("og:url", $this->href, "property")
          ->setCanonical($this->href)
          ->setHrefLangData($this)
        ->setWildcards(
            [
            '{{title}}' => $this->title,
            '{{sitename}}' => settings('siteTitle')
              ]
        );
    }
805250
def meter_description(name)
      content_tag(:p) do
        concat content_tag(:b, name)
        concat ' - '
        concat t(name, scope: :meter_cat)
      end
    end
504549
protected function collectMetaDataFromPage()
    {
        // #################
        // Page meta
        // #################

        // description
        $tmp = $this->cObj->stdWrap(
            $this->tsSetupSeo['conf.']['description_page'],
            $this->tsSetupSeo['conf.']['description_page.']
        );
        if (!empty($tmp)) {
            $this->pageMeta['description'] = $tmp;
        }

        // keywords
        $tmp = $this->cObj->stdWrap(
            $this->tsSetupSeo['conf.']['keywords_page'],
            $this->tsSetupSeo['conf.']['keywords_page.']
        );
        if (!empty($tmp)) {
            $this->pageMeta['keywords'] = $tmp;
        }

        // title
        $tmp = $this->cObj->stdWrap(
            $this->tsSetupSeo['conf.']['title_page'],
            $this->tsSetupSeo['conf.']['title_page.']
        );
        if (!empty($tmp)) {
            $this->pageMeta['title'] = $tmp;
        }

        // author
        $tmp = $this->cObj->stdWrap(
            $this->tsSetupSeo['conf.']['author_page'],
            $this->tsSetupSeo['conf.']['author_page.']
        );
        if (!empty($tmp)) {
            $this->pageMeta['author'] = $tmp;
        }

        // email
        $tmp = $this->cObj->stdWrap(
            $this->tsSetupSeo['conf.']['email_page'],
            $this->tsSetupSeo['conf.']['email_page.']
        );
        if (!empty($tmp)) {
            $this->pageMeta['email'] = $tmp;
        }

        // last-update
        $tmp = $this->cObj->stdWrap(
            $this->tsSetupSeo['conf.']['lastUpdate_page'],
            $this->tsSetupSeo['conf.']['lastUpdate_page.']
        );
        if (!empty($tmp)) {
            $this->pageMeta['lastUpdate'] = $tmp;
        }

        // #################
        // Geo
        // #################

        // tx_metaseo_geo_lat
        $tmp = $this->cObj->stdWrap(
            $this->tsSetupSeo['conf.']['tx_metaseo_geo_lat'],
            $this->tsSetupSeo['conf.']['tx_metaseo_geo_lat.']
        );
        if (!empty($tmp)) {
            $this->pageMeta['geoPositionLatitude'] = $tmp;
        }

        // tx_metaseo_geo_long
        $tmp = $this->cObj->stdWrap(
            $this->tsSetupSeo['conf.']['tx_metaseo_geo_long'],
            $this->tsSetupSeo['conf.']['tx_metaseo_geo_long.']
        );
        if (!empty($tmp)) {
            $this->pageMeta['geoPositionLongitude'] = $tmp;
        }

        // tx_metaseo_geo_place
        $tmp = $this->cObj->stdWrap(
            $this->tsSetupSeo['conf.']['tx_metaseo_geo_place'],
            $this->tsSetupSeo['conf.']['tx_metaseo_geo_place.']
        );
        if (!empty($tmp)) {
            $this->pageMeta['geoPlacename'] = $tmp;
        }

        // tx_metaseo_geo_region
        $tmp = $this->cObj->stdWrap(
            $this->tsSetupSeo['conf.']['tx_metaseo_geo_region'],
            $this->tsSetupSeo['conf.']['tx_metaseo_geo_region.']
        );
        if (!empty($tmp)) {
            $this->pageMeta['geoRegion'] = $tmp;
        }

        // #################
        // Process meta tags
        // #################

        // process page meta data
        foreach ($this->pageMeta as $metaKey => $metaValue) {
            $metaValue = trim($metaValue);

            if (!empty($metaValue)) {
                $this->tsSetupSeo[$metaKey] = $metaValue;
            }
        }
    }
414888
def _get_tab_description(self):
        """"""
        text = self._get_page().text_tab
        if "(" in text:
            text = text[:text.index("(") - 1]
        text = text[0].lower() + text[1:]
        return text