Przeglądaj źródła

renamed map to dnetview

rationale: map is too generic. dnetview is a descriptive name as it
captures the following:

d for dark
net for network
view for view network topology
lunar-mining 4 lat temu
rodzic
commit
d3fd551e23

+ 21 - 21
Cargo.lock

@@ -1668,6 +1668,27 @@ dependencies = [
  "syn 0.15.44",
 ]
 
+[[package]]
+name = "dnetview"
+version = "0.3.0"
+dependencies = [
+ "async-channel",
+ "async-std",
+ "clap 3.0.7",
+ "darkfi",
+ "easy-parallel",
+ "log",
+ "num_cpus",
+ "rand 0.6.5",
+ "serde",
+ "serde_json",
+ "simplelog",
+ "smol",
+ "termion",
+ "tui",
+ "url",
+]
+
 [[package]]
 name = "dotenv"
 version = "0.15.0"
@@ -2849,27 +2870,6 @@ dependencies = [
  "value-bag",
 ]
 
-[[package]]
-name = "map"
-version = "0.3.0"
-dependencies = [
- "async-channel",
- "async-std",
- "clap 3.0.7",
- "darkfi",
- "easy-parallel",
- "log",
- "num_cpus",
- "rand 0.6.5",
- "serde",
- "serde_json",
- "simplelog",
- "smol",
- "termion",
- "tui",
- "url",
-]
-
 [[package]]
 name = "matches"
 version = "0.1.9"

+ 1 - 1
Cargo.toml

@@ -19,7 +19,7 @@ members = [
     "bin/drk",
     "bin/gatewayd",
     "bin/ircd",
-    "bin/map",
+    "bin/dnetview",
     "bin/daod",
     "bin/dao-cli",
 ]

+ 1 - 1
bin/map/Cargo.toml → bin/dnetview/Cargo.toml

@@ -1,5 +1,5 @@
 [package]
-name = "map"
+name = "dnetview"
 version = "0.3.0"
 edition = "2021"
 

+ 1 - 1
bin/map/README.md → bin/dnetview/README.md

@@ -1,4 +1,4 @@
-# map
+# dnetview
 
 a simple tui to explore darkfi ircd network topology.  
 lists all active nodes, their connections and recent messages.

+ 0 - 0
bin/map/map_config.toml → bin/dnetview/dnetview_config.toml


+ 0 - 0
bin/map/src/lib.rs → bin/dnetview/src/lib.rs


+ 3 - 3
bin/map/src/main.rs → bin/dnetview/src/main.rs

@@ -29,7 +29,7 @@ use tui::{
 };
 use url::Url;
 
-use map::{
+use dnetview::{
     model::{Connection, IdList, InfoList, NodeInfo},
     options::ProgramOptions,
     ui,
@@ -37,7 +37,7 @@ use map::{
     Model, View,
 };
 
-const CONFIG_FILE_CONTENTS: &[u8] = include_bytes!("../map_config.toml");
+const CONFIG_FILE_CONTENTS: &[u8] = include_bytes!("../dnetview_config.toml");
 
 #[derive(Clone, Serialize, Deserialize, Debug)]
 pub struct MapConfig {
@@ -110,7 +110,7 @@ async fn main() -> Result<()> {
     WriteLogger::init(lvl, cfg, file)?;
     info!("Log level: {}", lvl);
 
-    let config_path = join_config_path(&PathBuf::from("map_config.toml"))?;
+    let config_path = join_config_path(&PathBuf::from("dnetview_config.toml"))?;
 
     spawn_config(&config_path, CONFIG_FILE_CONTENTS)?;
 

+ 0 - 0
bin/map/src/model.rs → bin/dnetview/src/model.rs


+ 3 - 3
bin/map/src/options.rs → bin/dnetview/src/options.rs

@@ -9,10 +9,10 @@ pub struct ProgramOptions {
 
 impl ProgramOptions {
     pub fn load() -> Result<ProgramOptions> {
-        let app = App::new("dfi")
+        let app = App::new("dnetview")
             .version("0.1.0")
             .author("lunar_mining")
-            .about("Map")
+            .about("dnetview")
             .arg(
                 Arg::new("LOG_PATH")
                     .long("log")
@@ -33,7 +33,7 @@ impl ProgramOptions {
             if let Some(log_path) = app.value_of("LOG_PATH") {
                 std::path::Path::new(log_path)
             } else {
-                std::path::Path::new("/tmp/map.log")
+                std::path::Path::new("/tmp/dnetview.log")
             }
             .to_path_buf(),
         );

+ 0 - 0
bin/map/src/ui.rs → bin/dnetview/src/ui.rs


+ 0 - 0
bin/map/src/view.rs → bin/dnetview/src/view.rs