コード例 #1
0
ファイル: builder.py プロジェクト: dag/rstblog
 def __init__(self, builder, config, source_filename, prepare=False):
     self.builder = builder
     self.config = config
     self.title = 'Untitled'
     self.summary = None
     self.pub_date = None
     self.source_filename = source_filename
     self.links = []
     self.program_name = self.config.get('program')
     if self.program_name is None:
         self.program_name = self.builder.guess_program(
             config, source_filename)
     self.program = self.builder.programs[self.program_name](self)
     self.destination_filename = self.program.get_desired_filename()
     if prepare:
         self.program.prepare()
         after_file_prepared.send(self)
コード例 #2
0
 def __init__(self, builder, config, source_filename, prepare=False):
     self.builder = builder
     self.config = config
     self.title = 'Untitled'
     self.summary = None
     self.pub_date = None
     self.source_filename = source_filename
     self.links = []
     self.program_name = self.config.get('program')
     if self.program_name is None:
         self.program_name = self.builder.guess_program(
             config, source_filename)
     self.program = self.builder.programs[self.program_name](self)
     self.destination_filename = self.program.get_desired_filename()
     if prepare:
         self.program.prepare()
         after_file_prepared.send(self)
         if self.public:
             after_file_published.send(self)
コード例 #3
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 def __init__(self, builder, config, source_filename, prepare=False):
     self.builder = builder
     self.config = config
     self.title = "Untitled"
     self.summary = None
     self.pub_date = None
     self.source_filename = source_filename
     self.links = []
     self.program_name = self.config.get("program")
     if self.program_name is None:
         self.program_name = self.builder.guess_program(config, source_filename)
     self.program = self.builder.programs[self.program_name](self)
     self.destination_filename = os.path.join(
         self.builder.prefix_path.lstrip("/"), self.program.get_desired_filename()
     )
     if prepare:
         self.program.prepare()
         after_file_prepared.send(self)
         if self.public:
             after_file_published.send(self)