This repository was archived by the owner on Dec 16, 2022. It is now read-only.
File tree 2 files changed +6
-22
lines changed
2 files changed +6
-22
lines changed Original file line number Diff line number Diff line change 1
1
use clap:: { App , Arg } ;
2
- use libpolymesh:: file:: {
3
- compressed:: unpack_pmf,
4
- data:: polymeta:: parse_poly_meta
5
- } ;
2
+ use libpolymesh:: read:: unpack_pmf;
6
3
7
4
fn main ( ) {
8
5
let matches = App :: new ( "PMFExtract" )
@@ -26,13 +23,8 @@ fn main() {
26
23
let output_path = matches. value_of ( "to" ) . unwrap ( ) ;
27
24
28
25
// Unpack the file
26
+ println ! ( "Unpacking PolyMesh..." ) ;
29
27
let _ = unpack_pmf ( root_path, output_path) . unwrap ( ) ;
30
-
31
- // Ensure there is a ploymeta inside the root
32
- let polymeta = parse_poly_meta ( & format ! ( "{}/polymeta.json" , output_path) . to_string ( ) ) . unwrap ( ) ;
33
-
34
- // Log file information
35
- println ! ( "PMF version: {}" , polymeta. version) ;
36
- println ! ( "Children: {}" , polymeta. children. len( ) ) ;
28
+ println ! ( "Done" ) ;
37
29
38
30
}
Original file line number Diff line number Diff line change 1
1
use clap:: { App , Arg } ;
2
- use libpolymesh:: file:: {
3
- extracted:: pack_pmf,
4
- data:: polymeta:: parse_poly_meta
5
- } ;
2
+ use libpolymesh:: write:: pack_pmf;
6
3
7
4
fn main ( ) {
8
5
let matches = App :: new ( "PMFPack" )
@@ -25,14 +22,9 @@ fn main() {
25
22
let root_path = matches. value_of ( "from" ) . unwrap ( ) ;
26
23
let output_path = matches. value_of ( "to" ) . unwrap ( ) ;
27
24
28
- // Ensure there is a ploymeta inside the root
29
- let polymeta = parse_poly_meta ( & format ! ( "{}/polymeta.json" , root_path) . to_string ( ) ) . unwrap ( ) ;
30
-
31
- // Log file information
32
- println ! ( "PMF version: {}" , polymeta. version) ;
33
- println ! ( "Children: {}" , polymeta. children. len( ) ) ;
34
-
35
25
// Pack the file
26
+ println ! ( "Packing PolyMesh..." ) ;
36
27
let _ = pack_pmf ( root_path, output_path) . unwrap ( ) ;
28
+ println ! ( "Done" ) ;
37
29
38
30
}
You can’t perform that action at this time.
0 commit comments