Ejemplo n.º 1
0
# -*- coding: utf-8 -*-
"""
@author: Abdulrahman Bres
"""

import util
import settings
import pickle

titles = [
    'Ludwig van Beethoven', 'Angela Merkel', 'Jeff Bezos', 'Johnny Depp',
    'Madonna (entertainer)', 'Syria', 'Indonesia', 'History of Spain',
    'Harvard University', 'Daimler Company', 'Google', 'Apple Inc.',
    'Fiorucci', 'Futurama', 'RMS Titanic', 'Lost (TV series)', 'Tom and Jerry',
    'Basketball', 'Deus Ex (video game)', 'Grand Theft Auto', 'Hatsune Miku',
    'Apple', 'Hamburger', 'Neptune', 'Red', 'Woman', 'World War II', 'Bitcoin',
    'Ubuntu (operating system)', 'United States presidential election, 2012'
]

articles = []

for title in titles:
    articles.append(util.get_article(title))

pickle.dump(articles,
            open(settings.PATH_DATAOBJECTS + 'gs_articles.pickle', 'wb'))
Ejemplo n.º 2
0
 def desc(self, count):
     return '{} {}'.format(get_article(self.name), self.name)
Ejemplo n.º 3
0
 def desc(self, count):
     if count > 1:
         return '{} {}'.format(count, self.plural)
     else:
         return '{} {}'.format(get_article(self.name), self.name)
Ejemplo n.º 4
0
 def __str__(self):
     return "{} {}".format(get_article(self.name), self.name)