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
//---------------------------------------------------------------------------//
// Copyright (c) 2017-2024 Ismael Gutiérrez González. All rights reserved.
//
// This file is part of the Rusted PackFile Manager (RPFM) project,
// which can be found here: https://github.com/Frodo45127/rpfm.
//
// This file is licensed under the MIT license, which can be found here:
// https://github.com/Frodo45127/rpfm/blob/master/LICENSE.
//---------------------------------------------------------------------------//
//! # Overview
//!
//! This crate provides utilities to read/write multiple types of files used by Creative Assembly (CA)
//! in Total War Games since Empire: Total War.
//!
//! For information about an specific file type (support, docs, specs,...), please check their modules
//! under the [`files`] module.
//!
//! # TODO: Write some examples.
// Disabled `Clippy` linters, with the reasons why they were disabled.
#![allow(
clippy::too_many_arguments, // Disabled because it gets annoying really quick.
clippy::field_reassign_with_default, // Disabled because it gets annoying on tests.
clippy::assigning_clones
)]
use lazy_static::*;
use regex::Regex;
pub mod binary;
pub mod compression;
pub mod encryption;
pub mod error;
pub mod files;
pub mod games;
pub mod integrations;
pub mod notes;
pub mod schema;
pub mod utils;
lazy_static! {
/// Regex to find if a path belongs to a db table.
pub static ref REGEX_DB: Regex = Regex::new(r"db/[^/]+_tables/[^/]+$").unwrap();
/// Regex to find if a path belongs to a portrait settings file.
pub static ref REGEX_PORTRAIT_SETTINGS: Regex = Regex::new(r".*portrait_settings\S*\.bin$").unwrap();
}