blob: b647cdcb1547aa64ae4999233c3548b8f4a9a267 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
mod context;
mod picture;
mod piece;
use context::Context;
use picture::Picture;
use piece::Piece;
fn main() {
println!("Hello, world!");
let ctx = Context::new_with_args().unwrap();
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>>();
piece::create_index(&ctx, &pieces[..]).unwrap();
}
|