コード例 #1
0
ファイル: images.py プロジェクト: prataprc/eazytext
 def __init__( self, *args, **kwargs ) :
     self.imgsources = args
     self.alt    = kwargs.pop( 'alt', '' )
     self.height = kwargs.pop( 'height', None )
     self.width  = kwargs.pop( 'width', None )
     self.cols   = int( kwargs.pop( 'cols', '3' ))
     self.style  = constructstyle( kwargs )
コード例 #2
0
ファイル: images.py プロジェクト: pombredanne/eazytext
 def __init__(self, *args, **kwargs):
     self.imgsources = args
     self.alt = kwargs.pop('alt', '')
     self.height = kwargs.pop('height', None)
     self.width = kwargs.pop('width', None)
     self.cols = int(kwargs.pop('cols', '3'))
     self.style = constructstyle(kwargs)
コード例 #3
0
 def __init__(self, *args, **kwargs):
     args = list(args)
     self.src = args.pop(0) if args else None
     self.alt = args.pop(0) if args else None
     self.height = kwargs.pop('height', None)
     self.width = kwargs.pop('width', None)
     self.href = kwargs.pop('href', '')
     self.style = constructstyle(kwargs)
コード例 #4
0
ファイル: image.py プロジェクト: prataprc/eazytext
 def __init__( self, *args, **kwargs ) :
     args = list(args)
     self.src = args.pop(0) if args else None
     self.alt = args.pop(0) if args else None
     self.height = kwargs.pop( 'height', None )
     self.width = kwargs.pop( 'width', None )
     self.href = kwargs.pop( 'href', '' )
     self.style = constructstyle( kwargs )
コード例 #5
0
ファイル: yearsbefore.py プロジェクト: prataprc/eazytext
 def __init__( self, *args, **kwargs ) :
     args = list(args)
     utc = dt.datetime.utcnow()
     self.template  = args.pop(0) if args else 'past %s'
     fromyear = kwargs.get( 'fromyear', 2000 )
     frommonth = kwargs.get( 'frommonth', 1 )
     fromday = kwargs.get( 'fromday', 1 )
     try :
         self.fromyear  = int(fromyear)
         self.frommonth = int(frommonth)
         self.fromday   = int(fromday)
     except :
         self.fromyear  = utc.year
         self.frommonth = utc.month
         self.fromday   = utc.day
     self.style = constructstyle( kwargs )
コード例 #6
0
 def __init__( self, *args, **kwargs ):
     self.text = len(args) > 0 and args[0] or ''
     self.style = constructstyle( kwargs )
コード例 #7
0
ファイル: clear.py プロジェクト: prataprc/eazytext
 def __init__( self, *args, **kwargs ):
     self.style = constructstyle( kwargs )
コード例 #8
0
 def __init__(self, *args, **kwargs):
     self.style = constructstyle(kwargs)
コード例 #9
0
ファイル: anchor.py プロジェクト: prataprc/eazytext
 def __init__(self, *args, **kwargs):
     args = list(args)
     self.anchor = args and args.pop(0) or ""
     self.text = args and args.pop(0) or "§"
     self.style = constructstyle(kwargs)
コード例 #10
0
ファイル: toc.py プロジェクト: pombredanne/eazytext
 def __init__( self, **kwargs ) :
     try    : self.maxheadlen = int(kwargs.pop( 'maxheadlen', self.MAXHEADLEN ))
     except : self.maxheadlen = self.MAXHEADLEN
     self.summary = kwargs.pop( 'summary', self.SUMMARY )
     self.style  = constructstyle( kwargs )
コード例 #11
0
 def __init__( self, *args, **kwargs ):
     args = list( args )
     self.anchor = args and args.pop( 0 ) or ''
     self.text = args and args.pop( 0 ) or '§'
     self.style = constructstyle( kwargs )