Browse Source

Change name

master
Dylan Baker 5 years ago
parent
commit
b367410685
5 changed files with 26 additions and 26 deletions
  1. 14
    14
      Cargo.lock
  2. 1
    1
      Cargo.toml
  3. 2
    2
      README.md
  4. 8
    8
      src/commands.rs
  5. 1
    1
      src/main.rs

+ 14
- 14
Cargo.lock View File

@@ -48,6 +48,20 @@ dependencies = [
48 48
  "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
49 49
 ]
50 50
 
51
+[[package]]
52
+name = "casaubon"
53
+version = "0.1.0"
54
+dependencies = [
55
+ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
56
+ "comrak 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
57
+ "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
58
+ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
59
+ "notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
60
+ "regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
61
+ "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
62
+ "uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
63
+]
64
+
51 65
 [[package]]
52 66
 name = "cfg-if"
53 67
 version = "0.1.6"
@@ -527,20 +541,6 @@ dependencies = [
527 541
  "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
528 542
 ]
529 543
 
530
-[[package]]
531
-name = "tlon"
532
-version = "0.1.0"
533
-dependencies = [
534
- "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
535
- "comrak 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
536
- "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
537
- "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
538
- "notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
539
- "regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
540
- "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
541
- "uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
542
-]
543
-
544 544
 [[package]]
545 545
 name = "tokio-executor"
546 546
 version = "0.1.5"

+ 1
- 1
Cargo.toml View File

@@ -1,5 +1,5 @@
1 1
 [package]
2
-name = "tlon"
2
+name = "casaubon"
3 3
 version = "0.1.0"
4 4
 authors = ["Dylan Baker"]
5 5
 

+ 2
- 2
README.md View File

@@ -1,6 +1,6 @@
1
-# Tlon
1
+# Casaubon
2 2
 
3
-Tlon is a static site generator written in Rust. I had very specific goals in mind when writing Tlon and it is not meant to be all things for all people. Tlon does what it is intended to do and no more.
3
+Casaubon is a static site generator written in Rust. I had very specific goals in mind when writing Casaubon and it is not meant to be all things for all people. Casaubon does what it is intended to do and no more.
4 4
 
5 5
 Goals
6 6
 - Convention over configuration

+ 8
- 8
src/commands.rs View File

@@ -12,15 +12,15 @@ use write::{write_post, write_post_listing};
12 12
 
13 13
 pub fn build(include_drafts: bool) {
14 14
     let cwd = env::current_dir().expect("Couldn't read current directory");
15
-    let config = match fs::read_to_string(cwd.join("tlon.toml")) {
15
+    let config = match fs::read_to_string(cwd.join("casaubon.toml")) {
16 16
         Ok(contents) => match contents.parse::<Value>() {
17 17
             Ok(config) => Config {
18 18
                 site_name: String::from(config["site_name"].as_str().unwrap()),
19 19
             },
20
-            Err(_) => panic!("Invalid tlon.toml"),
20
+            Err(_) => panic!("Invalid casaubon.toml"),
21 21
         },
22 22
         Err(_) => {
23
-            panic!("Can't find tlon.toml");
23
+            panic!("Can't find casaubon.toml");
24 24
         }
25 25
     };
26 26
 
@@ -84,10 +84,10 @@ pub fn new(name: &str) {
84 84
 
85 85
     fs::create_dir(&project_path).expect(&format!("Couldn't create directory '{}'", &name));
86 86
     fs::write(
87
-        project_path.join("tlon.toml"),
87
+        project_path.join("casaubon.toml"),
88 88
         format!("site_name = \"{}\"", &name),
89 89
     )
90
-    .expect("Could not create tlon.toml");
90
+    .expect("Could not create casaubon.toml");
91 91
 
92 92
     for dir in &["drafts", "posts", "public", "templates", "css", "js"] {
93 93
         fs::create_dir(&project_path.join(&dir))
@@ -194,7 +194,7 @@ mod tests {
194 194
         );
195 195
         assert_eq!(
196 196
             format!("site_name = \"{}\"", &uuid),
197
-            fs::read_to_string(&project_dir.join("tlon.toml")).unwrap()
197
+            fs::read_to_string(&project_dir.join("casaubon.toml")).unwrap()
198 198
         );
199 199
 
200 200
         fs::remove_dir_all(project_dir).unwrap();
@@ -249,7 +249,7 @@ mod tests {
249 249
             "# First post\n\nThis is the first post\n\nIt has multiple paragraphs",
250 250
         )
251 251
         .unwrap();
252
-        fs::write(project_dir.join("tlon.toml"), "site_name = \"Test Site\"").unwrap();
252
+        fs::write(project_dir.join("casaubon.toml"), "site_name = \"Test Site\"").unwrap();
253 253
 
254 254
         build(false);
255 255
 
@@ -341,7 +341,7 @@ mod tests {
341 341
             "# First draft\n\nThis is the first draft",
342 342
         )
343 343
         .unwrap();
344
-        fs::write(project_dir.join("tlon.toml"), "site_name = \"Test Site\"").unwrap();
344
+        fs::write(project_dir.join("casaubon.toml"), "site_name = \"Test Site\"").unwrap();
345 345
 
346 346
         build(true);
347 347
 

+ 1
- 1
src/main.rs View File

@@ -19,7 +19,7 @@ mod render;
19 19
 mod write;
20 20
 
21 21
 fn main() {
22
-    let matches = App::new("tlon")
22
+    let matches = App::new("casaubon")
23 23
         .version("0.1.0")
24 24
         .author("Dylan Baker")
25 25
         .about("Highly opinionated static site generator")

Loading…
Cancel
Save