1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#![cfg_attr(feature = "manual", feature(external_doc))]
#![cfg_attr(feature = "manual", doc(include = "../manual.md"))]
#![warn(
unstable_features,
unused_import_braces,
)]
#![recursion_limit = "1024"]
#![deny( trivial_casts, trivial_numeric_casts,)]
#![warn( unused_import_braces, unused_qualifications)]
#![cfg_attr(feature = "lints", allow(unstable_features))]
#![cfg_attr(feature = "lints", feature(plugin))]
#![cfg_attr(feature = "lints", plugin(clippy))]
extern crate yaml_rust;
extern crate chrono;
extern crate regex;
extern crate slug;
extern crate tempdir;
extern crate bill;
extern crate open;
extern crate toml;
extern crate dirs;
extern crate semver;
extern crate term_size;
extern crate icalendar;
#[cfg(feature="serde")] extern crate serde;
#[cfg(feature="serde")] #[macro_use] extern crate serde_derive;
#[cfg(feature="serialization")] extern crate serde_json;
#[cfg(feature="deserialization")] extern crate serde_yaml;
#[cfg(feature="deserialization")] extern crate ordered_float;
#[cfg(feature="deserialization")] extern crate num_traits;
#[cfg(feature="server")] extern crate rocket;
#[macro_use] extern crate error_chain;
#[macro_use] extern crate log;
#[macro_use] extern crate prettytable;
#[macro_use] extern crate lazy_static;
#[macro_use] extern crate maplit;
#[macro_use] extern crate custom_derive;
#[macro_use] extern crate enum_derive;
extern crate rayon;
extern crate linked_hash_map;
#[cfg(feature="server")] extern crate itertools;
extern crate crowbook_intl_runtime;
#[macro_use] pub mod localize_macros;
#[cfg(feature="git_statuses")] extern crate git2;
extern crate env_logger;
#[macro_use]
pub mod util;
pub mod config;
pub mod project;
pub mod storage;
pub mod print;
pub mod actions;
pub mod templater;
#[cfg(feature="document_export")] extern crate handlebars;
#[cfg(feature="document_export")] pub mod document_export;
#[cfg(feature="server")] pub mod server;
pub use yaml_rust::Yaml;
pub static DOCUMENTATION_URL: &'static str = "https://docs.rs/asciii/";
lazy_static!{
pub static ref CONFIG: config::ConfigReader = config::ConfigReader::new().unwrap();
pub static ref DOCHINT: String = lformat!("Documentation at: {}", DOCUMENTATION_URL);
}
lazy_static! {
pub static ref VERSION: &'static str = env!("CARGO_PKG_VERSION");
}
#[cfg(not(feature="version_string"))]
lazy_static! {
pub static ref VERSION_VERBOSE: &'static str = env!("CARGO_PKG_VERSION");
pub static ref VERSION_JSON: String = format!(r#"{{"version": "{}"}}"#, env!("CARGO_PKG_VERSION"));
}
#[cfg(feature="version_string")]
lazy_static! {
pub static ref VERSION_VERBOSE: String = format!("{} - {} ({}, {})",
env!("CARGO_PKG_VERSION"),
env!("GIT_DESCRIPTION"),
env!("BUILD_DATE"),
env!("PROFILE"),
);
pub static ref VERSION_JSON: String = format!(
r#"{{ "version": "{version}", "commit": "{commit}", "built": "{built}", "profile": "{profile}" }}"#,
version = env!("CARGO_PKG_VERSION"),
commit = env!("GIT_DESCRIPTION"),
built = env!("BUILD_DATE"),
profile = env!("PROFILE"),
);
}