File size: 1,163 Bytes
bc32e7b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
//! 解析与导出模块入口。
//!
//! 负责将章节内容转换为 txt/epub,并进行媒体处理、有声书生成等后处理。

#[cfg(feature = "tts-native")]
pub mod edge_tts;

#[cfg(any(feature = "tts", feature = "tts-native"))]
pub mod audio_generator;

#[cfg(not(any(feature = "tts", feature = "tts-native")))]
pub mod audio_generator {
    use std::sync::Arc;

    use indicatif::ProgressBar;
    use serde_json::Value;

    use super::book_manager::BookManager;
    use crate::download::downloader::ProgressReporter;

    pub fn generate_audiobook(
        _manager: &BookManager,
        _chapters: &[Value],
        _bar: Option<&ProgressBar>,
        _quiet: bool,
        _progress: Option<&mut ProgressReporter>,
        _cancel: Option<&Arc<std::sync::atomic::AtomicBool>>,
    ) -> bool {
        true
    }
}
pub mod book_manager;
pub mod epub_generator;
pub(crate) mod finalize_epub;
pub(crate) mod finalize_pdf;
pub(crate) mod finalize_utils;
pub(crate) mod html_utils;
pub(crate) mod image_utils;
pub mod parser;
#[cfg(feature = "official-api")]
pub(crate) mod segment_comments;
pub(crate) mod segment_shared;
pub mod segment_utils;