aboutsummaryrefslogtreecommitdiff
path: root/tools/src/bin/create_item.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-01-19 09:02:16 +0100
committermetamuffin <metamuffin@disroot.org>2023-01-19 09:02:16 +0100
commitcadb3057d06a38abfac9067cbdc59ce3d926a658 (patch)
treeac70156a70f5cbd52a4b4d32df1442ab734c4c22 /tools/src/bin/create_item.rs
parentfbc1128f30438a4e18521073eb1bb79a77a7f20d (diff)
downloadjellything-cadb3057d06a38abfac9067cbdc59ce3d926a658.tar
jellything-cadb3057d06a38abfac9067cbdc59ce3d926a658.tar.bz2
jellything-cadb3057d06a38abfac9067cbdc59ce3d926a658.tar.zst
item page styled
Diffstat (limited to 'tools/src/bin/create_item.rs')
-rw-r--r--tools/src/bin/create_item.rs34
1 files changed, 0 insertions, 34 deletions
diff --git a/tools/src/bin/create_item.rs b/tools/src/bin/create_item.rs
deleted file mode 100644
index eb5b3a9..0000000
--- a/tools/src/bin/create_item.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-use std::{fs::File, io::Write, path::PathBuf};
-
-use clap::Parser;
-use jellycommon::ItemInfo;
-
-#[derive(Parser)]
-struct Args {
- #[clap(short = 'I', long)]
- item: PathBuf,
- #[clap(short = 'd', long)]
- dry: bool,
- #[clap(short, long)]
- title: String,
-}
-
-fn main() -> anyhow::Result<()> {
- let args = Args::parse();
-
- let iteminfo = ItemInfo {
- title: args.title,
- path: String::new(),
- duration: 0.0,
- tracks: Default::default(),
- };
-
- let k = serde_json::to_string_pretty(&iteminfo)?;
- if args.dry {
- println!("{k}")
- } else {
- let mut f = File::create(args.item)?;
- f.write_all(k.as_bytes())?;
- }
- Ok(())
-}