Explorar el Código

Change name

master
Dylan Baker hace 5 años
padre
commit
b367410685
Se han modificado 5 ficheros con 26 adiciones y 26 borrados
  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 Ver fichero

48
  "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
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
 [[package]]
65
 [[package]]
52
 name = "cfg-if"
66
 name = "cfg-if"
53
 version = "0.1.6"
67
 version = "0.1.6"
527
  "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
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
 [[package]]
544
 [[package]]
545
 name = "tokio-executor"
545
 name = "tokio-executor"
546
 version = "0.1.5"
546
 version = "0.1.5"

+ 1
- 1
Cargo.toml Ver fichero

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

+ 2
- 2
README.md Ver fichero

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
 Goals
5
 Goals
6
 - Convention over configuration
6
 - Convention over configuration

+ 8
- 8
src/commands.rs Ver fichero

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

+ 1
- 1
src/main.rs Ver fichero

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

Loading…
Cancelar
Guardar