diff options
author | Julian T <julian@jtle.dk> | 2021-07-26 12:33:35 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2021-07-26 12:33:35 +0200 |
commit | 0ddf24fa0be620fc10cc07247b2c738b32943042 (patch) | |
tree | 7bf46891e4da4a9aa1b46417c33072fb9a0e6e57 /src/main.rs | |
parent | c3c69b160f4c5fd851fd1a49c01f633a56351f5d (diff) |
Added rendering of simple template
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs index 28fe0c9..b647cdc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,13 +11,11 @@ fn main() { let ctx = Context::new_with_args().unwrap(); - for file in ctx.get_image_files().unwrap() { - println!("{}", file.display()); + let pieces = ctx.get_image_files().unwrap().iter() + .map(|file| Picture::new_from_file(&file).unwrap()) + .map(|pic| Piece::new(&ctx, pic).unwrap()) + .collect::<Vec<Piece>>(); - let pic = Picture::new_from_file(&file).unwrap(); - println!("{:?}", pic); + piece::create_index(&ctx, &pieces[..]).unwrap(); - let piece = Piece::new(&ctx, pic).unwrap(); - println!("{:?}", piece); - } } |