git @ Cat's Eye Technologies The-Dipple / master perl / yoobify
master

Tree @master (Download .tar.gz)

yoobify @masterraw · history · blame

#!/usr/bin/perl

# SPDX-FileCopyrightText: Chris Pressey, the original author of this work, has dedicated it to the public domain.
# For more information, please refer to <https://unlicense.org/>
# SPDX-License-Identifier: Unlicense

while($file = shift @ARGV) {
  print "            /* $file */\n";
  open FILE, "<$file";
  while($line=<FILE>) {
    $line =~ s/(\r|\n)//g;
    $line =~ s/\\/\\\\/g;
    print '            "' . $line . '",' . "\n";
  }
  close FILE;
}