From 7298ca0b7bbd04d3296c2a992c10a6807c592573 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 10:31:01 +0800 Subject: [PATCH 1/7] crawler.md to crawler.yml --- .github/ISSUE_TEMPLATE/{crawler.md => crawler.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/ISSUE_TEMPLATE/{crawler.md => crawler.yml} (100%) diff --git a/.github/ISSUE_TEMPLATE/crawler.md b/.github/ISSUE_TEMPLATE/crawler.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/crawler.md rename to .github/ISSUE_TEMPLATE/crawler.yml From c0358975c22d7f06590262a2b1f442f9e8da6370 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 10:31:27 +0800 Subject: [PATCH 2/7] translation.yml --- .github/ISSUE_TEMPLATE/translation.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/translation.yml diff --git a/.github/ISSUE_TEMPLATE/translation.yml b/.github/ISSUE_TEMPLATE/translation.yml new file mode 100644 index 0000000..144fe80 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/translation.yml @@ -0,0 +1,24 @@ +name: 文章翻译 +description: 外文优秀技术、开源文章翻译 +title: (译文中文标题) +labels: + - Article + - Translation +body: + - type: input + id: page_link + attributes: + label: 文章网址 + description: 一个 issue 只能填一个 + validations: + required: true + - type: textarea + attributes: + label: 翻译须知 + description: 如有其它需要注意的事项,请注明以帮助译者。 + value: '@kaiyuanshe/team-1' + - type: markdown + attributes: + value: >- + This template was generated with [Issue Forms + Creator](https://issue-forms-creator.netlify.app) \ No newline at end of file From b6950554ab8f210fbabe2966c73059a6236d0f15 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 10:37:33 +0800 Subject: [PATCH 3/7] rm translation.yml --- .github/ISSUE_TEMPLATE/translation.yml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/translation.yml diff --git a/.github/ISSUE_TEMPLATE/translation.yml b/.github/ISSUE_TEMPLATE/translation.yml deleted file mode 100644 index 144fe80..0000000 --- a/.github/ISSUE_TEMPLATE/translation.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: 文章翻译 -description: 外文优秀技术、开源文章翻译 -title: (译文中文标题) -labels: - - Article - - Translation -body: - - type: input - id: page_link - attributes: - label: 文章网址 - description: 一个 issue 只能填一个 - validations: - required: true - - type: textarea - attributes: - label: 翻译须知 - description: 如有其它需要注意的事项,请注明以帮助译者。 - value: '@kaiyuanshe/team-1' - - type: markdown - attributes: - value: >- - This template was generated with [Issue Forms - Creator](https://issue-forms-creator.netlify.app) \ No newline at end of file From be1300d576c7fa2b8e68ed37c975ab4c0d0555b6 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 11:12:02 +0800 Subject: [PATCH 4/7] add new action --- .github/ISSUE_TEMPLATE/crawler.yml | 32 ++++++++++++++++++++---------- .github/workflows/crawler.yml | 27 ++++++++++++++++++++----- 2 files changed, 44 insertions(+), 15 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/crawler.yml b/.github/ISSUE_TEMPLATE/crawler.yml index a6dc744..144fe80 100644 --- a/.github/ISSUE_TEMPLATE/crawler.yml +++ b/.github/ISSUE_TEMPLATE/crawler.yml @@ -1,12 +1,24 @@ ---- -name: 文章抓取 -about: 自动抓取互联网文章,并转为 Markdown 文件保存 -title: (文章标题) +name: 文章翻译 +description: 外文优秀技术、开源文章翻译 +title: (译文中文标题) labels: - Article - - crawler ---- - -@kaiyuanshe/team I add a new article to translate or publish: - -https://example.com/replace/this/with/your/original/article/URL + - Translation +body: + - type: input + id: page_link + attributes: + label: 文章网址 + description: 一个 issue 只能填一个 + validations: + required: true + - type: textarea + attributes: + label: 翻译须知 + description: 如有其它需要注意的事项,请注明以帮助译者。 + value: '@kaiyuanshe/team-1' + - type: markdown + attributes: + value: >- + This template was generated with [Issue Forms + Creator](https://issue-forms-creator.netlify.app) \ No newline at end of file diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 2d55c03..8b8c606 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -13,17 +13,34 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: freeCodeCamp-China/article-webpage-to-markdown-action@v1 + - id: issue-parser + uses: stefanbuck/github-issue-parser@v3 with: - newsLink: "${{ github.event.issue.Body }}" - markDownFilePath: "./translation/" - githubToken: ${{ github.token }} + template-path: ".github/ISSUE_TEMPLATE/crawler.yml" + + - id: fetch-md + uses: freeCodeCamp-China/article-webpage-to-markdown-action@v2 + with: + pageURL: "${{ steps.issue-parser.outputs.issueparser_page_link }}" + markdownFolder: "./_drafts/Article/Translation/" + githubToken: ${{ github.token }} + + - name: 将输出发至评论区 + run: gh issue comment "$NUMBER" --body "$BODY" + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + BODY: | + - 原文网址: [${{ steps.fetch-md.outputs.title }}](${{ steps.fetch-md.outputs.original_url }}) + - 原文作者: [${{ steps.fetch-md.outputs.author || 'anonymous' }}](${{ steps.fetch-md.outputs.author_url }}) + - Markdown 文件: [点击编辑](${{ steps.fetch-md.outputs.editor_url }}) - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "${{ github.event.issue.title }}" - - name: Lark notification + - name: 飞书通知 uses: foxundermoon/feishu-action@v2 with: url: ${{ secrets.LARK_CHATBOT_HOOK_URL }} From 1d2308f769676515bbb6b7171e0a8f48b22203f4 Mon Sep 17 00:00:00 2001 From: luojiyin1987 Date: Thu, 8 Aug 2024 03:12:46 +0000 Subject: [PATCH 5/7] Auto Format --- .../The Value of Open Source Software.md | 21 +++++++++++++++++++ ...-source-selfishness-can-lead-to-burnout.md | 1 - 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/translation/The Value of Open Source Software.md b/translation/The Value of Open Source Software.md index e1e756c..e2a5258 100644 --- a/translation/The Value of Open Source Software.md +++ b/translation/The Value of Open Source Software.md @@ -486,24 +486,45 @@ Copyright © 2024 by Manuel Hoffmann, Frank Nagle, and Yanuo Zhou. 【[重新审视开源治理模式](https://https://mp.weixin.qq.com/s/K3xwrWleWHG5_yS0qAJThA)】 [^1]: 数据收集和汇总的具体方法详见 Nagle 等人的 **_普查_** 报告(2022 年)。 + [^2]: 开源软件的使用许可证有很大差异,有些许可证非常开放,允许以任何方式重复使用代码,包括在以非零价格出售的专有代码中重复使用,而另一些许可证则限制重复使用,只有在产生的代码根据相同的开源软件许可证发布时才允许重复使用(称为 copyleft -- "公共版权" 或 "著佐权")。关于开源软件许可证的详细讨论,可参见 Lerner and Tirole (2005) 和 Almeida 等人 (2017)。 + [^3]: 间接使用开源软件的情况通过依赖性分析来捕捉,这对于准确衡量一家公司所依赖的开源软件的全部范围是必要的。例如,如果一家公司的专有代码调用了开源软件包 A,而软件包 A 又调用了软件包 B,那么只看直接调用就会发现软件包 B 是该公司专有代码所需的构件。 + [^4]: **_普查_** 将开源软件包定义为 "可由软件包管理器安装和管理的软件单元",并将软件包管理器定义为 "自动安装和管理软件包的软件"(Nagle 等人, 2022)。 + [^5]: 在长尾使用分布中,占完整 **_普查_** 数据其余 30% 的软件包未在最终报告中共享,因此无法纳入我们的分析。 + [^6]: GitHub 是一个托管和协作平台,贡献者可以用它来协调开源软件项目的开发和发布。GitHub 成立于 2008 年,现已成为全球最大的开源软件开发中心。2023 年 1 月,GitHub 拥有超过 3.7 亿个软件仓库和超过 1 亿名开发人员。除个人用户外,众多私营企业也在积极使用 GitHub 平台,其中包括微软(2018 年收购了 GitHub)、Facebook、谷歌以及其他众多大小公司。 + [^7]: 作为健全性检查,我们尝试访问获得的所有代码库 URL,以确保它们处于正常工作状态。对于那些在 GitHub 上无法访问的代码库,我们手动找到了正确的 URL。 + [^8]: 作为稳健性检查,我们随机抽取了 50 个从谷歌搜索方法中得出的软件包-代码库匹配结果,并进行了人工检查。所有匹配结果都经人工确认无误,为自动匹配方法提供了额外支持。 + [^9]: 由于缺少软件包和软件包管理器名称,因此无法使用 libraries.io 进行精确匹配。技术名称是面向客户的产品名称,与用于内部开发的软件包名称相比,其技术性和精确性可能较低。因此,在 libraries.io 搜索中使用技术名称可能会造成严重的歧义。 + [^10]: 匹配率超过 96%,未匹配的代码库仅占我们以下讨论的计算的开源软件需求值的 0.15%。 + [^11]: 过滤基于 [GHTorrent](https://github.com/ghtorrent) 的 "虚假用户 "分类,以及任何包含 "机器人" 字样并用特殊字符包围的用户名。这种方法比其他僵尸检测方法(如 [GitHub Innovation Graph](https://innovationgraph.github.com/) 中使用的方法)更为保守,后者依赖于每月提交频率阈值。 + [^12]: https://pypi.org/project/pygount/ 以及 https://github.com/github-linguist/linguist + [^13]: 请注意,我们的重点是人工重新编写而非机器人编写的开源软件代码的成本。然而,直接删除机器人账户的所有开源软件贡献在这里是不可行的,因为我们无法观察到机器人账户在 GitHub 上所写代码的确切行数。 + [^14]: 在另一个版本中,我们使用了劳动力市场和商品市场的混合方法,这与 Greenstein 和 Nagle(2014 年)和 Murciano-Goroff 等人(2021 年)的研究更为接近。然而,由于数据限制,在我们的环境中应用这种方法需要许多额外的假设。为简单起见,我们将其称为商品市场法,并在 [附录 A](https://hackmd.io/7O2fpfsAQGiFfYFEPN4eNQ?view#%E9%99%84%E5%BD%95-A%EF%BC%89%EF%BC%9A-%E5%95%86%E5%93%81%E5%B8%82%E5%9C%BA%E4%BC%B0%E5%80%BC%E6%B3%95) 中提供了该方法的详细信息、统计数据以及局限性。 + [^15]: 我们只使用代码行,不包括文档行和空行。因此,我们低估了重新创建每个软件包的真正价值。 + [^16]: 与代表性代理模型类似(如 Williamson 2006),我们可以认为每个软件包都是由不同的程序员创建的,这些程序员是彼此的相同复制品(因此具有相同的技能水平,但不会通过学习提高效率)。 + [^17]: 在 Wachs 等人(2022 年)的研究中,共有 179 个国家,但排名前 30 的国家占全球积极贡献国的 88% 以上,其余每个国家所占份额不到 0.6%。[表 A2](#表A2) 列出了前 30 个国家。 + [^18]: 我们根据活跃的 GitHub 开发人员数量和软件开发人员的平均基本年薪来选择高薪和低薪参考国家。 + [^19]: 附录中的表格显示了 [表 2](#表2) 中包括软件语言**_区间 1 和 2_**([表 A3](#表A3))以及所有三个软件语言区间([表 A4](#表A4))时的等效值。 + [^20]: 由于 **_普查_** 包含专有的客户信息,因此没有显示整个数据集里的行业情况,所以我们只能使用 **_BuiltWith_** 的外向数据来显示各行业的价值。我们将 BuiltWith 网站与 Orbis 和 Compustat 数据集中的行业信息进行匹配。通过这一过程,94.6% 的 BuiltWith 网站与行业信息进行了匹配。对于与多个行业相关的公司(域),我们取其平均值并在各行业间进行分配。 + [^21]: [表 A5](#表A5) 显示了我们使用的一篮子开源软件及其专有等同软件。为了建立这个篮子,我们寻找在总体功能和特征集上具有类似开源软件等同物的专有软件,并设法确定软件对,这些软件总体上反映了现有开源软件类型的广泛代表性。 + [^22]: 我们使用软件的 3 年使用寿命,即 1/(1-0.66),得到了商品市场专有篮子的平均价格,因此折旧系数为 0.33。这符合美国国税局(IRS)关于软件折旧的规定,即 "如果你可以折旧计算机软件的成本,请在 36 个月的使用寿命内使用直线法"。https://www.irs.gov/publications/p946#en_US_2022_publink1000107354。 diff --git a/translation/how-open-source-selfishness-can-lead-to-burnout.md b/translation/how-open-source-selfishness-can-lead-to-burnout.md index 7c7f3cd..c485180 100644 --- a/translation/how-open-source-selfishness-can-lead-to-burnout.md +++ b/translation/how-open-source-selfishness-can-lead-to-burnout.md @@ -5,4 +5,3 @@ originalURL: https://www.techrepublic.com/article/how-open-source-selfishness-ca translator: "" reviewer: "" --- - From b0dcb9eede6560c9be6f02ddfdec9d1d17c19c12 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 20:35:07 +0800 Subject: [PATCH 6/7] fix from review --- .github/ISSUE_TEMPLATE/crawler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/crawler.yml b/.github/ISSUE_TEMPLATE/crawler.yml index 144fe80..3916dd1 100644 --- a/.github/ISSUE_TEMPLATE/crawler.yml +++ b/.github/ISSUE_TEMPLATE/crawler.yml @@ -16,7 +16,7 @@ body: attributes: label: 翻译须知 description: 如有其它需要注意的事项,请注明以帮助译者。 - value: '@kaiyuanshe/team-1' + value: '@kaiyuanshe/team' - type: markdown attributes: value: >- From 6fe5890f798dbd160f3f63e982998c53e6bd3c80 Mon Sep 17 00:00:00 2001 From: luojiyin Date: Thu, 8 Aug 2024 20:47:13 +0800 Subject: [PATCH 7/7] fix from review --- .github/workflows/crawler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 8b8c606..036c7cd 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -22,7 +22,7 @@ jobs: uses: freeCodeCamp-China/article-webpage-to-markdown-action@v2 with: pageURL: "${{ steps.issue-parser.outputs.issueparser_page_link }}" - markdownFolder: "./_drafts/Article/Translation/" + markdownFolder: "./translation/" githubToken: ${{ github.token }} - name: 将输出发至评论区