2021-11-22 14:30:40 +01:00
#!/bin/sh
today = $( date +%d)
# this assumes that your puzzle input is already in your clipboard
if [ -n " $WAYLAND_DISPLAY " ] ; then
wl-paste > inputs/day$today
else
xsel -b > inputs/day$today
fi
# add trailing newline if necessary
sed -i -e '$a\' inputs/day$today
echo ' #![feature(test)]
extern crate test;
2021-12-01 06:19:33 +01:00
use aoc2021::common::*;
2021-11-22 14:30:40 +01:00
type Parsed = Vec<usize>;
fn read_input( ) -> String {
read_file( '$today' )
}
fn parse_input( raw: & str) -> Parsed {
unimplemented!( )
}
fn part1( parsed: & Parsed) -> usize {
unimplemented!( )
}
fn part2( parsed: & Parsed) -> usize {
unimplemented!( )
}
fn main( ) {
let input = parse_input( & read_input( ) ) ;
println!( "Part 1: {}" , part1( & input) ) ;
println!( "Part 2: {}" , part2( & input) ) ;
}
#[cfg(test)]
mod tests {
use super::*;
2021-12-01 06:19:33 +01:00
use aoc2021::*;
2021-11-22 14:30:40 +01:00
use paste::paste;
use test::black_box;
const TEST_INPUT: & str = "" ;
test!( part1( ) = = 0) ;
test!( part2( ) = = 0) ;
bench!( part1( ) = = 0) ;
bench!( part2( ) = = 0) ;
bench_input!( len = = 0) ;
} ' > src/bin/day$today .rs