Sha256: 7415a71410d85701644caa66a3c202a32354ac3fe6c51cd67fb2892916301846
Contents?: true
Size: 731 Bytes
Versions: 4
Compression:
Stored size: 731 Bytes
Contents
command 'export' do |c| c.syntax= 'brief export [OPTIONS]' c.description = 'Export a parsed version of the document collection' c.option '--include-content', nil, 'whether to include the unparsed content' c.option '--include-rendered', nil, 'whether to include the rendered content' c.option '--config-path PATH', String, 'Path to the config file' c.action do |args, options| options.default :config_path => Pathname(Dir.pwd).join('brief.rb') briefcase = Brief::Briefcase.new(config_path: Pathname(options.config_path)) dump = briefcase.as_full_export() output = args.first || "#{ briefcase.cache_key }.json" Pathname(Dir.pwd).join(output).open("w+") {|fh| fh.write(dump.to_json) } end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
brief-1.8.6 | lib/brief/cli/export.rb |
brief-1.8.5 | lib/brief/cli/export.rb |
brief-1.8.4 | lib/brief/cli/export.rb |
brief-1.8.3 | lib/brief/cli/export.rb |