Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Attributes | List of all members
main.Article Class Reference
Inheritance diagram for main.Article:

Public Member Functions

def ensureThumbnail (self)
 
def encodeHeader (self)
 

Static Public Attributes

 feed = db.ReferenceProperty(Feed)
 
 title = db.TextProperty()
 
 author = db.TextProperty()
 
 content = db.TextProperty()
 
 snippet = db.TextProperty()
 
 thumbnail = db.BlobProperty()
 
 thumbnailSize = db.TextProperty()
 
 srcurl = db.TextProperty()
 
 date = db.IntegerProperty()
 

Detailed Description

Definition at line 98 of file main.py.

Member Function Documentation

◆ encodeHeader()

def main.Article.encodeHeader (   self)

Definition at line 117 of file main.py.

117 def encodeHeader(self):
118 # TODO(jmesserly): for now always unescape until the crawler catches up
119 enc = encoder.Encoder()
120 enc.writeString(self.key().name())
121 enc.writeString(unescape(self.title))
122 enc.writeString(self.srcurl)
123 enc.writeBool(self.thumbnail is not None)
124 enc.writeString(self.author)
125 enc.writeInt(self.date)
126 enc.writeString(unescape(self.snippet))
127 return enc.getRaw()
128
129
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
def unescape(html)
Definition: main.py:658

◆ ensureThumbnail()

def main.Article.ensureThumbnail (   self)

Definition at line 110 of file main.py.

110 def ensureThumbnail(self):
111 # If our desired thumbnail size has changed, regenerate it and cache.
112 if self.thumbnailSize != str(THUMB_SIZE):
113 self.thumbnail = makeThumbnail(self.content)
114 self.thumbnailSize = str(THUMB_SIZE)
115 self.put()
116
def makeThumbnail(text)
Definition: main.py:700

Member Data Documentation

◆ author

main.Article.author = db.TextProperty()
static

Definition at line 102 of file main.py.

◆ content

main.Article.content = db.TextProperty()
static

Definition at line 103 of file main.py.

◆ date

main.Article.date = db.IntegerProperty()
static

Definition at line 108 of file main.py.

◆ feed

main.Article.feed = db.ReferenceProperty(Feed)
static

Definition at line 99 of file main.py.

◆ snippet

main.Article.snippet = db.TextProperty()
static

Definition at line 104 of file main.py.

◆ srcurl

main.Article.srcurl = db.TextProperty()
static

Definition at line 107 of file main.py.

◆ thumbnail

main.Article.thumbnail = db.BlobProperty()
static

Definition at line 105 of file main.py.

◆ thumbnailSize

main.Article.thumbnailSize = db.TextProperty()
static

Definition at line 106 of file main.py.

◆ title

main.Article.title = db.TextProperty()
static

Definition at line 101 of file main.py.


The documentation for this class was generated from the following file: