7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/jekyll-pandoc-exports/command.rb', line 7
def init_with_program(prog)
prog.command(:export) do |c|
c.syntax "export [options]"
c.description "Generate PDF/DOCX exports without a full site build"
c.option 'format', '--format FORMAT', 'Output format: pdf, docx, both (default: both)'
c.option 'target', '--target TARGET', 'Target page to export by filename (default: all configured pages)'
c.option 'dry_run', '--dry-run', 'Print the Pandoc command without executing'
c.option 'validate', '--validate', 'Validate _data/data.yml schema before export'
c.option 'output', '-o', '--output DIR', 'Override output directory'
c.option 'source', '-s', '--source DIR', 'Source directory (default: .)'
c.option 'config', '--config FILE', 'Configuration file (default: _config.yml)'
c.action do |args, options|
ExportRunner.new(args, options).run
end
end
end
|