summaryrefslogtreecommitdiff
path: root/stub
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2024-06-04 18:17:11 +0200
committerJonas Smedegaard <dr@jones.dk>2024-06-05 11:22:04 +0200
commit30c4f9733ff27cc4881bd4d4c4f9092eb21e094a (patch)
tree74af8c21af955e8ae24b6f51ff6fcf56b25448d4 /stub
parent129f6564a9bf093776fa709f609246aa5c0206a9 (diff)
include interview as appendices; stop include outline
Diffstat (limited to 'stub')
0 files changed, 0 insertions, 0 deletions
_55" class="hl">
  • # put aside eventual trailing JabRef comments to not confuse bibclean
  • my ( $data, $comments ) = split /(?=\n\@Comment\{jabref-meta:)/, $content, 2;
  • # call bibclean on comment-stripped data
  • my @command = qw(bibclean -max-width 0);
  • my $newdata;
  • run3( \@command, \$data, \$newdata,
  • { binmode_stdin => ':utf8', binmode_stdout => ':utf8' } )
  • or die "Failed to execute @command: $?";
  • # save/replace/spew cleaned data, reviving eventual trailing comments
  • if ($infile) {
  • open( FH, '>', $outfile || $infile ) or die $!;
  • print FH $newdata, $comments;
  • }
  • else {
  • print $newdata, $comments;
  • }
  • =encoding UTF-8
  • =head1 AUTHOR
  • Jonas Smedegaard C<< <dr@jones.dk> >>
  • =head1 COPYRIGHT AND LICENSE
  • Copyright © 2024 Jonas Smedegaard
  • This program is free software:
  • you can redistribute it and/or modify it
  • under the terms of the GNU Affero General Public License
  • as published by the Free Software Foundation,
  • either version 3, or (at your option) any later version.
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY;
  • without even the implied warranty
  • of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  • See the GNU Affero General Public License for more details.
  • You should have received a copy
  • of the GNU Affero General Public License along with this program.
  • If not, see <https://www.gnu.org/licenses/>.
  • =cut
  • 1;