Пример #1
0
    def get_keywords(self):
        object = self.object

        ### Assign variables -----------------------
        dynamic_keywords = generate_meta_keywords(object.body)
        primary_keywords = get_setting("site", "global", "siteprimarykeywords")
        secondary_keywords = get_setting("site", "global", "sitesecondarykeywords")
        geo_location = get_setting("site", "global", "sitegeographiclocation")
        site_name = get_setting("site", "global", "sitedisplayname")

        creator_name = "%s %s" % (object.creator.first_name, object.creator.last_name)

        ### Build string -----------------------
        value = ""

        if primary_keywords:
            value = "%s %s" % (value, primary_keywords)
            value = value.strip()

        if object.headline:
            list = ["Articles", geo_location, site_name, "white paper", creator_name]

            # remove blank items
            for item in list:
                if not item.strip():
                    list.remove(item)

            value = "%s %s, %s" % (value, ", ".join(list), dynamic_keywords)

        else:
            list = ["Articles", geo_location, site_name, "white paper", secondary_keywords]
            value = "%s %s" % (value, "".join(list))

        return value
Пример #2
0
    def get_keywords(self):
        object = self.object

        ### Assign variables -----------------------  
        dynamic_keywords = generate_meta_keywords(object.body)
        geo_location = get_setting('site','global','sitegeographiclocation')
        site_name = get_setting('site','global','sitedisplayname')


        ### Build string -----------------------
        value = ''

        list = [
            'Photos',
            geo_location,
            site_name,
        ]

        # remove blank items
        for item in list:
            if not item.strip():
                list.remove(item)
 
        value = '%s %s, %s' % (value, ', '.join(list), dynamic_keywords)


        return value
Пример #3
0
    def get_keywords(self):
        object = self.object

        ### Assign variables -----------------------  
        dynamic_keywords = generate_meta_keywords(object.body)
        primary_keywords = get_setting('site','global','siteprimarykeywords')
        secondary_keywords = get_setting('site','global','sitesecondarykeywords')
        geo_location = get_setting('site','global','sitegeographiclocation')
        site_name = get_setting('site','global','sitedisplayname')

        creator_name = '%s %s' % (
            object.creator.first_name, 
            object.creator.last_name
        )

        ### Build string -----------------------
        value = ''

        if primary_keywords:
            value = '%s %s' % (value, primary_keywords)
            value = value.strip()

        if object.headline:
            list = [
                'Directories',
                geo_location,
                site_name,
                'white paper',
                creator_name,
            ]

            # remove blank items
            for item in list:
                if not item.strip():
                    list.remove(item)
 
            value = '%s %s, %s' % (value, ', '.join(list), dynamic_keywords)

        else:
            list = [
                'Directories',
                geo_location,
                site_name,
                'white paper',
                secondary_keywords,
            ]
            value = '%s %s' % (value, ''.join(list))

        return value
Пример #4
0
    def get_keywords(self):
        object = self.object

        ### Assign variables -----------------------  
        dynamic_keywords = generate_meta_keywords(object.content)
        primary_keywords = get_setting('site','global','siteprimarykeywords')
        secondary_keywords = get_setting('site','global','sitesecondarykeywords')
        geo_location = get_setting('site','global','sitegeographiclocation')
        site_name = get_setting('site','global','sitedisplayname')

        ### Build string -----------------------
        value = ''

        if primary_keywords:
            value = '%s %s' % (value, primary_keywords)
            value = value.strip()

        if object.title:
            list = [
                site_name,
                geo_location,
                object.title
            ]

            # remove blank items
            for item in list:
                if not item.strip():
                    list.remove(item)
 
            value = '%s %s, %s' % (value, ', '.join(list), dynamic_keywords)

        else:
            list = [
                site_name,
                geo_location,
                primary_keywords,
                secondary_keywords,
            ]
            value = '%s %s' % (value, ''.join(list))

        return value
Пример #5
0
    def get_keywords(self):
        object = self.object

        ### Assign variables -----------------------  
        dynamic_keywords = generate_meta_keywords(object.description)
        site_name = get_setting('site','global','sitedisplayname')
        site_name = site_name.strip()
        
        #T4 used title, experience, skills, education and description

        list = [
            site_name,
            'employment opportunity',
            'resumes',
        ]

        # remove blank items
        for item in list:
            if not item.strip():
                list.remove(item)
            value = '%s, %s' % (', '.join(list), dynamic_keywords)

        return value
Пример #6
0
 def get_keywords(self):
     # TODO: Optimize this SEM algorithm
     return generate_meta_keywords(self.object.description)
Пример #7
0
 def generate_keywords(self, value):
     return generate_meta_keywords(value)