Class: WritersRoom::Formatters::TranscriptFormatter
- Inherits:
-
BaseFormatter
- Object
- BaseFormatter
- WritersRoom::Formatters::TranscriptFormatter
- Defined in:
- lib/writers_room/formatters/transcript_formatter.rb
Overview
Formats dialog/transcript projects.
Instance Attribute Summary
Attributes inherited from BaseFormatter
#medium, #metadata, #project_path
Instance Method Summary collapse
Methods inherited from BaseFormatter
Constructor Details
This class inherits a constructor from WritersRoom::Formatters::BaseFormatter
Instance Method Details
#body_sections ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/writers_room/formatters/transcript_formatter.rb', line 7 def body_sections sections = [] # Include scene transcripts transcripts_dir = File.join(@project_path, "transcripts") if Dir.exist?(transcripts_dir) Dir.glob(File.join(transcripts_dir, "*.{txt,md}")).sort.each do |file| sections << "### #{File.basename(file)}\n\n#{File.read(file)}" end end sections end |