-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a474c4e
commit 736e5d4
Showing
7 changed files
with
66 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
{ | ||
"cSpell.words": [ | ||
"Bdatum", | ||
"Bech", | ||
"blockfrost", | ||
"Bscript", | ||
"Bstake", | ||
"cbor", | ||
"delegators", | ||
"IPFS", | ||
"Lovelaces", | ||
"Milkomeda", | ||
"mirs", | ||
"nutlink", | ||
"Ogmios", | ||
"openapi", | ||
"redoc", | ||
"redocly", | ||
"tbody", | ||
"timelock", | ||
"UTXO", | ||
"utxos", | ||
"xpub" | ||
] | ||
} | ||
"cSpell.words": [ | ||
"Bdatum", | ||
"Bech", | ||
"blockfrost", | ||
"Bscript", | ||
"Bstake", | ||
"cbor", | ||
"decentralisation", | ||
"delegators", | ||
"IPFS", | ||
"Lovelaces", | ||
"Milkomeda", | ||
"mirs", | ||
"nutlink", | ||
"Ogmios", | ||
"openapi", | ||
"redoc", | ||
"redocly", | ||
"tbody", | ||
"timelock", | ||
"UTXO", | ||
"utxos", | ||
"xpub" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Changelog | ||
|
||
## [Unreleased] | ||
|
||
## [0.0.2] - 2023-07-11 | ||
|
||
### Fixed | ||
|
||
- json_metadata schema | ||
|
||
## [0.0.1] - 2023-07-06 | ||
|
||
### Added | ||
|
||
- initial commit |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
use std::env; | ||
use std::fs; | ||
use std::path::Path; | ||
// use std::env; | ||
// use std::fs; | ||
// use std::path::Path; | ||
|
||
fn main() { | ||
let out_dir = env::var_os("CARGO_MANIFEST_DIR").unwrap(); | ||
let model_path = Path::new("src/models"); | ||
let entries = fs::read_dir(model_path).unwrap(); | ||
// let out_dir = env::var_os("CARGO_MANIFEST_DIR").unwrap(); | ||
// let model_path = Path::new("src/models"); | ||
// let entries = fs::read_dir(model_path).unwrap(); | ||
|
||
let mut content = String::new(); | ||
// let mut content = String::new(); | ||
|
||
for entry in entries { | ||
let entry = entry.unwrap(); | ||
let path = entry.path(); | ||
let file_stem = path.file_stem().unwrap(); | ||
// for entry in entries { | ||
// let entry = entry.unwrap(); | ||
// let path = entry.path(); | ||
// let file_stem = path.file_stem().unwrap(); | ||
|
||
if let Some(file_name_str) = file_stem.to_str() { | ||
if file_name_str == "mod" { | ||
continue; | ||
} | ||
content.push_str(&format!("pub mod {};\n", file_name_str)); | ||
} else { | ||
panic!("File name is not valid Unicode: {:?}", file_stem); | ||
} | ||
} | ||
// if let Some(file_name_str) = file_stem.to_str() { | ||
// if file_name_str == "mod" { | ||
// continue; | ||
// } | ||
// content.push_str(&format!("pub mod {};\n", file_name_str)); | ||
// } else { | ||
// panic!("File name is not valid Unicode: {:?}", file_stem); | ||
// } | ||
// } | ||
|
||
let dest_path = Path::new(&out_dir).join("./src/models/mod.rs"); | ||
// let dest_path = Path::new(&out_dir).join("./src/models/mod.rs"); | ||
|
||
fs::write(dest_path, content).unwrap(); | ||
// fs::write(dest_path, content).unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters