Code Monkey home page Code Monkey logo

cobalt's Introduction

Cobalt

可以在 IDE 中看电子书的摸鱼插件、你甚至可以用 IDE 写代码。

🔎 搜索

搜索数据来源于 Cobalt Settings 页面爬虫规则,如有侵权请联系作者删除

📦 安装

🗺️ 在线安装

  • Jetbrains ide: File > Settings > Plugins > Marketplact 搜索 Cobalt

🧶 离线安装

  • Cobalt 下载对应你 ide 的版本
  • Jetbrains ide: File > Settings > Plugins > ⚙️ > Install Plugin from Disk 选中下载的 Cobalt-{version}.zip 文件

🎫 使用说明

  • 安装该插件后,单击屏幕右侧的 Cobalt 按钮,打开主页面
  • 首次使用点击主页面搜索框右侧 设置按钮,拉取爬虫规则
  • 在顶部搜索框中输入书名,然后单击右侧的搜索 按钮
  • 左上角下拉列表可以调整数据爬取站点
  • 单击搜索结果的行使其突出显示。 点击右上角以开始阅读按钮 开始阅读第一章
  • 底部章节下拉列表,选择指定章节,然后单击右侧跳转按钮 执行章节跳转
  • 用来切换上下章节
  • 顶部“全屏” 与 “首页” 用于切换为全屏阅读和搜索视图

⚙︎设置

在首页视图中,右上角有个 图标,用于打开设置页面,设置页面可以调增页面阅读字体的大小和滚轮的速度

爬虫规则用于动态控制插件数据源解析规则,详情请见拙作 rabbit-foot

Setting.png

📥书籍导入

在设置页面除了字体大小和滚轮速度参数设置之外,还可以导入本地的书籍。目前书籍导致仅支持 .txt epub 这两种书籍格式

🏗️ 添砖加瓦

✂️ 分支说明

Cobalt 的源码分为两个分支:

分支 描述
main main分支不接受任何pr或修改。
dev development分支,默认下一个SNAPSHOT版本,接受修改或pr

💳 捐赠支持

如果你觉得这个项目给你带来了乐趣,可以捐赠请维护者吃包辣条~,在此表示感谢。

pay

cobalt's People

Contributors

liaoas avatar suchbear avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cobalt's Issues

卡卡卡

按哪都卡,下一章卡,跳转卡,滚动卡
大佬抽空弄弄呗

换行的问题

我这里使用的是1.2.3版本,查看了源码考虑是换行符的处理问题

在BookTextService.java文件中考虑用DataCenter.textContent = getText(content); 替换 DataCenter.textContent = content.text();

private static String getText(Element parentElement) {
        StringBuilder working = new StringBuilder();
        for (Node child : parentElement.childNodes()) {
            if (child instanceof TextNode) {
                working.append(((TextNode) child).text());
            }
            if (child instanceof Element) {
                Element childElement = (Element) child;
                // do more of these for p or other tags you want a new line for
                if (childElement.tag().getName().equalsIgnoreCase("br")) {
                    working.append("\n");
                }
                working.append(getText(childElement));
            }
        }

        return working.toString();
    }

另:我本地代码还是1.2.2的,是1.2.3版本代码还没有上传吗,谢谢

导入书籍失败

试了很多epub和txt都不行,epub用SumatraPDF可以正常打开阅读

idea的版本是2024.1

update: 把idea更新到2024.1.2也不行

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.