summaryrefslogtreecommitdiff
path: root/_themes
diff options
  • #!/usr/bin/perl
  • use v5.36;
  • use strict;
  • use utf8;
  • =head1 NAME
  • hedgedoc2quarto - convert HedgeDoc content to Quarto
  • =head1 VERSION
  • Version 0.0.1
  • =head1 SYNOPSIS
  • hedgedoc2quarto INFILE OUTFILE
  • hedgedoc2quarto < INFILE > OUTFILE
  • =head1 DESCRIPTION
  • B<hedgedoc2quarto> reformats text content
  • from HedgeDoc- to Quarto-flavored Markdown,
  • and adapts embedded diagram code.
  • Both HedgeDoc and Quarto uses Markdown,
  • but different flavors,
  • and whereas both handle (different subsets of) Mermaid diagrams,
  • Quarto also (through plugins) handles PlantUML diagrams.
  • =cut
  • # slurp INFILE if passed as first argument, or else STDIN
  • my ( $infile, $outfile, $bogus ) = @ARGV;
  • die 'Too many arguments: expected INFILE and OUTFILE' if $bogus;
  • @ARGV = ($infile) if $infile;
  • my $content = do { local $/ = undef; <> };