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
// License: see LICENSE file at root directory of `master` branch

//! # Duplicate File Scanner
//!
//! ## Project
//!
//! - Repository: <https://bitbucket.org/haibison/scan4df>
//! - License: Nice License 1.0.0 _(see LICENSE file at root directory of `master` branch)_
//! - _This project follows [Semantic Versioning 2.0.0]_
//!
//! ## Features
//!
//! This program helps scan for duplicate files on your system. It hashes files and then compares hashes.
//!
//! Supported hash algorithms: keccak-224, keccak-256, keccak-384, keccak-512, sha3-224, sha3-256, sha3-384, sha3-512, shake-128, shake-256.
//!
//! ## Building from source or installing via Cargo
//!
//! This crate is intended to be used as a program. So default features just contain some documentation, constants and no dependencies.
//!
//! `bin` feature contains a binary which uses some dependencies. You can run the program with `help` command for more details.
//!
//! ### Building from source:
//!
//! ```shell
//! ~> # Clone a specific version via tag name
//! ~> git clone --branch=x.y.z --depth=1 -- https://bitbucket.org/haibison/scan4df scan4df-x.y.z/
//! ~> cd scan4df-x.y.z/
//! ~> cargo build --release --features=bin
//! ```
//!
//! ### Installing via Cargo:
//!
//! ```shell
//! ~> cargo install scan4df --version=x.y.z --features=bin
//! ```
//!
//! [Semantic Versioning 2.0.0]: https://semver.org/spec/v2.0.0.html

#![warn(missing_docs)]
#![forbid(unsafe_code)]

// ╔═════════════════╗
// ║   IDENTIFIERS   ║
// ╚═════════════════╝

macro_rules! code_name  { () => { "scan4df" }}
macro_rules! version    { () => { "0.1.2" }}

/// # Crate name
pub const NAME: &str = "Duplicate File Scanner";

/// # Crate code name
pub const CODE_NAME: &str = code_name!();

/// # ID of this crate
pub const ID: &str = concat!(
    "882f032b-8cb6f017-9c32b248-d2da5a10-3d0497ad-3ba52549-3e3aebb0-32047643-",
    "ea866a1f-4f7ed44c-6a8a965d-f5d7daf4-e0c75ee8-f81c2a00-cd2a40df-430e4fb6",
);

/// # Crate version
pub const VERSION: &str = version!();

/// # Crate release date (year/month/day)
pub const RELEASE_DATE: (u16, u8, u8) = (2020, 2, 17);

/// # Tag, which can be used for logging...
pub const TAG: &str = concat!(code_name!(), "::882f032b::", version!());

// ╔════════════════════╗
// ║   IMPLEMENTATION   ║
// ╚════════════════════╝

pub mod version_info;

/// # Result type used in this crate
pub type Result<T> = core::result::Result<T, std::io::Error>;

#[test]
fn test_crate_version() {
    assert_eq!(VERSION, env!("CARGO_PKG_VERSION"));
}