Giter Club home page Giter Club logo

epub2txt's People

Contributors

leviking avatar quininer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gsdu8g9 leviking

epub2txt's Issues

生成文件放文件夹

use std::fs;

fn main() {
    // 创建vb文件夹
    if let Err(e) = fs::create_dir("vb") {
        if e.kind() != std::io::ErrorKind::AlreadyExists {
            panic!("Failed to create directory: {:?}", e);
        }
    }

    // 读取vb.txt文件
    let content = match fs::read_to_string("vb.txt") {
        Ok(s) => s,
        Err(e) => panic!("Failed to read file: {:?}", e),
    };

    // 以四个中横杠隔开文本
    let parts: Vec<&str> = content.split("-----").collect();

    // 保存每个部分文本到文件
    for (i, part) in parts.iter().enumerate() {
        // 生成文件名
        let filename = format!("vb/vb_part{}.txt", i+1);
        // 写入文件
        match fs::write(filename, part) {
            Ok(_) => {},
            Err(e) => panic!("Failed to write file: {:?}", e),
        };
    }
}

Sanngaa crash on build

Compiling sanngaa v0.1.0 (https://github.com/quininer/sanngaa.git?rev=644c785cfd10bf2ff9968f38007f1365f563c1e0#644c785c)
error[E0308]: mismatched types
--> .cargo/git/checkouts/sanngaa-2d86df33939e943a/644c785/src/parser.rs:67:27
|
67 | qualname_to_qname(target.as_element().unwrap().name.clone())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct html5ever_atoms::QualName, found struct markup5ever::interface::QualName
|
= note: expected type html5ever_atoms::QualName
found type markup5ever::interface::QualName

Running on MacOSX 10.10.5 with Python 2.7 (also tried with Anaconda 3.5.3)

Efficiency vs KevinBoone's epub2txt

I will run my own tests soon but I was wondering if you have already run any tests comparing your tool to the existing KevinBoone tool and what are the differences in output and speed and whatever between the two?

Thanks :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.