Giter Site home page Giter Site logo

Comments (9)

wuhgit avatar wuhgit commented on August 25, 2024

全部发到同一个 Release 里面算是一个遗留问题,最开始的时候只是为了 Android 端更新方便,后来我也觉得没必要弄什么版本号,用发布时间来区别新旧就够了,毕竟这只是一个词库,更不更新也不会出什么大问题……

如果你是想用在其它系统或者包管理器,要不暂时变通一下,用 AUR 那边的 PKGBUILD 来获取版本信息,那边几乎是同步更新(如果我网络没问题)

from custompinyindictionary.

wuhgit avatar wuhgit commented on August 25, 2024

如果有需求,我也可以在每次发布的时候把更新的 文件名 与 校验和 同步更新在 status.json 这个文件里面。

比如这样:

{
    "version": "20231202",
    "updateDate": "2023-12-02",
    "versionNumber": 84,
    "totalWords": "1,429,595",
    "change": "+ 1335",
    "data": {
        "Fcitx": {
            "url": "https://github.com/wuhgit/CustomPinyinDictionary/releases/download/assets/CustomPinyinDictionary_Fcitx_20231202.tar.gz",
            "sha256sums": "da33592c80b8f6cf5fc1a840369afb08e71033d2f94fa9c00f78c6c3790da3d3"
        },
        "Fcitx_Magisk": {
            "url": "...",
            "sha256sums": "..."
        },
        "Gboard_Magisk": {
            "url": "...",
            "sha256sums": "..."
        }
    }
}

如此的话在获取更新的时候会不会方便一些?

from custompinyindictionary.

Aleksanaa avatar Aleksanaa commented on August 25, 2024

问题是在,github release会发布一个独立的、永不过期(除非仓库删除)的链接,同一个链接指向的文件一直是可下载的、并且下载后是同一个文件。

如果链接不失效,用户就可以很方便地分发构建脚本,任何时候有人用aur helper从aur上面拉取、构建和安装,都可以成功。Nix生态是假设 每个时刻 发布的derivation构建表达式都可以在不同的环境下被重复构建,cache可以共享但只是为了加速构建流程,而不用来保证一段时间后仍可构建。这意味着发布新版本时,旧的链接仍然应保持可用。

同时,很多构建工具一定程度上依赖同一个链接固定输出行为,例如PKGBUILD默认是需要给下载的每个文件写hash的(但仍然可以通过写SKIP绕过);Nix更严格,如果不使用impure(一般只用来调取Nix计算部分表达式),可网络访问的资源必须有确定的输出,即fixed output derivation。这意味着也不能用新的文件直接覆盖旧的文件,即便这样使链接永远可以下载。

所以最标准的行为就是直接发布到不同的release,并使用不同的版本号。

from custompinyindictionary.

Aleksanaa avatar Aleksanaa commented on August 25, 2024

GitHub自己是有api来查询release的,比如https://api.github.com/repos/wuhgit/CustomPinyinDictionary/releases/latest (见 https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-the-latest-release ),检查更新可以直接curl这个链接。

from custompinyindictionary.

wuhgit avatar wuhgit commented on August 25, 2024

是这么个道理,但词库真的有必要留存历史版本吗……

from custompinyindictionary.

Aleksanaa avatar Aleksanaa commented on August 25, 2024

是这么个道理,但词库真的有必要留存历史版本吗……

但是也不需要为github节省空间啊...

https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases#storage-and-bandwidth-quotas

from custompinyindictionary.

wuhgit avatar wuhgit commented on August 25, 2024

考虑了一下,我还是不打算使用版本号,抱歉……

from custompinyindictionary.

Aleksanaa avatar Aleksanaa commented on August 25, 2024

同时您还没有许可证,这意味着没有您的额外许可,其他人是无法分发您的词库原文件的。

from custompinyindictionary.

wuhgit avatar wuhgit commented on August 25, 2024

谢谢您的好意提醒,但对于这个项目而言,我认为许可也是多余的,这只是一个词库,对于文字而言,使用是不需要由谁来许可的。

我做的工作只是一个整理修正而已,并且整理词库数据所用的相关代码也没有传到这个项目里面,这里存放的只是最终的数据,里面的词汇不曾也不会属于任何一个人或者组织,数十亿人使用了几千年的中文,没有谁拥有这个资格,是吧?

所以,如果要分发,请大胆分发!如果我做的这点微小工作能帮助到更多的人,我就已经很满足了。

这种项目大概可以算作一个特殊的种类,版本号多余,许可声明也属于多余。但我还是要感谢您的认真!

from custompinyindictionary.

Related Issues (20)

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.