mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-13 22:30:37 +08:00
Merge branch 'LCTT:master' into onionstalgia-talk-2
This commit is contained in:
commit
14a1a28dc4
@ -0,0 +1,107 @@
|
||||
[#]: subject: "Give your Terminal a Retro Look Using this Neat Application"
|
||||
[#]: via: "https://www.debugpoint.com/cool-retro-terminal/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-15493-1.html"
|
||||
|
||||
给你的终端一个复古的外观
|
||||
======
|
||||
|
||||
> 想让你的终端有一个复古的外观?本指南将帮助你在 Linux 发行版中安装 Cool Retro Terminal 应用程序。
|
||||
|
||||
![酷炫复古终端][1]
|
||||
|
||||
你有没有想过如何在你的 Linux 终端中模仿那些老式 CRT 显示器的外观?
|
||||
|
||||
那些 CRT 屏幕有自己的粉丝。如果你把苹果 2 或 IBM 3278 终端之类与今天的 4K 显示器显示相比较,它们的外观真的很酷。我并不是说 4K 显示器不好,但有时传统的显示器会让我们想起那些过去的日子。闲话少说。让我们开始安装这个应用程序。
|
||||
|
||||
### Cool Retro Terminal
|
||||
|
||||
该应用程序是自由开源的。它被称为 [cool-retro-term][2]。它是轻量级的,有许多自定义选项,有预先设置的配置文件,如 Apple 2 等。它还能在你的终端中提供那些静态噪音和扫描线效果。很酷,不是吗?
|
||||
|
||||
它是用 Qt 构建的,需要 Qt 5.2 或更高版本。如果你使用的是最新的 Linux 发行版,在依赖性方面你应该没问题。
|
||||
|
||||
![绿色扫描线主题][3]
|
||||
|
||||
### 如何下载和安装 Cool Retro Terminal
|
||||
|
||||
Ubuntu、Linux Mint 和其他基于 Debian 的发行版:
|
||||
|
||||
使用下面的简单命令在你的 Ubuntu 和其他相关发行版中安装这个应用程序:
|
||||
|
||||
```
|
||||
sudo apt install cool-retro-term
|
||||
```
|
||||
|
||||
Arch Linux:
|
||||
|
||||
这个软件包在 Arch 用户仓库(AUR)中可用。如果你没有启用 AUR,请使用 [本指南][4] 启用它,然后使用以下命令来安装它:
|
||||
|
||||
```
|
||||
pacman -S cool-retro-term
|
||||
```
|
||||
|
||||
Fedora、RHEL 和其他相关发行版:
|
||||
|
||||
对于 Fedora 和其他相关的 Linux,使用下面的命令来安装这个应用程序:
|
||||
|
||||
```
|
||||
sudo dnf install cool-retro-term
|
||||
```
|
||||
|
||||
Appimage:
|
||||
|
||||
也有一个 AppImage 格式的独立的可执行程序,你可以直接下载并运行。不需要安装。按照下面的命令来做:
|
||||
|
||||
```
|
||||
wget https://github.com/Swordfish90/cool-retro-term/releases/download/1.1.1/Cool-Retro-Term-1.1.1-x86_64.AppImage
|
||||
chmod a+x Cool-Retro-Term-1.1.1-x86_64.AppImage
|
||||
./Cool-Retro-Term-1.1.1-x86_64.AppImage
|
||||
```
|
||||
|
||||
注意:在 GitHub 中,没有 1.2.0 以后的版本的 AppImage 构建版。
|
||||
|
||||
### 配置
|
||||
|
||||
安装完成后,你可以在应用程序菜单中找到终端应用程序 “Cool Retro Term”。那么,启动该应用程序并享受其中吧。
|
||||
|
||||
请记住,这覆盖你的 Linux 发行版中的默认控制台/终端应用程序。它是一个独立的控制台应用程序。
|
||||
|
||||
配置选项可以通过右键菜单访问。
|
||||
|
||||
上下文菜单给你提供了以下预设。然后你可以通过设置窗口对它们中的每一个进行颜色和外观设置的配置。例如,如果你想要更多的透明度、对比度或更多的噪音、环境光或闪烁。所有这些都可以从下面的设置窗口通过几个选项进行配置。
|
||||
|
||||
而且,你可以轻松地制作你自己的主题。
|
||||
|
||||
![Cool Retro Term 中的预装主题][5]
|
||||
|
||||
![设置中的各种效果][6]
|
||||
|
||||
### 总结
|
||||
|
||||
Cool Retro Terminal 是一个用于 Linux 桌面的老式显示管终端,它可以让你体验到如同坐在复古终端前的感觉。你可能喜欢,也可能不喜欢,而且人们几乎不把它作为日常使用。但它仍然是一个漂亮的终端,可以时不时地体验一下,以摆脱平凡的终端。
|
||||
|
||||
你喜欢复古的外观吗?你最喜欢的主题是什么?请在下面的评论区告诉我。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/cool-retro-terminal/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2021/12/cool-retro-terminal-1024x576.jpg
|
||||
[2]: https://github.com/Swordfish90/cool-retro-term
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2021/12/Green-Scanlines-Theme-1024x594.jpg
|
||||
[4]: https://www.debugpoint.com/2021/01/install-yay-arch/
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2021/12/Pre-loaded-Themes-in-Cool-Retro-Term-1024x599.jpg
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2021/12/Various-Effects-in-Settings.jpg
|
@ -0,0 +1,142 @@
|
||||
[#]: subject: "10 universal steps for open source code review"
|
||||
[#]: via: "https://opensource.com/article/22/10/code-review"
|
||||
[#]: author: "Martin Kopec https://opensource.com/users/martin-kopec"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "yzuowei"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-15489-1.html"
|
||||
|
||||
开源代码评审的十个通用步骤
|
||||
======
|
||||
|
||||
![][0]
|
||||
|
||||
> 只要你遵循这些通用流程,代码评审并不可怕。
|
||||
|
||||
你是否需要在你还没有完全理解整个项目时就对代码进行评审?抑或你避开了评审,以免让你看起来不知道如何进行。
|
||||
|
||||
本篇文章想要告诉你一个更好的方法。<ruby>代码评审<rt>code review</rt></ruby> 并不需要你知道所有事情。实际上,就我个人经验而言,这种情况非常普遍。
|
||||
|
||||
我还记得作为实习生加入 <ruby>红帽<rt>Red Hat</rt></ruby> 的时候,被要求参与代码评审。我们当时采取的是 +1 或 -1 的投票系统,而我在一开始的时候常常踌躇于该如何评审。我发现我会问自己,如果我对于一处改动给予了 +1,而别人却投了 -1,我是不是看起来很蠢?
|
||||
|
||||
如果你对一处改动投了 +1,而别人投了 -1,这又意味着什么呢?答案是不意味任何事!你可能只是漏掉了一处别人注意到的细节。这不意味着世界末日。这也是为什么我们会用投票系统。正如同所有开源项目一样,代码合并是一项协同工作。
|
||||
|
||||
最近,我接到了太多的代码评审工作,以至于我几乎做不过来。我同时也注意到,参与评审的贡献者数量正在稳步减少。
|
||||
|
||||
出于这个原因,我想要写一篇文章阐述我对代码评审的个人观点。在这篇文章里,我会分享一些诀窍与技巧。我将会向你展示几个用来问自己的问题,以及在评审代码时需要注意的一些地方。
|
||||
|
||||
### 代码评审的目的是什么?
|
||||
|
||||
你是否曾写过一个非常简单的补丁?你认为它是如此微不足道,不需要审查。或许你直接就合并了它。直到晚些时候,你意识到你犯了个错误,一个明显的或是愚蠢的错误,比如错误的缩进,比如几行重复的代码而不是调用函数(是的,这些都是经验之谈!)。
|
||||
|
||||
如果有其他人来审查代码,就会发现这些东西。
|
||||
|
||||
代码评审的一个目的便是为你带来一双新的眼睛,从新的视角看待你要尝试解决的问题。这种新的背景也正是为什么代码评审至关重要。
|
||||
|
||||
你可能认为你必须是一个语言专家,才能审查别人的代码、项目,或两者。让我来告诉你一个所有代码评审者都想跟你说的秘密吧:大错特错!你并不需要完全理解该项目或者编程语言,就可以为一个改动提供全新的视角。下面,我将向你展示代码评审的通用流程。
|
||||
|
||||
### 代码评审的通用流程
|
||||
|
||||
这是我的代码评审流程,拆分成了几个要点。这个流程包含了我会问自己的一些问题,以帮助我专注于代码的变化以及其后果。你不需要严格依照这个顺序来进行评审。如果有任何原因导致你无法执行其中的某一步,跳过那一步就好。
|
||||
|
||||
#### 1、理解改动,它想要解决的问题,以及为什么要这么做
|
||||
|
||||
为什么需要改动的解释以及任何相关背景都应该被放在 <ruby>提交<rt>commit</rt></ruby> 信息里。如果没有,请要求提供,并请投 -1 直到相关信息被提供。
|
||||
|
||||
改动想解决的问题需要被解决吗?它是项目应当关注的问题,还是与项目完全无关?
|
||||
|
||||
#### 2、你会如何实现解决方案?它会不一样吗?
|
||||
|
||||
在这个时候,你应该已经知道代码改动是为了什么。换做是你会怎么做?在进一步对改动进行细节评审前,先思考这个问题。如果你想出了一个不一样的解决方案,并且你认为你的方案更好,在评审中提出来。你不需要投 -1;去问问作者为什么没有往那个方向走,看看这次讨论会把你们带向何方。
|
||||
|
||||
#### 3、运行有改动和没有改动的代码
|
||||
|
||||
我通常会在代码中设置几个断点,运行代码并检查新代码是如何与其余部分互动的。
|
||||
|
||||
如果你无法运行整个代码,试着将带有新代码的函数复制到一个新的本地文件,模拟输入数据,然后运行。这在你不知道怎么运行整个项目,或者无法接触到运行所需的特殊环境时很有帮助。
|
||||
|
||||
#### 4、新代码会破坏任何东西吗?
|
||||
|
||||
我是说,任何东西。想一想可能的后果。
|
||||
|
||||
以一个新的命令行选项为例,它会总是被目标所接受吗?
|
||||
|
||||
是否存在这样一种情况,使得新选项无法被接受或是会与其他东西起冲突?
|
||||
|
||||
或许新代码是导入了新的东西。那么这个新的库,以及可能的新的依赖关系,能够在老版本或者项目的运行系统中被找到吗?
|
||||
|
||||
安全方面呢?新的依赖足够安全吗?你至少可以在网上快速地搜索一下。还有,注意一下控制台日志里的警告。有的时候在同一个库里也可以找到更安全的函数。
|
||||
|
||||
#### 5、新代码是否有效?
|
||||
|
||||
你刚刚确认了被提出的解决方案大概是正确的。现在该检查代码本身了。你需要关注代码的有效性和必要性。
|
||||
|
||||
检查新代码的风格。它与项目的代码风格相匹配吗?任何开源项目都(应该)有一份文档告知(新)贡献者项目所遵循的风格和优秀实践。
|
||||
|
||||
比如说,OpenStack 社区的所有项目都有一份 HACKING.rst 文件。你经常也能找到一份[新贡献者指南][1]包含所有必须知道的信息。
|
||||
|
||||
#### 6、确认所有新增的变量和导入都被使用
|
||||
|
||||
你正在评审的代码常常已经过多次迭代,有的时候代码的最终版本与初始版已迥然不同。所以我们很容易忘记一些在历史版本中加入的变量与引用。自动化检测通常会用到 lint 工具,类似 Python 中的 [flake8][12]。
|
||||
|
||||
(LCTT 译注:[lint][5] 指编程中用来发现代码潜在错误和约束代码风格的工具,起源于 C 语言编程中的静态分析工具 `lint`。“lint” 本意为衣服上积累的绒毛与灰尘,“lint” 的取名寓意则在于捕捉编程时产生的“绒毛与灰尘”)
|
||||
|
||||
(LCTT 校注:我建议,“Lint” 工具可以翻译为 “代码清理” 或 “代码清洁” 工具。)
|
||||
|
||||
你可以在不声明新变量的情况下重写代码吗?通常情况下你可以,但问题是这样是否更好。这会带来什么益处吗?我们的目标不是要创造尽可能多的单行代码,而是写出高效且易读的代码。
|
||||
|
||||
#### 7、新的函数和方法是否必要?
|
||||
|
||||
项目里的别的地方是否存在可以被复用的功能类似的函数?确保避免重新发明轮子以及重新实现已经被定义的逻辑永远都是值得的。
|
||||
|
||||
#### 8、有单元测试吗?
|
||||
|
||||
如果补丁增加了新的函数或者在函数内添加了新的逻辑,它也应该附带对应的单元测试。新函数的作者总是比别人更适合写该函数的单元测试。
|
||||
|
||||
#### 9. 验证重构
|
||||
|
||||
如果这次提交对现有代码进行了重构(它可能重命名了某个变量,或者是改变了的变量的作用域,或者是通过加减参数来改变函数的足迹,又或者是删去了某个东西),问一问你自己:
|
||||
|
||||
- 这个可以被删除吗?它会影响到稳定分支吗?
|
||||
- 所有出现的地方都删掉了吗?
|
||||
|
||||
你可以利用 [grep 命令][3] 来查找。你不会相信有多少次我投 -1 就是因为这个。这是一个任何人都会犯的简单错误,也正因如此任何人都可以发现它。
|
||||
|
||||
提交的所有者很容易忽略这些事情,这完全可以理解。我也犯过很多次这种错误。我最终发现问题的根源在于我太急于提出评审,以至于我忘记了对仓库进行整体检查。
|
||||
|
||||
除了对项目仓库的检查外,检查其他代码用户也十分必要。如果有别的项目导入了这个项目,它们可能也需要进行重构。在 OpenStack 社区中,我们有对应的工具来查询别的社区项目。
|
||||
|
||||
#### 10、项目文档是否需要做出更改?
|
||||
|
||||
你可以再一次使用 [grep 命令][4] 来检查在项目文档中是否提到了相关的代码改动。用常识来判断这次改动是否需要被收入文档以告知最终用户,还是只是一个不会影响用户体验的内部变化。
|
||||
|
||||
#### 额外提示:考虑周到
|
||||
|
||||
当你在评审完新代码后提出建议或评论时,要考虑周到,反馈准确,描述详尽。如果有你不理解的地方就发出提问。如果你认为代码存在错误,解释你的理由。记住,如果作者不知道什么地方出了问题,他们就无法修复它。
|
||||
|
||||
### 最后几句
|
||||
|
||||
唯一的坏评审是没有评审。通过评审和投票,你提供了你的观点并为此投票。没有人指望你来做出最终决定(除非你是核心维护者),但是投票系统允许你提供你的观点和意见。相信我,补丁所有者会很高兴你这么做了的。
|
||||
|
||||
你能想到别的要点来给出好的评审吗?你是否有我不知道的特殊技巧?在评论中分享它们吧!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/10/code-review
|
||||
|
||||
作者:[Martin Kopec][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[yzuowei](https://github.com/yzuowei)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/martin-kopec
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://docs.openstack.org/tempest/latest/contributor/contributing.html
|
||||
[2]: https://opensource.com/article/19/5/python-flake8
|
||||
[3]: https://opensource.com/downloads/grep-cheat-sheet
|
||||
[4]: https://www.redhat.com/sysadmin/how-to-use-grep
|
||||
[5]: https://codedocs.org/what-is/lint-software
|
||||
[0]: https://img.linux.net.cn/data/attachment/album/202301/29/140840wsbypukbubp69buv.jpg
|
@ -3,42 +3,44 @@
|
||||
[#]: author: "Katie Edwards https://opensource.com/users/kaedward"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "yzuowei"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-15492-1.html"
|
||||
|
||||
关于开源,你需要知道些什么
|
||||
======
|
||||
|
||||
一份用简单直白的语句来解释开源的新手指南。
|
||||
![][0]
|
||||
|
||||
所以你想要(或需要)知道[开源][1]的意思究竟是什么。我会介绍开源的一些基础,无论你是对项目贡献感兴趣,还是在想要融入的新工作圈子里总是听到这个名词。
|
||||
> 一份用简单直白的语句来解释开源的新手指南。
|
||||
|
||||
我坦白,我这个人没什么技术经验,在极具技术性的开源社区中从事着内容设计的边缘工作。考虑到我原来的背景是营销与传播,我决定换工作时感觉就像离了水的鱼儿。[Git][2],数据科学,软件的各种输入输出……直到一年后的今天,我依然感到难以消化。
|
||||
要是你想要(或需要)知道 [开源][1] 的意思究竟是什么。我会介绍开源的一些基础,无论你是对项目贡献感兴趣,还是在想要融入的新工作圈子里总是听到这个名词,因为这个词总是被人不断的提起。
|
||||
|
||||
但这正是为什么我要写这篇文章。我想要让开源变得不那么吓人。毕竟,开源的背后是支持型学习社区——这个社区对所有人开放,无论你是否有技术经验。
|
||||
我坦白,我这个人没什么技术经验,在极具技术性的开源社区中从事着内容设计的边缘工作。考虑到我原来的背景是营销与传播,我决定换工作时感觉就像离了水的鱼儿。[Git][2]、数据科学、软件的来龙去脉……直到一年后的今天,我依然感到难以消化。
|
||||
|
||||
我会从基本中的基本开始。
|
||||
但这正是为什么我要写这篇文章。我想要让开源变得不那么令人生畏。毕竟,开源的中心是一个支持型的学习社区 —— 这个社区对所有人开放,无论你是否有技术经验。
|
||||
|
||||
我会从基础中的基础开始。
|
||||
|
||||
### 什么是开源?
|
||||
|
||||
在此声明,开源的行业内定义可以在[<ruby>开放源代码促进会<rt>(Open Source Initiative)</rt></ruby>][3]的网站找到。
|
||||
在此声明,业界对开源的定义可以在 <ruby>[开放源代码促进会][3]<rt>Open Source Initiative</rt></ruby> 的网站找到。
|
||||
|
||||
然而,大众对“开源”软件的认知通常为它不用花钱,它的源代码是公开的,任何人都可以对其贡献,你可以重新发布它或者做任何你想用它做的事。
|
||||
然而,大众对“开源”软件的认知通常为它不用花钱,它的源代码是公开的,任何人都可以对其贡献,你可以重新发布它或者用它做任何你想做的事。
|
||||
|
||||
这里面有些是真的,而有些则属于常见的误解,其中之一就是关于花费。
|
||||
|
||||
#### 开源只要 0 元
|
||||
|
||||
这是真的吗?大部分情况下是,但不是所有情况。开源软件的本质在于代码的公开性,所以获取软件本身确实不需要花费。但是,依赖开源项目的营利公司也确实存在。但如果软件不需要花钱,开源公司又是如何生存的?他们该如何盈利?
|
||||
这是真的吗?大部分情况下是,但不是所有情况。开源软件的本质在于代码的公开性,所以获取软件本身确实不需要花费。但是,依赖开源项目营利的公司也确实存在。但如果软件不需要花钱,开源公司又是如何生存的?他们该如何盈利?
|
||||
|
||||
拥有“免费产品”这个概念本身是反直觉的。但你要知道:一个公司不一定要靠出售软件来赚钱,它也可以推销它的产品管理,数据储存,以及客户支持。
|
||||
拥有“免费产品”这个概念本身是反直觉的。但你要知道:一个公司不一定要靠出售软件来赚钱,它也可以从产品的管理,数据的储存,以及对客户的支持中获利。
|
||||
|
||||
很多公司都采用了订阅模式,他们提供客户支持服务以帮助客户调试软件并为客户解答疑惑。数据储存也并非免费,这片领域也能为公司带来收入。从这个角度来说,在销售的“产品”不是软件,而是订阅服务。
|
||||
很多公司都采用了订阅模式,他们提供客户支持服务以帮助客户解决软件问题并为客户解答疑惑。数据储存也并非免费,这也是能为公司带来收入的另一领域。从这个角度来说,在销售的“产品”不是软件,而是订阅服务。
|
||||
|
||||
- **开源代码是公开的**:这是真的吗?是的,永远都是。“开源”一词的先决条件正是这份公开性。源代码必须允许被查看、使用、修改并重新发布。
|
||||
- **你可以用这份代码做任何你想做的事**:这是真的吗?依情况而定。许可证条款会对你对代码的使用方式作出限制,但你通常都可以用代码做你想做的事。无论是调整项目以满足特殊需求,还是以此为基础做些别的,开源软件允许你和所有人对其修改。
|
||||
- **任何人都可以贡献开源项目**:这是真的吗?是的,但有限制。所有有[合适技能][4]的人都可以贡献开源。但是,这不意味着所有的贡献都会被接受和采纳。
|
||||
- **开源代码是公开访问的**:这是真的吗?是的,永远都是。“开源”一词的先决条件正是这份公开性。源代码必须允许被查看、使用、修改和重新发布。
|
||||
- **你可以用这份代码做任何你想做的事**:这是真的吗?依情况而定。许可证条款会对你对代码的使用方式作出限制,但你通常都可以用代码做你想做的事。无论是调整该项目以满足特殊需求,还是以此为基础做些别的,开源软件允许你和其他所有人对其修改。
|
||||
- **任何人都可以贡献开源项目**:这是真的吗?是的,但有限制。所有有 [合适技能][4] 的人都可以贡献开源。但是,这不意味着所有的贡献都会被接受和采纳。
|
||||
|
||||
比如说,你对一个目标是对地球上所有的鸟类进行分类的项目感兴趣。你恰好很喜欢恐龙,特别是那些最终进化成如今的鸟类的恐龙。于是,你为所有最像鸟类的恐龙提交了条目。项目所有者在看到这些后可能会想:“不错,这都是些很棒的史前鸟类。”但他们也可能会认为:“嗯……这些恐龙看起来像鸟,但他们还不是鸟,因此他们不属于鸟类百科。”
|
||||
|
||||
@ -46,32 +48,32 @@
|
||||
|
||||
### 为什么选择开源呢?
|
||||
|
||||
那么,在众多贡献之后(如果能贡献完的话),为什么人们愿意免费赠送他们的软件?如果有那么多人为此付出了时间与精力,他们为什么不能联合起来为软件明码标价?
|
||||
那么,在众多贡献之后(如果这些贡献完成的话),为什么人们愿意免费赠送他们的软件?如果有那么多人为此付出了时间与精力,他们为什么不能联合起来为软件明码标价?
|
||||
|
||||
这个问题有很多回答。我在这里给出了一些:
|
||||
|
||||
- 创业是艰难的,如果你开发的项目展现不出赚钱的潜力则尤其如此。召集一群志同道合的人,没有承诺也没有对薪水的期望,相对而言要简单得多。
|
||||
- 大部分开源社区的成员对软件的改进或者实现感兴趣,但他们没有时间或者不愿意将项目作为他们的全职工作。有时候开源代表的是热情驱动的项目,极客组成的团体,还有凝聚众人智慧对恼人问题的解决方案。
|
||||
- 大部分开源社区的成员对软件的改进或者实现感兴趣,但他们没有时间或者不愿意将项目作为他们的全职工作。有时候开源代表的是热情驱动的项目、极客组成的团体,还有凝聚众人智慧对恼人问题的解决方案。
|
||||
- 围绕各种规模的开源项目形成的团体促进了支持型社区的成形,在这里贡献者与旁观者都可以练习他们的技能,改进他们常用的软件,互教互学,并为发声被听到而感到振奋。很多开源社区本质上就是高度集中的线上爱好者俱乐部。
|
||||
|
||||
### 我该如何参与呢?
|
||||
|
||||
现在你可能会问你自己:“我知道了这些信息又可以做些什么呢?我能贡献开源项目吗?如果我不够优秀的话该怎么办?”
|
||||
|
||||
不要害怕——即便是[新手][5]也欢迎贡献开源项目。在与社区一起朝着更大的目标共同努力的同时,你也得到了一个磨练技能的绝佳机会。况且,正如我之前所说,最坏的情况也不过是你的提交不被鸟类百科所接受(而这也是因为项目的所有者看不到你对鸟类百科的愿景,那是一片关于鸟类知识的网络天地,鸟与他们的祖先在那里一起幸福地生活)。
|
||||
不要害怕 —— 即便是 [新手][5] 也欢迎为开源项目做贡献。在与社区一起朝着更大的目标共同努力的同时,你也得到了一个磨练技能的绝佳机会。况且,正如我之前所说,最坏的情况也不过是你的提交不被“鸟类百科”所接受(而这也是因为项目的所有者看不到你对鸟类百科的愿景,那是一片关于鸟类知识的网络天地,鸟与他们的祖先在那里愉快地共存)。
|
||||
|
||||
你需要会写代码来贡献开源吗?与大众认知相违的是,[你不需要][6]。项目需要“民生”以兴旺,这意味着他们需要来自不同背景的人的贡献。视觉设计师、撰稿人、营销、评审、翻译、主题爱好者,甚至只是最终产品的用户,都是可贵的贡献者。他们不仅是帮忙搭建并改进了产品,他们也识别出了漏洞,提出了修改建议,为项目做出宣传,最终使得社区强大。
|
||||
你需要会写代码来贡献开源吗?与大众认知相违的是,[你不需要][6]。项目“需要举全村之力”以兴旺,这意味着他们需要来自不同背景的人的贡献。视觉设计师、撰稿人、营销、评审、翻译、主题爱好者,甚至只是最终产品的用户,都是可贵的贡献者。他们不仅是帮忙搭建并改进了产品,他们也识别出了漏洞,提出了修改建议,为项目做出宣传,最终使得社区强大。
|
||||
|
||||
简单来说,不论你的背景是什么,经验有多少,只要你对开源或是某个特别的项目感兴趣,你几乎被保证了一个会张开双臂欢迎你的社区。
|
||||
简单来说,不论你的背景是什么,经验有多少,只要你对开源或是某个特别的项目感兴趣,你几乎可以保证会被张开双臂欢迎。
|
||||
|
||||
### 现在就加入开源吧
|
||||
|
||||
还是不确定应该从哪开始?这里有些能帮助你的想法和资源:
|
||||
|
||||
|
||||
- [Up For Grabs][7] 是一份“专门为新贡献者策划任务的开源项目清单。”这里很适合新贡献者们来寻找简单的初次 PR 机会,这次机会也能让你探寻你更喜欢哪种贡献。
|
||||
- 来看看 GitHub 上的这份[新手友好项目][8]列表吧。
|
||||
- 如果你还是缺乏灵感,考虑一下[贡献][9]<ruby>红帽<rt>(Red Hat)</rt></ruby>的开放设计系统 [PatternFly][10](或者一起飞)。
|
||||
- 来看看 GitHub 上的这份 [新手友好项目][8] 列表吧。
|
||||
- 如果你还是缺乏灵感,考虑一下[贡献][9](或一起“飞”) <ruby>红帽<rt>Red Hat</rt></ruby>的开放设计系统 [PatternFly][10]。
|
||||
- LCTT 夹带私货:你还可以通过参与 LCTT 的翻译工作来首次体验如何参与开源,这几乎简单到你只需要懂一点点英文和一些热情,本文就是由开源贡献者翻译贡献而成的。入口在此: https://linux.cn/lctt/
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -80,7 +82,7 @@ via: https://opensource.com/article/22/11/get-started-open-source
|
||||
作者:[Katie Edwards][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[yzuowei](https://github.com/yzuowei)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
@ -96,3 +98,4 @@ via: https://opensource.com/article/22/11/get-started-open-source
|
||||
[8]: https://github.com/MunGell/awesome-for-beginners
|
||||
[9]: https://github.com/patternfly
|
||||
[10]: https://www.patternfly.org/v4/get-started/design
|
||||
[11]: https://img.linux.net.cn/data/attachment/album/202301/30/110936lhhk216wajijdh22.jpg
|
@ -0,0 +1,92 @@
|
||||
[#]: subject: "Over 90% Systems Had Flatpak Installed, Says GNOME's Research Report"
|
||||
[#]: via: "https://news.itsfoss.com/gnome-research-report/"
|
||||
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-15490-1.html"
|
||||
|
||||
GNOME 的研究报告称 90% 以上的系统都安装了 Flatpak
|
||||
======
|
||||
|
||||
> GNOME 的调查数据揭示了一些令人感兴趣的用户偏好。这是否会影响 GNOME 在不久的将来的开发决策?让我们拭目以待。
|
||||
|
||||
![GNOME 的研究报告说,超过 90% 的系统安装了 Flatpak][1]
|
||||
|
||||
在 2022 年 8 月,GNOME 开发了 [一个工具][2],让用户可以匿名提供关于他们的系统配置、扩展和 GNOME 调整的设置。
|
||||
|
||||
这是为了**帮助 GNOME 深入了解**用户的偏好,并在分析数据的基础上做出更好的决定。
|
||||
|
||||
GNOME 设计团队的成员 [Allan Day][3] 在最近的一篇博文中分享了收集的数据。它包含了一些有趣的洞察和发现。
|
||||
|
||||
让我带你了解一下:
|
||||
|
||||
### 研究报告的发现
|
||||
|
||||
本研究报告包括来自 2,517 个用户的数据,这些用户的硬件和软件配置各不相同。
|
||||
|
||||
> 📋 这些数据是使用 [gnome-info-collect 工具][4] 从向 GNOME 提供数据的人那里获得的,并不代表 GNOME 的全部用户。
|
||||
|
||||
最初,他们收到了 2,560 个回复,但由于一些数据没有来自使用 GNOME 的系统或来自虚拟机,他们不得不从数据集中删除一些。
|
||||
|
||||
它包含什么?它含有匿名的非敏感数据指标,显示了用户是如何设置他们的系统的。
|
||||
|
||||
> 💡 这对 GNOME 团队来说可以有很大的用处,他们现在可以使用这些数据来做出设计和开发的决定。
|
||||
|
||||
其中一个引起我们注意的数据指标是在他们的 GNOME 系统上使用 Flatpak 的人的百分比。
|
||||
|
||||
**超过 90% 的系统都安装了 Flatpak。**
|
||||
|
||||
在 2517 个用户中,有高达 2344 个用户在他们的 GNOME 系统上安装了 Flatpak。其中 2,102 人完全启用了它。
|
||||
|
||||
在这样一个小的数据集中,这是一个巨大的数字! 🤯
|
||||
|
||||
关于这一点,Allan 有这样的补充说明:
|
||||
|
||||
> Flatpak 和 Flathub 对 GNOME 的战略方向至关重要,所以了解它们的采用程度是很有用的。这种采用程度也与 GNOME 的软件应用设计有关。
|
||||
|
||||
除此之外,一些关键的收获包括:
|
||||
|
||||
- 最常用的默认网页浏览器是 Mozilla Firefox。
|
||||
- 在使用 GNOME 的人中,最常用的发行版是 Fedora。
|
||||
- 谷歌是配置了在线账户的用户的首选账户。
|
||||
- GIMP 是安装在 GNOME 上最受欢迎的应用程序之一,紧随其后的是 VLC。
|
||||
- 83% 的用户至少启用了一个 GNOME 扩展。
|
||||
|
||||
我建议你通过该 [研究报告][5] 来获得更深入的了解。
|
||||
|
||||
### 这是否有助于改善 GNOME 的体验?
|
||||
|
||||
收集这些数据是为了通过分析和提供给设计和开发团队来改善桌面体验。
|
||||
|
||||
然而,收集到的数据仍然相当有限,可能无法代表大多数的 GNOME 用户。
|
||||
|
||||
为了解决这个问题,博文中提到:
|
||||
|
||||
> 总的来说,这些数据对于 GNOME 项目应该专注于哪些功能给出了一些有力的提示。它也提供了关于哪些功能不应该被优先考虑的证据。需要记住的是,虽然我们在这里有关于一些 GNOME 用户做出的决定的证据,但这些数据并没有让我们深入了解为什么他们会做出这样的决定。
|
||||
|
||||
GNOME 团队希望在根据这些数据做出决定时保持谨慎。而且,像这样的调查应该能让他们更好地了解用户的偏好,并把重点放在基本层面上更重要的东西上。
|
||||
|
||||
当然,不可能照顾到每一种类型的用户。但是,只要基本面得到了照顾,桌面体验最终应该得到改善。
|
||||
|
||||
你对这些发现有什么看法?欢迎在下面的评论中分享你的想法。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/gnome-research-report/
|
||||
|
||||
作者:[Sourav Rudra][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/sourav/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://news.itsfoss.com/content/images/size/w2000/2023/01/flatpak-gnome-research-report.jpg
|
||||
[2]: https://news.itsfoss.com/gnome-improve-tool/
|
||||
[3]: https://twitter.com/allanday
|
||||
[4]: https://gitlab.gnome.org/vstanek/gnome-info-collect/
|
||||
[5]: https://blogs.gnome.org/aday/2023/01/18/gnome-info-collect-what-we-learned/
|
@ -0,0 +1,111 @@
|
||||
[#]: subject: "Kodi 20.0 "Nexus" Update Includes Support for AV1 Video and Steam Deck Controller"
|
||||
[#]: via: "https://news.itsfoss.com/kodi-20-nexus-release/"
|
||||
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Kodi 20.0 "Nexus" Update Includes Support for AV1 Video and Steam Deck Controller
|
||||
======
|
||||
|
||||
Multiple major feature additions with the Kodi v20 release.
|
||||
|
||||
![Kodi 20.0 "Nexus" Update Includes Support for AV1 Video and Steam Deck Controller][1]
|
||||
|
||||
[Kodi][2] is a cross-platform open-source media player developed by the Kodi Foundation that offers a plethora of features.
|
||||
|
||||
Its previous major release was [Kodi 19 'Matrix'][3] which came **almost two years ago**.
|
||||
|
||||
Now, an improved release is here, called **Kodi 'Nexus'**. It promises several new features and improvements.
|
||||
|
||||
Let's take a look at those.
|
||||
|
||||
### 🆕 Kodi 20 'Nexus': What's New?
|
||||
|
||||
The release is bringing in plenty of new things. Some of the highlights include:
|
||||
|
||||
- **AV1 Codec Support**
|
||||
- **Enhanced PVR support**
|
||||
- **Updated Scrapers**
|
||||
- **Various Fixes and Improvements**
|
||||
|
||||
![kodi 20 nexus][4]
|
||||
|
||||
#### AV1 Codec Support
|
||||
|
||||
Kodi now features support for the open, royalty-free [AV1 codec][5] on Linux.
|
||||
|
||||
Hardware acceleration for decoding AV1 was made possible through [Video Acceleration API][6] (VA-API), and AV1 support was also added for InputStream.
|
||||
|
||||
#### Enhanced PVR support
|
||||
|
||||
TV watching and radio listening via [PVR][7] has also received many improvements, some of the notable ones include:
|
||||
|
||||
- A redesigned channel manager.
|
||||
- Ability to show the provider of a specific channel or recording.
|
||||
- Ability to sort channels and recordings by provider.
|
||||
- Support for read-only recordings.
|
||||
- Improvements to EPG search.
|
||||
- Automatic cleanup of cached PVR images.
|
||||
- Various performance improvements.
|
||||
- Multi-instance support for PVR client-addons.
|
||||
- Various tweaks to the PVR experience under the Estuary theme.
|
||||
|
||||
#### Updated Scrapers
|
||||
|
||||
The TVDB TV Show scraper was updated to prevent breakage after introducing a change that broke the 'VideoStreamDetail' and 'InfoTagVideo; Python APIs.
|
||||
|
||||
> 🗒️ Users of older Kodi 20 releases are recommended to update to the latest version to avoid any disruptions with this scraper.
|
||||
|
||||
Furthermore, the Python TV Show scrapers were updated to fix a potentially confusing issue where the new scrapers were using a different XML format than the existing providers used.
|
||||
|
||||
Due to that, now, when you add new episodes to existing TV shows in your library, you will have to refresh the show to download the new episode guide. Even if you are using the NFO files.
|
||||
|
||||
#### 🛠️ Various Fixes and Improvements
|
||||
|
||||
Other than that, Kodi 20 features several fixes and improvements, such as:
|
||||
|
||||
- Built-in support for Steam Deck controller.
|
||||
- Initial support for the NFSv4 file system.
|
||||
- 'Continue Watching' feature for certain video folders.
|
||||
- Support for mounting optical media by default.
|
||||
- Ability to set HDR output when using the Generic Buffer Management API.
|
||||
- Addressed an issue with DRMPrime.
|
||||
- Various Teletext improvements.
|
||||
- Fixed black screen issue with standalone games.
|
||||
|
||||
To explore more, you can read the [official announcement post][8].
|
||||
|
||||
### 📥 Download Kodi 20
|
||||
|
||||
Kodi 20 'Nexus' is available from the [official website][9] and its [GitHub repository][10].
|
||||
|
||||
It should be available on app stores and official repositories as well.
|
||||
|
||||
Kodi v21 (codename: Omega) development is already underway. So, if you wanted more from this release, keep an eye on the next one.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/kodi-20-nexus-release/
|
||||
|
||||
作者:[Sourav Rudra][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/sourav/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://news.itsfoss.com/content/images/size/w2000/2023/01/kodi-nexus-20-release.png
|
||||
[2]: https://kodi.tv
|
||||
[3]: https://news.itsfoss.com/kodi-19-release/
|
||||
[4]: https://news.itsfoss.com/content/images/2023/01/Kodi_20_Nexus.jpg
|
||||
[5]: https://en.wikipedia.org/wiki/AV1
|
||||
[6]: https://en.wikipedia.org/wiki/Video_Acceleration_API
|
||||
[7]: https://kodi.wiki/view/PVR
|
||||
[8]: https://kodi.tv/article/kodi-20-0-nexus-release
|
||||
[9]: https://kodi.tv/download/
|
||||
[10]: https://github.com/xbmc/xbmc/releases/tag/20.0-Nexus
|
@ -0,0 +1,79 @@
|
||||
[#]: subject: "A ChatGPT GNOME Extension is in Development for Linux Users"
|
||||
[#]: via: "https://news.itsfoss.com/chatgpt-gnome-extension-development/"
|
||||
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "chai001125"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
A ChatGPT GNOME Extension is in Development for Linux Users
|
||||
======
|
||||
|
||||
AI-powered GNOME desktop? This extension can make things seem like it.
|
||||
|
||||
![A ChatGPT GNOME Extension is in Development for Linux Users][1]
|
||||
|
||||
[ChatGPT][2] is a popular chatbot that can interact with its users as if they are having a conversation.
|
||||
|
||||
Recently, ChatGPT has been in the news, sometimes for the wrong reasons.
|
||||
|
||||
You see, there are two sides to the ChatGPT saga. In fact, for any artificial intelligence implementation.
|
||||
|
||||
On one side, the potential of this tool has impressed many. But on the other side, it has led to quite a ruckus in the tech world for its abuse/misuse.
|
||||
|
||||
So much so it has led its creator, [OpenAI][3], to develop a tool to detect its use.
|
||||
|
||||
Combatting Academic Dishonesty: OpenAI to Help Detect ChatGPT TextWe’re living in the age of AI already. To not make that worse, the makers of ChatGPT have decided to help detect text generated by the tool.![][4]It's FOSS NewsSourav Rudra![][5]
|
||||
|
||||
Now, I spotted a Reddit thread where a developer mentioned something interesting.
|
||||
|
||||
A developer who goes by the user handle '[HorrorPills][6]' has started working on a **GNOME extension for ChatGPT**.
|
||||
|
||||
This sounds interesting; let's take a look.
|
||||
|
||||
### Work in Progress: Let's Keep an Eye!
|
||||
|
||||
![chatgpt gnome extension][7]
|
||||
|
||||
This is a GNOME desktop extension that adds ChatGPT to the system tray of your desktop.
|
||||
|
||||
In its current form, it is in a **very work-in-progress state**, with basic functionality and a few bugs here and there.
|
||||
|
||||
As [noted][8] by the developer:
|
||||
|
||||
You will need an **existing ChatGPT account** to use this extension and your keyboard to navigate around it because the mouse cursor implementation is quite buggy.
|
||||
|
||||
Moreover, **support for GNOME 43 is also quite patchy**, with a temporary fix being provided and added to the to-do list in the development of this extension.
|
||||
|
||||
If you like, you can **give this extension a try**. It's available via its [GitHub repo][9], with all the instructions and files required to run it.
|
||||
|
||||
The developer has also [said][10] that they will be making this available on the **GNOME extensions**[website][11] when the extension is more stable.
|
||||
|
||||
Furthermore, they have also [hinted][12] at a possible **KDE Plasma implementation** in the future.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/chatgpt-gnome-extension-development/
|
||||
|
||||
作者:[Sourav Rudra][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/sourav/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://news.itsfoss.com/content/images/size/w2000/2023/01/chatgpt-gnome-extension.png
|
||||
[2]: https://chat.openai.com
|
||||
[3]: https://openai.com
|
||||
[4]: https://news.itsfoss.com/content/images/size/w256h256/2022/08/android-chrome-192x192.png
|
||||
[5]: https://news.itsfoss.com/content/images/2023/01/openai-to-detect-chatgpt-text.png
|
||||
[6]: https://github.com/HorrorPills
|
||||
[7]: https://news.itsfoss.com/content/images/2023/01/ChatGPT_GNOME_Ext.jpg
|
||||
[8]: https://www.reddit.com/r/linux/comments/10ay23v/comment/j46yp15/
|
||||
[9]: https://github.com/HorrorPills/ChatGPT-Gnome-Desktop-Extension
|
||||
[10]: https://www.reddit.com/r/linux/comments/10avlgs/comment/j4al4cg/
|
||||
[11]: https://extensions.gnome.org
|
||||
[12]: https://www.reddit.com/r/linux/comments/10avlgs/comment/j48uofo/
|
@ -0,0 +1,179 @@
|
||||
[#]: subject: "KDE Plasma 5.27: Top New Features and Release Details"
|
||||
[#]: via: "https://www.debugpoint.com/kde-plasma-5-27/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
KDE Plasma 5.27: Top New Features and Release Details
|
||||
======
|
||||
|
||||
**The list of impressive features and enhancements of the KDE Plasma 5.27 desktop is arriving in February.**
|
||||
|
||||
In a way, KDE Plasma 5.27 is a milestone release.
|
||||
|
||||
Firstly, it is the final LTS release of the Plasma 5 version and the last instalment of the Plasma 5 series. Initial porting work has already started for Plasma 6 series, which would be based on Qt 6 version.
|
||||
|
||||
Release number-wise, it is the 29th version of the KDE Plasma desktop, followed by the [prior plasma 5.26 release][1].
|
||||
|
||||
Visible feature-wise, it’s of moderate size. However, the bug fixes, code refactoring, cleanup, and optimization are significant. Most are not visible on the deck, but you can feel the changes when using this fluid desktop.
|
||||
|
||||
Before I walk you through the key features, here’s the schedule.
|
||||
|
||||
- **Beta:** Jan 19, 2023
|
||||
- **KDE Plasma 5.27 Final release:** Feb 14, 2023
|
||||
|
||||
![KDE Plasma 5.27 dev edition][2]
|
||||
|
||||
### KDE Plasma 5.27: Best New Features
|
||||
|
||||
#### Plasma Workspace
|
||||
|
||||
A brand new app welcomes you to Plasma desktop from now on. It was a good idea to add this app to Plasma. It will give you some initial information about Plasma, setting up online accounts and so on.
|
||||
|
||||
![Plasma Welcome App][3]
|
||||
|
||||
The media controller applet introduces two new layouts in this release. A vertical layout showing album art, song title and artist name. And an icon-only display showing only album art. [MR 2176][4]
|
||||
|
||||
The icon size settings slide in the Appearance is moved under the preview with more descriptive text. Also, the window size is slightly larger to accommodate the overall items. [MR 2213][5]
|
||||
|
||||
![Changes in icon size slide][6]
|
||||
|
||||
KDE Plasma battery monitor will now show the charging, discharging, and fully charged status for non-power supply batteries such as a wireless mouse, and mobile phones when connected to the Plasma desktop. [MR 2210][7]
|
||||
|
||||
Also, the battery monitor stops showing 100% when the battery is fully charged. You can only see the power icon without any text. [MR 2306][8]
|
||||
|
||||
In another change, the battery monitor shows “Estimating…” text when the remaining time is 0. Also, the remaining time calculation is changed to give you accurate hours and minutes remaining to full charge.
|
||||
|
||||
The middle click features are now exposed in the applet UI when available. The features existed for some apps, but the discovery was difficult unless tried. [MR 2205][9]
|
||||
|
||||
![Exposing the middle click options][10]
|
||||
|
||||
In the upcoming Qt6, the GaussianBlur is not available. Hence it has been removed in this version, and FastBlur is now incorporated. This is part of the initial Qt6 porting of the future Plasma 6 release. [MR 2083][11]
|
||||
|
||||
The “do not disturb” applet now shows a clearer message for the duration. Earlier it used to show “Until today”, and it has been changed to “Automatically ends: Today at ….”. [MR 1412][12]
|
||||
|
||||
In KDE Plasma 5.27, you can directly drag the wallpaper from the image list to any other application which accepts images. For example, you can directly drag and drop an image from the wallpaper window to the Gwenview image viewer. This definitely eases up many workflows and should save hassles from going to the folder and opening them. However, the feature is not working in my test, so I can’t show you a demo. [MR 2284][13]
|
||||
|
||||
We all love Krunner, the most excellent launcher ever! In this release, Krunner now searches for the key in any part of the file name in the recent document list. It sorts the result from the best match, starting with the search key in the file name to the bottom. [MR 2273][14]
|
||||
|
||||
Also, when there is no match in any documents in your system, Krunner now prompts a web search with the search key. [MR 2311][15]
|
||||
|
||||
![Krunner is great][16]
|
||||
|
||||
The developers can now prioritise the applet notification by assigning a notification value of 256. Once it is a high priority, the notification becomes part of the top header instead of the menu. [MR 2245][17]
|
||||
|
||||
The Users settings page, fingerprint register, and authentication selection are much more visually attractive with an actual hand image. [MR 2347][18]
|
||||
|
||||
![New Visual cue for fingerprint][19]
|
||||
|
||||
The accessibility of KDE Plasma is now more robust because the Orca screenreader app can read the notifications. It includes the app name and the notification description. [MR 2295][20]
|
||||
|
||||
#### Wayland, Kwin and Plasma desktop
|
||||
|
||||
KDE Plasma 5.27 now supports **high-resolution scrolling** in Wayland, thanks to libinput 1.9 version changes. With this change, you should experience smooth scrolling performance in Chrome and Firefox browsers. I hope this makes it on par with the Windows experience. To this day, I still feel Windows scrolling in the popular browser is very smooth. [MR 3034][21]
|
||||
|
||||
Another Wayland fix in this release is the inclusion of the Wayland implementation of **idle notification protocol**. In the Wayland session, if you become idle, the data can now be consumed by various apps and modules to save power, change the status in messaging apps, etc. [MR 2959][22]
|
||||
|
||||
Wayland session in Plasma desktop also brings content type. This allows Kwin to tweak the display behaviour (direct scanout, variable refresh rate, etc.) based on the content displayed on the screen. So, you should get an optimized session based on whether you are watching a movie, playing games or casually browsing the web. [MR 2467][23]
|
||||
|
||||
KDE Plasma Wayland session now supports **fractional scaling** natively. The upstream Wayland change for this was [merged][24] a few months back in 2022. You should get native resolution options in Wayland sessions. [MR 2598][25]
|
||||
|
||||
If you are a multi-monitor user, you should be glad to know that the settings to manage multiple displays are now easily accessible via the system tray display configuration.
|
||||
|
||||
![Multiple display configuration is now available from system tray][26]
|
||||
|
||||
#### Discover
|
||||
|
||||
Discover now shows a proper message when you are offline that it cannot fetch software information from servers instead of showing a progress bar. [MR 383][27]
|
||||
|
||||
For the past few releases, Discover has been improved for Flatpak management. This release also gets some goodies for Flatpak apps. Firstly, the Flatpak application view now shows more permissions entries that an app needs. A new settings page lists all the installed Flatpak and its permissions. [MR 372][28]
|
||||
|
||||
![Flatpak Permission in Discover][29]
|
||||
|
||||
Secondly, Discover now waits a few moments before checking updates for Flatpak. While it waits, it shows the locally cached Flatpak data. [MR 421][30]
|
||||
|
||||
Thirdly, the Discover home is revamped. Honestly, it was due for a long time. Now it looks far better with the popular apps, editor’s choice and other categories. [MR 398][31]
|
||||
|
||||
![Discover homepage now revamped][32]
|
||||
|
||||
#### Additional updates
|
||||
|
||||
Other key change includes:
|
||||
|
||||
- Plasma 5.27 is based on KDE Framework 5.102 and Qt 5.15.2.
|
||||
- Transition animation when changing wallpaper.
|
||||
- The weather applet now shows weather info in overlay mode.
|
||||
- The location picker in the weather applet now gives you a possible list of locations.
|
||||
- The network applet now shows 5G connection label and icons when used.
|
||||
- And hopefully, a new wallpaper as always!
|
||||
|
||||
[_Detailed changelog_][33] _(5.26.5-5.26.90)_
|
||||
|
||||
### Download
|
||||
|
||||
The BETA of KDE Plasma 5.27 is now out. You can download the ISO file and torrent via the KDE Neon distribution from the below link. Remember, this is a testing copy, and there may be bugs. So use it with caution.
|
||||
|
||||
[Download KDE Neon (testing edition)][34]
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
Overall, the change list is enormous and impossible to cover in one article. It’s amazing to see so many changes pulled up in each release by the KDE team. The KDE Framework and app changes are not part of this article which is also significant.
|
||||
|
||||
The final release is planned on Feb 14, 2023.
|
||||
|
||||
Distro-wise, KDE Plasma 5.27 should be available in Fedora 38 and Ubuntu 23.04 Lunar Lobster within the March-April timeframe.
|
||||
|
||||
So, which one of the features do you choose as your favourite? Let me know in the comment box below.
|
||||
|
||||
Cheers.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/kde-plasma-5-27/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/kde-plasma-5-26/
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2023/01/KDE-Plasma-5.27-dev-edition.jpg
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2023/01/Plasma-Welcome-App.jpg
|
||||
[4]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2176
|
||||
[5]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2213
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2023/01/Changes-in-icon-size-slide2.jpg
|
||||
[7]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2210
|
||||
[8]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2306
|
||||
[9]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2205
|
||||
[10]: https://www.debugpoint.com/wp-content/uploads/2023/01/Exposing-the-middle-click-options.jpg
|
||||
[11]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2083
|
||||
[12]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1412
|
||||
[13]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2284
|
||||
[14]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2273
|
||||
[15]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2311
|
||||
[16]: https://www.debugpoint.com/wp-content/uploads/2023/01/Krunner-is-great.jpg
|
||||
[17]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2245
|
||||
[18]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2347
|
||||
[19]: https://www.debugpoint.com/wp-content/uploads/2023/01/New-Visual-cue-for-fingerprint.jpg
|
||||
[20]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2295
|
||||
[21]: https://invent.kde.org/plasma/kwin/-/merge_requests/3034
|
||||
[22]: https://invent.kde.org/plasma/kwin/-/merge_requests/2959
|
||||
[23]: https://invent.kde.org/plasma/kwin/-/merge_requests/2467
|
||||
[24]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/143
|
||||
[25]: https://invent.kde.org/plasma/kwin/-/merge_requests/2598
|
||||
[26]: https://www.debugpoint.com/wp-content/uploads/2023/01/Multiple-display-configuration-is-now-available-from-system-tray.jpg
|
||||
[27]: https://invent.kde.org/plasma/discover/-/merge_requests/383
|
||||
[28]: https://invent.kde.org/plasma/discover/-/merge_requests/372
|
||||
[29]: https://www.debugpoint.com/wp-content/uploads/2023/01/Flatpak-Permission-in-Discover.jpg
|
||||
[30]: https://invent.kde.org/plasma/discover/-/merge_requests/421
|
||||
[31]: https://invent.kde.org/plasma/discover/-/merge_requests/398
|
||||
[32]: https://www.debugpoint.com/wp-content/uploads/2023/01/Discover-homepage-now-revamped.jpg
|
||||
[33]: https://kde.org/announcements/changelogs/plasma/5/5.26.5-5.26.90/
|
||||
[34]: https://files.kde.org/neon/images/testing/current/
|
@ -0,0 +1,147 @@
|
||||
[#]: subject: "Making Content that Resonates: An Interview with 'The Linux Cast' Creator, Matthew Weber"
|
||||
[#]: via: "https://news.itsfoss.com/interview-matthew-weber/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Making Content that Resonates: An Interview with 'The Linux Cast' Creator, Matthew Weber
|
||||
======
|
||||
|
||||
A conversation with Matthew Weber, the mastermind behind 'The Linux Cast' YouTube channel.
|
||||
|
||||
![Making Content that Resonates: An Interview with 'The Linux Cast' Creator, Matthew Weber][1]
|
||||
|
||||
If you have been following us, you probably know that we promised to interact with interesting personalities in the Linux and open-source world.
|
||||
|
||||
Here, we have Matthew, a **content creator** known for his "[**The Linux Cast**][2]" YouTube channel.
|
||||
|
||||
He creates podcasts and YouTube videos related to Linux, covering news and other exciting stuff.
|
||||
|
||||
As a fellow content creator, **I find his content very insightful** 🤓
|
||||
|
||||
We asked him a couple of questions that **should help Linux users and content creators in the Linux/Open-Source space gain some insights** from someone with an excellent level of experience.
|
||||
|
||||
**Q. The Linux Cast is an informative YouTube channel that we all love. What inspired you to start it?**
|
||||
|
||||
![thelinuxcast youtube channel][3]
|
||||
|
||||
**A:** My friend Ricky and I have been podcasting along with our friend Vince since **2009**. In 2017 we decided that we were going to switch to Linux and start a podcast. Ricky works in IT and has way more Linux know-how than I did at the time, so we thought it’d be **fun to start a podcast and see how it went**. We didn’t stick with it, doing only a few episodes in seasons 2017 and 2018.
|
||||
|
||||
In about July or August 2020, bored because of the pandemic, I visited the anchor page for the podcast and found to my surprise, that people were listening to it, each of our old episodes has hundreds of listens.
|
||||
|
||||
So, I decided to start it back up again. I found a new co-host in Martin and carried on. In **September 2020**, I decided **I’d start making a few YouTube videos to go along with the podcast**. That’s why the YouTube Channel exists.
|
||||
|
||||
It was started to host the podcast, and I threw some really, really bad videos up to see if I could draw in listeners. And then it just kind of took off.
|
||||
|
||||
**Q. Apart from The Linux Cast, what else do you do Linux-wise?**
|
||||
|
||||
**A:** I’m beginning to **learn Python**, which has been fun. I also have started to **care more about privacy lately**, so I’ve been working on interesting FOSS-related ways of tackling that problem as well.
|
||||
|
||||
12 Simple Tools to Protect Your PrivacyQuick ways to enhance online privacy? Use these simple tools to take control of your data easily.![][4]It's FOSSAnkush Das![][5]
|
||||
|
||||
**Q. Do you have any other plans that you want to share with our readers for your channel/blog?**
|
||||
|
||||
![youtube illustration][6]
|
||||
|
||||
My main goal for the channel is just to keep getting better at making videos. It sounds kind of lame, but I do want to improve the production quality while retaining the style that I have. I can’t script a video to save my life, so I know that’s not in the cards, but I’d like to just improve at video making. I’d also like to live stream more. I’ve done that in the past, but as a New Year’s resolution, I’ve decided to start my Sunday night streams up again.
|
||||
|
||||
‘Don’t be Afraid to Contribute’: Mirko Brombin Talks about Vanilla OS and Other Future ProjectsA conversation with Mirko Brombin, founder of Vanilla OS and Bottles creator.![][7]It's FOSS NewsAnkush Das![][8]
|
||||
|
||||
**Q. I noticed that you love i3 window manager. For someone new to the concept, what tip would you give to get them started? And why do you think they should give it a try?**
|
||||
|
||||
**A:** Tiling window managers aren’t for everyone, butI think everyone should try one at least once (after all, how do you know you don’t like it unless you try?). If you, dear reader, **find yourself wanting to use the keyboard to navigate Linux, a tiling window manager is probably a good choice.**
|
||||
|
||||
Now as for why i3 itself is great, I like it because I’ve spent so much time in it and I have spent most of my time configuring it. That means I have all the keybindings and such just the way I like them and everything is properly customized just to my liking.It has taken ages to get here, but it’s a fun process. **i3wm is great because it’s not fussy like DWM or Xmonad (both are coded and configured in actual programming languages, which makes them harder to configure)**, and it’s not as odd as something like bspwm. It’s simple and has just enough features to make it good.
|
||||
|
||||
![][9]
|
||||
|
||||
As for a tip? Would it be rude to say **watch my videos on i3**? Probably. My best tip for anyone wanting to get into i3 (or any tiling window manager, really), is to **try it in a VM first**. Get it installed and start to customize. Don’t give up when you hit the first problem; push through and make it yours.
|
||||
|
||||
The best part about i3 and other window managers is that you can customize them in an infinite number of ways. Linux fans love to claim that Linux is all about customization, but **until you’ve used a window manager, you’ve never really experienced that freedom**.
|
||||
|
||||
**Q. For someone who switched from Arch to Fedora, what would you suggest for someone deciding between the two?**
|
||||
|
||||
![arch fedora illustration][10]
|
||||
|
||||
**A:****Try both. I preach this all the time**, but the distro I use should make no difference on the distro you choose. I have a hardware setup that is different than yours, and yours is different than someone else’s. That means that every distro is going to run differently on your hardware.
|
||||
|
||||
As for Arch VS. Fedora, the big difference comes down to package managers and versioning of software. **Arch will have slightly newer software than Fedora**, and it has the AUR. Fedora is a more traditional release-based distro, but it still has newer software than something like Debian.
|
||||
|
||||
Getting Started With FedoraCollection of useful tutorials for new Fedora users.![][11]It's FOSSAbhishek Prakash![][12]
|
||||
|
||||
So, choosing between them really comes down to answering two questions: **do you need the latest software and do you need the AUR? This is why I say try both** because you need to experience the AUR before you can decide if you like it or not.
|
||||
|
||||
But mostly, **Fedora is easier to use, and I think it’s slightly more stable than Arch**, which is why I've chosen it as my daily driver.
|
||||
|
||||
**Q. What are your thoughts on “the year of Linux desktop” for 2023?**
|
||||
|
||||
![year of linux desktop][13]
|
||||
|
||||
**A:** 2022 was the year of the Linux Desktop. Last year was the year when Linux made it, and it’s all because of the Steam Deck. Linux is never going to compete with Windows in tems of market share. But it arrived last year as a consumer product for the first time (unless you count Android, which I do not).
|
||||
|
||||
I think 2023 will just be a continuation of that. Slow and steady growth. That’s where it’s at. Anyone wanting an explosion of people using Linux on the Desktop is and always has been asking for disappointment.
|
||||
|
||||
**Q. With a blog, YouTube channel, podcast, and writing, how do you manage your time or remain productive?**
|
||||
|
||||
![the linux cast pc setup][14]
|
||||
|
||||
**A: Todo lists and a bullet journal**. I’ve found that if I keep a list of things I have to do, I will get them done. And I ensure that I spend plenty of time doing things for fun and spending time away from my computer. If all I do is work, I get burned out, so really, it’s all about **ensuring that there is a balance there**.
|
||||
|
||||
**Q. What do you do in your spare time?** **A:****Fanfiction and reading books** mostly. I read a ton. I also enjoy watching sports. I’m a **Philadelphia Eagles fan**, a fan of the Golden State Warriors, and I’m an alumnus of Michigan State University, so I cheer for them when it comes to college sports.
|
||||
|
||||
![book sports illustration][15]
|
||||
|
||||
I also spend a terrible amount of time on YouTube. I’m slowly getting this down to a reasonable amount of time, but in the past, I’d definitely spend more time there than I should.
|
||||
|
||||
**Q. How do you see the future as a Linux content creator?**
|
||||
|
||||
**A:** Change is inevitable, but predicting it is hard. I think **we’re going to see more Linux in the world, and that makes me happy as a Linux content creator**. Over the last two years, I’ve seen many people create their own Linux channels and I think that’s great. The more people cover Linux on YouTube and the web in general, the better.
|
||||
|
||||
Obviously, the big thing for all of us in the next year or so is the **continued transition to Wayland**. Most big DEs have gone to it now, which is great. Now it’s going to be the turn of the window manager. We’ll see how all that plays out.
|
||||
|
||||
I also think we’ll see **more and more immutable distros out there, like Silverblue and OpenSuse’s Micro**. That seems to be where Linux is heading, which should make things very interesting for everyone, content creator or not.
|
||||
|
||||
**Q. Is there a message you would like to give our readers who aim to work in the Linux/Open-Source space as a content creators?**
|
||||
|
||||
![message to readers illustration][16]
|
||||
|
||||
**A:** The hardest part is starting. **Don’t let dreams of being DistroTube, Chris Titus, or The Linux Experiment stop you from continuing once you start**. If you start making videos, those first few months or even years can be rough, especially if you look at those big guys and compare your subscriber count to theirs. It isn’t a competition.
|
||||
|
||||
The thing that I’ve learned if I’ve learned anything, is that **consistency in posting is the best thing you can do**. Post on a predictable schedule (I did every day for a long time, but two or three times a week will work too). The more you post, the better you’ll be (though don’t do more than one a day).
|
||||
|
||||
And finally, **don’t do it if you’re not having fun doing it**. Not many YouTubers can make this a full-time job, so if you’re doing it for the money, then you shouldn’t do it. Being able to be that successful is very much like winning the lottery; it probably isn’t going to happen. So do it for fun. Do it on a schedule that you can keep up long term and still keep it fun. **Make content that you enjoy**, because then others will enjoy it too. If you remember to keep it fun, the viewers will come.
|
||||
|
||||
> 💭 Share your thoughts on the interview and if you want us to talk to your favorite open-source/Linux creator, feel free to mention them in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/interview-matthew-weber/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://news.itsfoss.com/content/images/size/w2000/2023/01/interview-with-the-linux-cast.png
|
||||
[2]: https://www.youtube.com/@TheLinuxCast
|
||||
[3]: https://news.itsfoss.com/content/images/2023/01/thelinuxcast.jpg
|
||||
[4]: https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png
|
||||
[5]: https://itsfoss.com/content/images/wordpress/2022/02/privacy-tools-ft.jpg
|
||||
[6]: https://news.itsfoss.com/content/images/2023/01/youtube-illustration-1.png
|
||||
[7]: https://news.itsfoss.com/content/images/size/w256h256/2022/08/android-chrome-192x192.png
|
||||
[8]: https://news.itsfoss.com/content/images/2022/12/interview-with-mirko-brombin.png
|
||||
[9]: https://news.itsfoss.com/content/images/2023/01/linux-i3wm--1-.png
|
||||
[10]: https://news.itsfoss.com/content/images/2023/01/arch-fedora-illustration-1.png
|
||||
[11]: https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png
|
||||
[12]: https://itsfoss.com/content/images/2023/01/fedora-tutorials.png
|
||||
[13]: https://news.itsfoss.com/content/images/2023/01/year-of-linux-desktop-2023.png
|
||||
[14]: https://news.itsfoss.com/content/images/2023/01/linux-cast-setup.png
|
||||
[15]: https://news.itsfoss.com/content/images/2023/01/sports-book-hobby.png
|
||||
[16]: https://news.itsfoss.com/content/images/2023/01/message-to-readers.png
|
@ -1,213 +0,0 @@
|
||||
[#]: subject: "How to Analyse Sentiments Using Machine Learning"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/09/how-to-analyse-sentiments-using-machine-learning/"
|
||||
[#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "chai001125"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Analyse Sentiments Using Machine Learning
|
||||
======
|
||||
This article will help you understand the concept of sentiment analysis and learn how it is done. It uses different machine learning algorithms for sentiment analysis, and then compares them to decide which one is the best for the particular problem described here.
|
||||
|
||||
Sentiment analysis is a major area in the field of natural language processing. A sentiment is any opinion or feeling that we have about an event, a product, a situation or anything else. Sentiment analysis is the field of research in which human sentiments are automatically extracted from the text. This field started evolving in the early 90s.
|
||||
|
||||
This article will help you understand how machine learning (ML) can be used for sentiment analysis, and compare the different ML algorithms that can be used. It does not try to improve the performance of any of the algorithms or methods.
|
||||
|
||||
In today’s fast paced world, everything is online and everyone can post their views. A few negative online comments may hurt a company’s reputation and, thereby, its sales. Now that everything’s online, everyone can post their views and opinions. It becomes very important for companies to go through these to understand what their customers really want. But since there is so much data, it cannot be gone through manually. This is where sentiment analysis comes in.
|
||||
|
||||
Let us now start developing a model to do a basic sentiment analysis.
|
||||
|
||||
### Let’s start!
|
||||
|
||||
The first step is to select a data set. You can choose from any publicly available reviews or comments such as tweets or movie reviews. The two columns that should definitely be there in the data set are the label and the actual piece of text.
|
||||
|
||||
Figure 1 shows a small sample of how the data looks.
|
||||
|
||||
![Figure 1: Data sample][1]
|
||||
|
||||
Now we need to import the required libraries:
|
||||
|
||||
```
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
from nltk.stem.porter import PorterStemmer
|
||||
import re
|
||||
import string
|
||||
```
|
||||
|
||||
As you can see in the above code, we have imported NumPy and Pandas for processing the data. We will look at the other imported libraries when we use them.
|
||||
|
||||
Now that the data set is ready and the libraries are imported, we need to bring the former into our project. The Pandas library is used for this purpose. We bring the data set into the Pandas data frame using the following line of code:
|
||||
|
||||
```
|
||||
sentiment_dataframe = pd.read_csv(“/content/drive/MyDrive/Data/sentiments - sentiments.tsv”,sep = ‘\t’)
|
||||
```
|
||||
|
||||
Now that we have the data set in our project, let us manipulate it so that our algorithm can understand the features better. We begin by giving names to our columns in the data set. This is done by using the line of code given below:
|
||||
|
||||
```
|
||||
sentiment_dataframe.columns = [“label”,”body_text”]
|
||||
```
|
||||
|
||||
We then assign numerical labels to the classes — negative is replaced with 1 and positive is replaced with 0. Figure 2 shows how the data frame looks at this stage.
|
||||
|
||||
![Figure 2: Data frame with basic modifications][2]
|
||||
|
||||
The next step is the preprocessing of the data. This is a very important step as it helps us to convert string/text data into numerical data (machine learning algorithms can understand/process numerical data and not text). Also, the redundant and useless data needs to be removed as it may taint our training model. We remove the noisy data, missing values and other non-consistent data in this step.
|
||||
|
||||
We will add the features text length and punctuation count in the data frame specifically for this application. We will also do the stemming, i.e., we will convert all similar words (like ‘give’, ‘giving’, etc) into a single form. Once this is done, we divide the data set into two — X and Y — where X is the features and Y is the prediction class.
|
||||
|
||||
This is done using the following piece of code. Figure 3 shows the data frame after these steps are taken.
|
||||
|
||||
![Figure 3: Data frame after the division of the data set][3]
|
||||
|
||||
```
|
||||
def count_punct(text):
|
||||
count = sum([1 for char in text if char in string.punctuation])
|
||||
return round(count/(len(text) - text.count(“ “)),3)*100
|
||||
|
||||
tokenized_tweet = sentiment_dataframe[‘body_text’].apply(lambda x: x.split())
|
||||
stemmer = PorterStemmer()
|
||||
tokenized_tweet = tokenized_tweet.apply(lambda x: [stemmer.stem(i) for i in x])
|
||||
for i in range(len(tokenized_tweet)):
|
||||
tokenized_tweet[i] = ‘ ‘.join(tokenized_tweet[i])
|
||||
sentiment_dataframe[‘body_text’] = tokenized_tweet
|
||||
sentiment_dataframe[‘body_len’] = sentiment_dataframe[‘body_text’].apply(lambda x:len(x) - x.count(“ “))
|
||||
sentiment_dataframe[‘punct%’] = sentiment_dataframe[‘body_text’].apply(lambda x:count_punct(x))
|
||||
X = sentiment_dataframe[‘body_text’]
|
||||
y = sentiment_dataframe[‘label’]
|
||||
```
|
||||
|
||||
We now need to convert the string into numerical data. We use a count vectorizer for this purpose; that is, we get the counts of each word and convert it into a vector.
|
||||
|
||||
After this, features such as length of text and punctuation count in the dataframe, i.e., X, are calculated. A sample of X is shown in Figure 4.
|
||||
|
||||
![Figure 4: Sample of final features][4]
|
||||
|
||||
Now the data is ready for training. The next step is to determine which algorithms we are going to use for training our model. As has been mentioned before, we are going to try several algorithms and determine the best one for sentiment analysis. Since we are basically trying to do binary classification, the following algorithms can be used:
|
||||
|
||||
* K-nearest neighbors (KNN)
|
||||
* Logistic regression
|
||||
* Support vector machines (SVMs)
|
||||
* Stochastic gradient descent
|
||||
* Naive Bayes
|
||||
* Decision tree
|
||||
* Random Forest
|
||||
|
||||
We first need to split our data set into testing and training data. This is done by using the sklearn library using the following code:
|
||||
|
||||
```
|
||||
from sklearn.model_selection import train_test_split
|
||||
X_train, X_test, y_train, y_test = train_test_split(X,y, test_size = 0.20, random_state = 99)
|
||||
```
|
||||
|
||||
We will use 20 per cent of the data for testing and 80 per cent for the training part. We will separate the data because we want to test on a new set of data whether our model is working properly or not.
|
||||
|
||||
Now let us start with the first model. We will try the KNN algorithm first, and use the sklearn library for this. We will first train the model and then assess its performance (all of this can be done using the sklearn library in Python itself). The following piece of code does this, and we get an accuracy of around 50 per cent.
|
||||
|
||||
```
|
||||
from sklearn.neighbors import KNeighborsClassifier
|
||||
model = KNeighborsClassifier (n_neighbors=3)
|
||||
model.fit(X_train, y_train)
|
||||
model.score (X_test,y_test)
|
||||
|
||||
0.5056689342403629
|
||||
```
|
||||
|
||||
The code is similar in the logistic regression model — we first import the function from the library, fit the model, and then test it. The following piece of code uses the logistic regression algorithm. The output shows we got an accuracy of around 66 per cent.
|
||||
|
||||
```
|
||||
from sklearn.linear_model import LogisticRegression
|
||||
model = LogisticRegression()
|
||||
model.fit (X_train,y_train)
|
||||
model.score (X_test,y_test)
|
||||
|
||||
0.6621315192743764
|
||||
```
|
||||
|
||||
The following piece of code uses SVM. The output shows we got an accuracy of around 67 per cent.
|
||||
|
||||
```
|
||||
from sklearn import svm
|
||||
model = svm.SVC(kernel=’linear’)
|
||||
model.fit(X_train, y_train)
|
||||
model.score(X_test,y_test)
|
||||
|
||||
0.6780045351473923
|
||||
```
|
||||
|
||||
The following piece of code uses the Random Forest algorithm, and we get an accuracy of around 69 per cent.
|
||||
|
||||
```
|
||||
from sklearn.ensemble import RandomForestClassifier
|
||||
model = RandomForestClassifier()
|
||||
model.fit(X_train, y_train)
|
||||
model.score(X_test,y_test)
|
||||
|
||||
0.6938775510204082
|
||||
```
|
||||
|
||||
Next we use the Decision tree algorithm, which gives an accuracy of around 61 per cent.
|
||||
|
||||
```
|
||||
from sklearn.tree import DecisionTreeClassifier
|
||||
model = DecisionTreeClassifier()
|
||||
model = model.fit(X_train,y_train)
|
||||
model.score(X_test,y_test)
|
||||
|
||||
0.6190476190476191
|
||||
```
|
||||
|
||||
The following piece of code uses the stochastic gradient descent algorithm. The output shows that we got an accuracy of around 49 per cent.
|
||||
|
||||
```
|
||||
from sklearn.linear_model import SGDClassifier
|
||||
model = SGDClassifier()
|
||||
model = model.fit(X_train,y_train)
|
||||
model.score(X_test,y_test)
|
||||
|
||||
0.49206349206349204
|
||||
```
|
||||
|
||||
The following piece of code uses Naive Bayes. We get an accuracy of around 60 per cent.
|
||||
|
||||
```
|
||||
from sklearn.naive_bayes import GaussianNB
|
||||
model = GaussianNB()
|
||||
model.fit(X_train, y_train)
|
||||
model.score(X_test,y_test)
|
||||
|
||||
0.6009070294784581
|
||||
```
|
||||
|
||||
Now that we have checked out all the algorithms, let us graph their accuracy performance. The graph is shown in Figure 5.
|
||||
|
||||
![Figure 5: Accuracy performance of the different algorithms][5]
|
||||
|
||||
As you can see, the random forest algorithm gave the best accuracy for this problem and we can conclude that it is the best fit for sentiment analysis amongst ML algorithms. We can improve the accuracy much more by getting better features, trying out other vectorising techniques, and using a better data set or newer classification algorithms.
|
||||
|
||||
Now that random forest is seen as the best algorithm for this problem, I am going to show you a sample prediction. In Figure 6, you can see that the right predictions are being made! Do try this out to improve upon this project!
|
||||
|
||||
![Figure 6: Sample predictions made][6]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/09/how-to-analyse-sentiments-using-machine-learning/
|
||||
|
||||
作者:[Jishnu Saurav Mittapalli][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-1-Data-sample.jpg
|
||||
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-2-Data-frame-with-basic-modifications-3.jpg
|
||||
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-3-Data-frame-after-the-division-of-the-data-set.jpg
|
||||
[4]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-4-Sample-of-final-features.jpg
|
||||
[5]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-5-Accuracy-performance-of-the-different-algorithms.jpg
|
||||
[6]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-6-Sample-predictions-made.jpg
|
@ -1,115 +0,0 @@
|
||||
[#]: subject: "Give your Terminal a Retro Look Using this Neat Application"
|
||||
[#]: via: "https://www.debugpoint.com/cool-retro-terminal/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Give your Terminal a Retro Look Using this Neat Application
|
||||
======
|
||||
|
||||
**Want to give your Terminal a retro look? This guide contains instructions to help you to install Cool Retro Terminal application in all Linux distributions.**
|
||||
|
||||
![Cool Retro Terminal][1]
|
||||
|
||||
Cool Retro Terminal
|
||||
|
||||
Have you ever wondered how you can mimic the look of those old CRT monitors displayed in your Linux terminal?
|
||||
|
||||
Those CRT screens have their own fan base. Like the Apple 2 or the IBM 3278 terminals – they are really cool looking if you compare them to today’s 4K monitor displays. I am not saying 4K is bad, but sometimes legacy displays remind us of those bygone days. Enough of these ramblings. Let’s get started installing the app.
|
||||
|
||||
### Cool Retro Term
|
||||
|
||||
The application is free and open-sourced. And it is called [cool-retro-term][2]. It is lightweight and has many customization options with pre-set profiles, such as Apple 2, etc. It also gives you those static noises and scan-lines effects in your terminal. Cool, isn’t it?
|
||||
|
||||
It is built in Qt and requires Qt 5.2 and higher. If you are using the latest Linux distributions, you should be good in terms of dependencies.
|
||||
|
||||
![Green Scanlines Theme][3]
|
||||
|
||||
Green Scanlines Theme
|
||||
|
||||
### How to Download and Install Cool Retro Terminal
|
||||
|
||||
#### Ubuntu, Linux Mint and other Debian-based distributions
|
||||
|
||||
The following simple command will install this application in your Ubuntu and other related distributions.
|
||||
|
||||
```
|
||||
sudo apt install cool-retro-term
|
||||
```
|
||||
|
||||
#### Arch Linux
|
||||
|
||||
This package is available in Arch User Repository AUR. If you do not have AUR enabled, enable it using [this guide][4] and then use the following commands to install it.
|
||||
|
||||
```
|
||||
pacman -S cool-retro-term
|
||||
```
|
||||
|
||||
#### Fedora, RHEL and other related distributions
|
||||
|
||||
For Fedora and other related Linux, use the following command to install this app.
|
||||
|
||||
```
|
||||
sudo dnf install cool-retro-term
|
||||
```
|
||||
|
||||
#### Appimage
|
||||
|
||||
A self-contained executable as AppImage is also available, which you can just download and run. No installation is required. Follow the below commands to do that.
|
||||
|
||||
```
|
||||
wget https://github.com/Swordfish90/cool-retro-term/releases/download/1.1.1/Cool-Retro-Term-1.1.1-x86_64.AppImage
|
||||
chmod a+x Cool-Retro-Term-1.1.1-x86_64.AppImage
|
||||
./Cool-Retro-Term-1.1.1-x86_64.AppImage
|
||||
```
|
||||
|
||||
Note: Version 1.2.0 onwards there are no AppImage build in the GitHub.
|
||||
|
||||
### Configurations
|
||||
|
||||
After the installation is finished, you can find the terminal application “Cool Retro Term” in the application menu. So, launch the application and enjoy.
|
||||
|
||||
Remember, this is not overriding your default console/terminal application in your Linux distributions. It is a stand-alone console application.
|
||||
|
||||
The configuration options are available via the Right Click context menu.
|
||||
|
||||
The context menu gives you the following pre-sets. You can then configure each of them for colour, and appearance settings via the settings window. For example, if you want more transparency, contrast or more noise, ambient light or flickering – all of them can be configured from the below settings window via several options.
|
||||
|
||||
And easily you can make your own theme.
|
||||
|
||||
![Pre-loaded Themes in Cool Retro Term][5]
|
||||
|
||||
Pre-loaded Themes in Cool Retro Term
|
||||
|
||||
![Various Effects in Settings][6]
|
||||
|
||||
Various Effects in Settings
|
||||
|
||||
### Summary
|
||||
|
||||
Cool Retro Terminal is an old tube-style terminal for Linux desktops that allows you to experience it as if you are sitting in front of a retro terminal. You may or may not like it, and one hardly uses it for a daily driver. But still, a nice-looking terminal to experience from time to time to get away from the mundane terminal.
|
||||
|
||||
Do you like the retro look? What is your favourite theme? Let me know in the comment section below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/cool-retro-terminal/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2021/12/cool-retro-terminal-1024x576.jpg
|
||||
[2]: https://github.com/Swordfish90/cool-retro-term
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2021/12/Green-Scanlines-Theme-1024x594.jpg
|
||||
[4]: https://www.debugpoint.com/2021/01/install-yay-arch/
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2021/12/Pre-loaded-Themes-in-Cool-Retro-Term-1024x599.jpg
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2021/12/Various-Effects-in-Settings.jpg
|
@ -1,93 +0,0 @@
|
||||
[#]: subject: "Discover the power of the Linux SpaceFM file manager"
|
||||
[#]: via: "https://opensource.com/article/22/12/linux-file-manager-spacefm"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Discover the power of the Linux SpaceFM file manager
|
||||
======
|
||||
|
||||
SpaceFM is a tabbed file manager for Linux using the GTK toolkit, so it fits right in on desktops like [GNOME][1], [Mate][2], [Cinnamon][3], and others. SpaceFM also features a built-in device manager system, so it's particularly good for window managers, like [Fluxbox][4] or [fvwm][5], which typically don't include a graphical device manager. If you're happy with the file managers on Linux, but you want to try one that's a little bit different in design, SpaceFM is worth a look.
|
||||
|
||||
### Install SpaceFM
|
||||
|
||||
On Linux, you're likely to find **SpaceFM** in your distribution's software repository. On Fedora, Mageia, OpenMandriva, and similar:
|
||||
|
||||
```
|
||||
$ sudo dnf install spacefm
|
||||
```
|
||||
|
||||
On Debian and Debian-based systems:
|
||||
|
||||
```
|
||||
$ sudo apt install spacefm
|
||||
```
|
||||
|
||||
### Panels
|
||||
|
||||
I don't know why SpaceFM is called SpaceFM, but it could be because it makes a concerted effort to let you use every bit of space in its window for something useful. By default, SpaceFM is actually pretty simple, standard-issue file manager. It has a single panel listing your files, a toolbar, and a menu bar.
|
||||
|
||||
![SpaceFM is typical in design. At first.][6]
|
||||
|
||||
All the "usual" rules apply.
|
||||
|
||||
- **Double-click** to open a directory or to open a file in its default application.
|
||||
- **Right-click** for a contextual menu providing lots of standard options (copy, paste, rename, view properties, create a new folder, and so on).
|
||||
|
||||
The way SpaceFM sets itself apart, though, is its panel system. SpaceFM displays one panel by default. That's the big file window listing your files. But it can have up to four panel views, plus a few bonus panels for some specific tasks.
|
||||
|
||||
### Opening a new panel
|
||||
|
||||
Instead of seeing one directory in your file manager, you can see two. To bring up another directory in its own pane, press **Ctrl+2** or go to the **View** menu and select **Panel 2**. Alternatively, click the second green dot icon from the left in the menu panel.
|
||||
|
||||
With two panels, you can move files from one directory to another without opening a new file manager window, or you can browse two directories to compare their contents.
|
||||
|
||||
But why settle for two panels? Maybe you'd rather see _three_ directories at once. To bring up a third directory in a dedicated pane, press **Ctrl+3** or go to the **View** menu and select **Panel 3**. Alternatively, click the third green dot icon from the left in the menu panel. This panel appears at the bottom of the SpaceFM window.
|
||||
|
||||
With three panels open, you can move files between several directories, or sort files from a common "dumping ground" (like your Desktop or Downloads folder) into specific directories.
|
||||
|
||||
Of course, once you've tried three panels you'll probably find yourself itching for a fourth. To open a fourth directory in its own pane, press **Ctrl+4** or go to the **View** menu and select **Panel 4**. Alternatively, click the fourth green dot icon from the left in the menu panel. This one opens next to Panel 3, splitting your SpaceFM window into even quarters.
|
||||
|
||||
![SpaceFM can have up to four panels.][7]
|
||||
|
||||
What about a _fifth_ panel? Well, actually SpaceFM stops at four panels. If you really do want a fifth panel, you have to open a new SpaceFM window. However, there are still more panels, used for information other than file listings, to explore.
|
||||
|
||||
### Special panels
|
||||
|
||||
The **View** menu reveals that in addition to file panels, there are additionally task-specific panels you can choose to display. This includes:
|
||||
|
||||
- **Task manager**: Lists ongoing file manager processes. This isn't a general-purpose task manager, so to set nice values or detect a zombie apocalypse of undead PIDs, [htop or top][8] is still your utility of choice.
|
||||
- **Bookmarks**: Links to common folders, such as Desktop, Documents, Downloads, and any location you want to keep handy.
|
||||
- **Devices**: USB thumb drives and remote file systems.
|
||||
- **File tree**: A view of your file system in order of directory inheritance.
|
||||
|
||||
These panels open on the left side of SpaceFM, but they do stack. You can have bookmarks, devices, tasks, and a file tree open at once, although it helps to have a very tall SpaceFM window.
|
||||
|
||||
### Make space for SpaceFM
|
||||
|
||||
SpaceFM is a configurable multi-tasking file manager. It maximizes the information you can build into a single window, and it lets you decide what's important, and when. This article has focused on the panels of SpaceFM because those are, at least in my view, the most unique aspect of the application. However, there's a lot more to SpaceFM, including plugins, preferences, a design mode, keyboard shortcuts, and customization. This isn't a small application, even though it is a lightweight one. Spend some time with SpaceFM, because you never know what you'll discover.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/12/linux-file-manager-spacefm
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/article/19/12/gnome-linux-desktop
|
||||
[2]: https://opensource.com/article/19/12/mate-linux-desktop
|
||||
[3]: https://opensource.com/article/19/12/cinnamon-linux-desktop
|
||||
[4]: https://opensource.com/article/19/12/fluxbox-linux-desktop
|
||||
[5]: https://opensource.com/article/19/12/fvwm-linux-desktop
|
||||
[6]: https://opensource.com/sites/default/files/2022-10/spacefm.webp
|
||||
[7]: https://opensource.com/sites/default/files/2022-10/spacefm-panels.webp
|
||||
[8]: https://opensource.com/life/16/2/open-source-tools-system-monitoring
|
@ -2,7 +2,7 @@
|
||||
[#]: via: "https://www.debugpoint.com/fedora-media-writer/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
@ -1,98 +0,0 @@
|
||||
[#]: subject: "Document with BookStack, an open source Confluence alternative"
|
||||
[#]: via: "https://opensource.com/article/23/1/bookstack-open-source-documentation"
|
||||
[#]: author: "Dan Brown https://opensource.com/users/ssddanbrown"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Document with BookStack, an open source Confluence alternative
|
||||
======
|
||||
|
||||
BookStack is an open source, web-based documentation system, that allows you to create a structured knowledge store for personal, team, or company use. BookStack focuses on ease-of-use and design to provide an experience suitable for an audience with, potentially, mixed skills in technology. It's built upon the PHP framework Laravel, with MySQL or MariaDB used as a datastore.
|
||||
|
||||
I built BookStack after attempting to find a documentation or wiki system for my workplace. [Confluence][1] was the closest option to suit my requirements but the user-based pricing introduced a barrier. The closed nature of Confluence also raised questions to the longevity of the documentation I'd be building. In the end, I decided to build my own platform to suit my needs. I released it under the MIT license to give back to the open source community that I'd come to love and benefit from over the years.
|
||||
|
||||
### Content hierarchy and organization options
|
||||
|
||||
To keep things familiar and intuitive, BookStack makes use of real-world book terms to describe its organization structure. Documentation content is created as a "Page":
|
||||
|
||||
- Pages belong to a specific "Book".
|
||||
- Within a Book, Pages can optionally be grouped up into "Chapters".
|
||||
- As your documentation grows, you can then use "Shelves" to categorize Books, with Books being able to be part of multiple shelves if needed.
|
||||
|
||||
This structure sits at the heart of BookStack, and can often be the love-it-or-hate-it deciding aspect of whether BookStack is suitable for your use case.
|
||||
|
||||
Upon this core hierarchy, BookStack also provides tagging, user favorites, and advanced search capabilities to ensure content remains discoverable.
|
||||
|
||||
### Writing documentation
|
||||
|
||||
The primary method of writing documentation in BookStack is through the use of its what-you-see-is-what-you-get (WYSIWYG) editor, which makes use of the open source [Tiny][2] project. This editor provides a range of content formats including:
|
||||
|
||||
- Various header levels
|
||||
- Code blocks
|
||||
- Collapsible blocks
|
||||
- Tables
|
||||
- Images
|
||||
- Links
|
||||
- iFrame embeds
|
||||
- Alert callouts
|
||||
- Bullet, numbered and tasks lists
|
||||
- Drawings (through intregration with the open source [diagrams.net][3])
|
||||
|
||||
If you prefer [Markdown][4], you can use the built-in Markdown editor, which provides a live preview and supports the same feature set as the WYSIWYG editor. If permission allows, you can even jump between these editor options depending on the page you're editing.
|
||||
|
||||
### How your data is stored
|
||||
|
||||
Documentation is stored within a [MySQL or MariaDB][5] database in a relatively simple HTML format, in addition to the original Markdown content if Markdown was used. A lot of design and development decisions have been made to keep this HTML format simplistic. It uses plain standard HTML elements where possible, to ensure raw documentation content remains open and portable.
|
||||
|
||||
Uploaded images, attachments, and created drawings are saved on the local filesystem but can optionally be stored in an s3-compatible datastore like the open source [MinIO][6].
|
||||
|
||||
To keep your content accessible, there are built-in options to export content as PDF, HTML, plain text, or Markdown. For external consumption, there's a HTTP REST API and a webhook system. In terms of extension, a "logical theme system" allows running of custom PHP code upon a wide range of system events.
|
||||
|
||||
### Ready for business
|
||||
|
||||
BookStack comes with a range of features to support business environments. Support for a range of authentication options are built-in, including SAML2, OpenID Connect, and LDAP allowing easy single-sign-on usage with platforms such as [KeyCloak][7]. MFA options are available and can be mandated based upon role. An audit log provides full visibility of modification activities across an instance.
|
||||
|
||||
A full role-based permission system provides administrators full control over create, view, update, and delete actions of system content. This allows per-role system defaults, with options to set custom permissions on a per-hierarchy item basis.
|
||||
|
||||
### A community of support
|
||||
|
||||
After being active for over 7 years, the community for BookStack has grown with various avenues for discussion and support. We now have:
|
||||
|
||||
- [Our documentation site][8]
|
||||
- [Video guides on YouTube][9]
|
||||
- [A subreddit][10]
|
||||
- [An active GitHub issues list][11]
|
||||
- [Paid-for business support][12]
|
||||
|
||||
If you want to play with BookStack, you can try it out [on our demo site][13]. To learn how to set up your own instance, visit the [installation page of our documentation][14].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/23/1/bookstack-open-source-documentation
|
||||
|
||||
作者:[Dan Brown][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/ssddanbrown
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/article/20/9/open-source-alternatives-confluence
|
||||
[2]: https://github.com/tinymce/
|
||||
[3]: https://www.diagrams.net/
|
||||
[4]: https://opensource.com/article/19/9/introduction-markdown
|
||||
[5]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet
|
||||
[6]: https://github.com/minio/
|
||||
[7]: https://www.keycloak.org/
|
||||
[8]: https://www.bookstackapp.com/docs/
|
||||
[9]: https://www.youtube.com/c/BookStackApp
|
||||
[10]: https://www.reddit.com/r/bookstack
|
||||
[11]: https://github.com/BookStackApp/BookStack/issues
|
||||
[12]: https://www.bookstackapp.com/support
|
||||
[13]: https://demo.bookstackapp.com/books/bookstack-demo-site/page/logging-in-to-the-demo-site
|
||||
[14]: https://www.bookstackapp.com/docs/admin/installation/
|
@ -0,0 +1,119 @@
|
||||
[#]: subject: "Share Folder Between Guest and Host in GNOME Boxes"
|
||||
[#]: via: "https://www.debugpoint.com/share-folder-gnome-boxes/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Share Folder Between Guest and Host in GNOME Boxes
|
||||
======
|
||||
|
||||
**Use the below steps to share a folder between host and guest in GNOME Boxes app.**
|
||||
|
||||
GNOME Boxes is a front-end application to create and manage virtual machines. It is primarily compatible with the GNOME desktop. However, you can use it in other desktop environments, such as KDE Plasma and others.
|
||||
|
||||
At the backend, it uses QEMU, KVM, and libvirt tech and provides an easy-to-use user interface to manage multiple virtual machines.
|
||||
|
||||
If you want to learn more, you can also refer to [these guides][1] on GNOME Boxes to create virtual machines.
|
||||
|
||||
In the prior articles, we have explained how to share folders in [virt-manager][2] and [VirtualBox][3]. And the following steps explain the same for GNOME Boxes.
|
||||
|
||||
### How to share folder and file in GNOME Boxes
|
||||
|
||||
GNOME Boxes primarily support [SPICE protocol][4] to enable remote access, sharing and many virtualization features. SPICE is one of the oldest open-source packages in the virtualization space.
|
||||
|
||||
#### 1. Initial setup
|
||||
|
||||
- Firstly, make sure to install the following spice packages inthe **guest system**.
|
||||
|
||||
```
|
||||
sudo apt install spice-vdagent spice-webdavd #for Ubuntu-based distros
|
||||
sudo dnf install spice-vdagent spice-webdavd #Fedora, RHEL, etc
|
||||
pacman -S --needed spice spice-gtk spice-protocol spice-vdagent #Arch Linux (optional)
|
||||
```
|
||||
|
||||
- After you install the above, **reboot** the host and guest systems.
|
||||
- In the host system (for GNOME desktop), open settings and go to Sharing panel.
|
||||
- **Enable Sharing** using the top toggle button.
|
||||
- Then, click on File Sharing and **Enable File Sharing**. Make sure to enable the network. The password is optional. If you want to enable password-based authentication for your shared folder, enable it.
|
||||
|
||||
![Enable sharing in settings][5]
|
||||
|
||||
![Enable File Sharing][6]
|
||||
|
||||
- Close the settings window.
|
||||
- Open GNOME Boxes. Right-click on the VM and select **preferences**.
|
||||
- Click on **Devices and Shares** on the preference window and click on the **[+] button** under Shared folders.
|
||||
- Under **Local Folder**: Select the folder from your host you want to access inside the guest.
|
||||
- **Name**: Give any name you want. This name will be visible in the guest’s file manager.
|
||||
- Click Save.
|
||||
|
||||
![Add a share folder in host][7]
|
||||
|
||||
#### 2. Setup for guest
|
||||
|
||||
- Start your guest virtual machine.
|
||||
- Inside the guest virtual machine, open the file manager. If you are using a GNOME desktop, open Nautilus (i.e. Files).
|
||||
- Click on **Other Locations**. you should see the “**Spice client folder**” under Networks.
|
||||
- Double-click on this, and you should see the folder contents of your host system.
|
||||
- Sometimes, the above folder takes some time to appear. if it is not visible, wait for 1 or 2 minutes. Refresh the file manager window via `F5`.
|
||||
|
||||
![Spice client folder in guest][8]
|
||||
|
||||
#### 3. Some troubleshooting
|
||||
|
||||
- Furthermore, if you are getting the following error, then you need to access the path manually.
|
||||
|
||||
```
|
||||
Unable to access location - HTTP Error: Could not connect: Connection refused
|
||||
```
|
||||
|
||||
![error while accessing the spice client folder][9]
|
||||
|
||||
- Press `CTRL+L` in the file manager to bring up the address bar. In the address bar, type the following:
|
||||
|
||||
```
|
||||
dav://localhost:9843
|
||||
```
|
||||
|
||||
- And hit enter. And you should see the folder contents. The `dav` protocol is used by the SPICE server, which connects the guest and host at port 9843.
|
||||
|
||||
![accessing via dav protocol][10]
|
||||
|
||||
And that’s it. Now you can enjoy file sharing between guests and hosts in GNOME Boxes.
|
||||
|
||||
Here’s a screenshot of the same folder accessed by the guest and host.
|
||||
|
||||
![Share folder and its contents between guest and host in GNOME Boxes (sample)][11]
|
||||
|
||||
If you run into any error, drop a comment below.
|
||||
|
||||
[_Some references are used in this article from GitLab._][12]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/share-folder-gnome-boxes/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/tag/boxes
|
||||
[2]: https://www.debugpoint.com/share-folder-virt-manager/
|
||||
[3]: https://www.debugpoint.com/share-folder-between-host-guest-virtualbox/
|
||||
[4]: https://www.spice-space.org/index.html
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2023/01/Enable-sharing-in-settings.jpg
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2023/01/Enable-File-Sharing.jpg
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2023/01/Add-a-share-folder-in-host.jpg
|
||||
[8]: https://www.debugpoint.com/wp-content/uploads/2023/01/Spice-client-folder-in-guest.jpg
|
||||
[9]: https://www.debugpoint.com/wp-content/uploads/2023/01/error-while-accessing-the-spice-client-folder.jpg
|
||||
[10]: https://www.debugpoint.com/wp-content/uploads/2023/01/accessing-via-dav-protocol.jpg
|
||||
[11]: https://www.debugpoint.com/wp-content/uploads/2023/01/Share-folder-and-its-contents-between-guest-and-host-in-GNOME-Boxes-sample.jpg
|
||||
[12]: https://gitlab.gnome.org/GNOME/gnome-boxes/-/issues/430
|
@ -0,0 +1,106 @@
|
||||
[#]: subject: "Meet ecode: An Upcoming Modern, Lightweight Code Editor With a Brand New GUI Framework"
|
||||
[#]: via: "https://news.itsfoss.com/ecode-editor/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Meet ecode: An Upcoming Modern, Lightweight Code Editor With a Brand New GUI Framework
|
||||
======
|
||||
|
||||
A new exciting code editor is in the works, built on its own GUI framework.
|
||||
|
||||
![Meet ecode: An Upcoming Modern, Lightweight Code Editor With a Brand New GUI Framework][1]
|
||||
|
||||
If you look around for open-source code editors, a couple of promising new projects may challenge the likes of Visual Studio Code.
|
||||
|
||||
Sure, that may not happen anytime soon. **But it does not hurt to be optimistic about supporting new projects.**
|
||||
|
||||
We recently covered some of those options here:
|
||||
|
||||
Now, I have stumbled upon another editor, "**ecode**". The project's author mentions that it takes inspiration from editors like [Lite XL][2].
|
||||
|
||||
**What's different?**
|
||||
|
||||
- It is built on top of its **new GUI framework [eepp][3]** which focuses on providing a rich user interface.
|
||||
- While it aims to use minimal resources, ecode's philosophy targets **modern hardware** with systems that have SSDs, high cores count, and decent GPU acceleration.
|
||||
- The code editor can be compiled to run in any modern browser. However, the current focus is not on the development of the web version.
|
||||
|
||||
![ecode official screenshot][4]
|
||||
|
||||
That sounds good. So, let us take a look.
|
||||
|
||||
> 🚧 The project is under heavy development. You should not rely on the tool for everyday tasks.
|
||||
|
||||
### Features of ecode
|
||||
|
||||
![ecode][7]
|
||||
|
||||
[ecode][8] is a capable editor with all the essentials loaded from the start.
|
||||
|
||||
Sure, it has plans to add more stuff as the development progresses. As it stands, here are some of the key highlights:
|
||||
|
||||
- **Portable**
|
||||
- **Syntax highlighting**
|
||||
- **Terminal support**
|
||||
- **Auto-completion**
|
||||
- **Customizable color schemes**
|
||||
- **Customizable keyboard bindings**
|
||||
- **LSP Support**
|
||||
- **Minimap**
|
||||
- **Plugin manager**
|
||||
- **Dark and light mode**
|
||||
- **Various types of split views to adapt to different workflows**
|
||||
|
||||
I tried the editor briefly on Linux Mint, and it sure looks like a work in progress.
|
||||
|
||||
But, even in its early stages, it supports the essentials to support a wide range of languages and syntax highlights accordingly.
|
||||
|
||||
![ecode options][9]
|
||||
|
||||
You can customize the editor's theme quickly from a set of pre-defined themes.
|
||||
|
||||
The minimap will be handy for users who write a lot of code (lengthy snippets) and need to navigate it quickly.
|
||||
|
||||
The app crashed for me initially as I performed a right-click in a blank area. But, it was quickly fixed with the next version update, **0.4.1** (at the time of publishing this). So, I would say the **development progress seems promising**.
|
||||
|
||||
![][10]
|
||||
|
||||
### Download ecode
|
||||
|
||||
You can try the [live demo][13] available to test-drive some options quickly.
|
||||
|
||||
An AppImage file is available for all Linux distributions. Packages for macOS and Windows are also available.
|
||||
|
||||
You can get these packages from its [GitHub releases section][14] or explore its [source code][3].
|
||||
|
||||
[Download ecode][14]
|
||||
|
||||
💬 With so many promising new code editors in development, do you think we'll have a good competition to Microsoft's VS Code?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/ecode-editor/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://news.itsfoss.com/content/images/size/w2000/2023/01/ecode-first-look.png
|
||||
[2]: https://itsfoss.com/lite-xl/
|
||||
[3]: https://github.com/SpartanJ/eepp/
|
||||
[4]: https://news.itsfoss.com/content/images/2023/01/ecode-official.jpg
|
||||
[5]: https://www.pjtra.com/apple-touch-icon.png
|
||||
[7]: https://news.itsfoss.com/content/images/2023/01/ecode.png
|
||||
[8]: https://github.com/SpartanJ/ecode
|
||||
[9]: https://news.itsfoss.com/content/images/2023/01/ecode-options.png
|
||||
[10]: https://news.itsfoss.com/content/images/2023/01/ecode-plugins.png
|
||||
[13]: https://cdn.ensoft.dev/eepp-demos/demo-fs.html?run=ecode.js
|
||||
[14]: https://github.com/SpartanJ/ecode/releases/tag/ecode-0.4.1
|
@ -0,0 +1,181 @@
|
||||
[#]: subject: "Learn zip Command in Linux Using Examples"
|
||||
[#]: via: "https://www.debugpoint.com/zip-command-linux-examples/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Learn zip Command in Linux Using Examples
|
||||
======
|
||||
|
||||
**Here’s a beginner’s guide on understanding the zip command in Linux with a few examples.**
|
||||
|
||||
![][1]
|
||||
|
||||
A zip file is a compressed archive containing one or more files. It is widely used as a lossless data compression technique. Thanks to compression, it takes less disk space and requires fewer data to transfer over computer networks.
|
||||
|
||||
These compressed files can be extracted easily in Linux, Windows and macOS. Various software is available that supports zip file compression and also offers to extract them.
|
||||
|
||||
Since it is popular, almost all operating systems have this built-in.
|
||||
|
||||
In this tutorial, we will talk about several terminal-based methods to zip a file in Linux.
|
||||
|
||||
### Zip Command in Linux: Examples
|
||||
|
||||
#### Syntax
|
||||
|
||||
The program name you need to use in Linux to zip a file is `zip`. Here’s the basic syntax.
|
||||
|
||||
```
|
||||
zip [compress file name] file1 file2 file3
|
||||
```
|
||||
|
||||
And here’s the official syntax.
|
||||
|
||||
```
|
||||
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
|
||||
```
|
||||
|
||||
Ideally, it should be installed in all the major Linux distributions. If not, use the following commands to install it.
|
||||
|
||||
#### Install zip on Debian, Ubuntu and related distributions
|
||||
|
||||
```
|
||||
sudo apt install zip
|
||||
```
|
||||
|
||||
#### Install in Fedora, RHEL-based systems
|
||||
|
||||
```
|
||||
sudo dnf install zip
|
||||
```
|
||||
|
||||
#### Arch Linux
|
||||
|
||||
```
|
||||
pacman -S zip
|
||||
```
|
||||
|
||||
Let’s take a look at some examples.
|
||||
|
||||
#### How to zip files and folders
|
||||
|
||||
I have the following three files in my test directory. They are file1.txt, file2.txt and file3.txt. If I want to compress three files using zip and create a zip myfiles.zip, the following command is sufficient.
|
||||
|
||||
```
|
||||
zip myfiles.zip file1.txt file2.txt file3.mp3
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```
|
||||
adding: file1.txt (stored 0%)adding: file2.txt (stored 0%)adding: file3.mp3 (deflated 13%)
|
||||
```
|
||||
|
||||
![Output of Basic zip command in Linux][2]
|
||||
|
||||
A few points you should remember here.
|
||||
|
||||
- When creating a zip file, you should have the modify access to the current directory.
|
||||
- The zip file format doesn’t contain the permissions, i.e. read(4), write(2), and execute(1). So, the user who creates it becomes the owner of the file.
|
||||
- If you want to use zip with permission, try the tar command (to be explained in a later tutorial).
|
||||
- In the above output, the zip command shows the file names being added to the archive and the compression method.
|
||||
- Specifying the .zip file name extension in the target file name is not mandatory. If you omit .zip, zip will add the .zip at the end.
|
||||
|
||||
When you have hundreds or thousands of files in operation, it’s a good idea to suppress the output in the terminal. You can use -q command to suppress the output in the zip command.
|
||||
|
||||
```
|
||||
zip -q myfiles.zip file1.txt file2.txt file3.txt
|
||||
```
|
||||
|
||||
#### Recursive compression of subfolders
|
||||
|
||||
The `-r` option of zip command enables you to include subdirectories and their contents. This option recursively traverses until the last child of a directory structure and adds all of them to the zip file.
|
||||
|
||||
The following command creates a compressed file with all the contents and subdirectories inside my_folder.
|
||||
|
||||
```
|
||||
zip -r myfolder.zip my_folder
|
||||
```
|
||||
|
||||
You can also use the wild card characters (*) to include specific types of files in your zip file.
|
||||
|
||||
```
|
||||
zip -0 my_movies.zip *.mp4
|
||||
```
|
||||
|
||||
#### Adding a mix of files and directories
|
||||
|
||||
With all the above options, the zip command allows you to specify files and directories together as arguments.
|
||||
|
||||
```
|
||||
zip -r myfiles.zip file1.txt file2.txt file3.txt my_folder1 my_folder2
|
||||
```
|
||||
|
||||
### Compression algorithms
|
||||
|
||||
The default output of the zip file contains two distinct words, i.e. deflate and store. The default compression method used by zip is deflate. If it successfully compresses the file, then the output shows deflate. And when it can’t compress a file, it simply stores them inside the .zip file as is. Those file outputs show stored.
|
||||
|
||||
There any many compression algorithm present. One of them is the bzip2 compression method which is supported by zip command in Linux. You can specify the compression algo as a command option to use. Use the option -Z followed by the algorithm name, as shown below.
|
||||
|
||||
```
|
||||
zip -r -Z bzip2 myfolder.zip my_folder
|
||||
```
|
||||
|
||||
#### Compress levels
|
||||
|
||||
The zip command also allows you to specify the compression level. The compression level is how much you want the zip optimized to reduce the package size. It’s a numeric value range from 0 to 9. A value of 9 compression level is the highest compression. The default value is 6.
|
||||
|
||||
Remember, if you are using zip to compress thousands of files of varying sizes, it might use higher system resources and take time. So, if you use it in programs, or shell scripts for many files, follow proper programming standards.
|
||||
|
||||
```
|
||||
zip -9 -r myfolder.zip my_folder
|
||||
```
|
||||
|
||||
#### Password protect a zip file
|
||||
|
||||
You can also password protect a zip file using `-e` option like the one below.
|
||||
|
||||
```
|
||||
zip -e -r myfolder.zip my_folder
|
||||
```
|
||||
|
||||
It will ask for the password after you run the command.
|
||||
|
||||
Caution: Don’t use the zip command to password-protect a zip file. The encryption algorithm of the zip is PKZIP using a stream cipher. And it can be cracked easily. If you want to protect your file, use 7-Zip or other advanced tools.
|
||||
|
||||
#### Split size zip files
|
||||
|
||||
Many applications, servers, and file shares may contain restrictions of a fixed-size file upload. For example, you have a 10GB file, but the service allows only 1GB per file. Using the -s option of the zip, you can compress and split them into chunks for upload.
|
||||
|
||||
```
|
||||
zip -s 1g -r myfolder.zip my_folder
|
||||
```
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
You learned some basics of the zip command. It is useful for most local cases where you need to take quick backups by compressing them on the fly. However, for more advanced options, you should use 7-Zip or other commands, which I will share in the next few articles.
|
||||
|
||||
In the meantime, you can learn more in the [zip manual][3].
|
||||
|
||||
_This article is part of the [Linux command][4] learning series._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/zip-command-linux-examples/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2023/01/zip-file-head.jpg
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2023/01/Output-of-Basic-zip-command-in-Linux.jpg
|
||||
[3]: https://linux.die.net/man/1/zip
|
||||
[4]: https://www.debugpoint.com/category/linux-commands
|
@ -0,0 +1,149 @@
|
||||
[#]: subject: "Top 10 Linux Distributions for Servers in 2023"
|
||||
[#]: via: "https://www.linuxtechi.com/top-10-linux-distributions-for-servers/"
|
||||
[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " Veryzzj"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Top 10 Linux Distributions for Servers in 2023
|
||||
======
|
||||
|
||||
Linux operating system is a popular choice for servers – and for multiple reasons. First, it’s free (with exception of a few commercial distributions such as RHEL and SUSE Linux Enterprise Server ) and open-source. Its open-source nature implies that developers can view its source code, modify it and redistribute it according to the laid-out license terms. In addition, Linux is generally considered stable, versatile, and more secure than Windows. Furthermore, it can easily be deployed across various platforms such as bare-metal, virtual, and cloud environments.
|
||||
|
||||
In this article, we highlight the top 10 Linux distributions for servers.
|
||||
|
||||
### 1) Red Hat Enterprise Linux (RHEL)
|
||||
|
||||
[Red Hat Enterprise Linux][1], abbreviated as RHEL, is a commercial Linux distribution that was developed specifically for enterprise environments. It is a performance-driven, reliable, and secure operating system that provides enhanced usability and seamless deployment which makes it ideal for server environments.
|
||||
|
||||
RHEL supports a wide range of workloads in bare-metal, virtual, and cloud environments. In fact, it’s the world’s leading open-source solutions provider offering a myriad of products including Red Hat OpenShift, Ansible automation platform, Open hybrid cloud, JBoss Enterprise Application Platform, and SAP to mention a few.
|
||||
|
||||
![Neofetch-Command-Output-RHEL-System][2]
|
||||
|
||||
### 2) Ubuntu Server
|
||||
|
||||
Developed and maintained by Canonical, Ubuntu is one of the most popular and widely used Linux distributions. It is a Debian-based Linux distribution that is absolutely free and open-source and is renowned for Its Desktop edition which is intuitive, user-friendly, and considered ideal for learners and beginners. Ubuntu comes in 3 editions namely; Desktop, Ubuntu Server, and Core.
|
||||
|
||||
While the Desktop Edition enjoys massive global usage, the Server edition also offers a solid platform for server environments. First, it can be deployed in any environment, be it on a physical, virtual, or cloud environment with extensive scale-out functionality. This implies you can add resources on the go to meet evolving demands.
|
||||
|
||||
And since the server version is completely stripped down without any GUI, it’s relatively lightweight leading to low resource overhead. This means low CPU and memory usage. This consequently leads to improved performance and enterprise-grade stability.
|
||||
|
||||
Apart from installing it on physical data centers and virtual servers, Ubuntu server is available in public clouds such as AWS and Azure. According to Canonical, 55% of OpenStack clouds run on Ubuntu. In addition, you can have your own managed Openstack cloud for a fee.
|
||||
|
||||
![][3]
|
||||
|
||||
### 3) Debian
|
||||
|
||||
Debian is one of the earliest Linux distributions that is renowned for its rock-solid stability. It comes in three variants: Stable, Unstable, and Testing.
|
||||
|
||||
The Debian stable branch is the latest officially released distribution of Debian and is the most popular version for servers and desktop PCs. All packages shipped with this branch have undergone rigorous testing and debugging, and are hence considered ready for production workloads.
|
||||
|
||||
Debian server is tailored to be a fast and reliable operating system with an emphasis on security and stability. It’s for this reason that it makes for a perfect choice for server environments. In addition, It provides extensive hardware support with over 59,000 software packages, by far the greatest number of packages provided by any OS.
|
||||
|
||||
Just like Ubuntu Server, Debian is lightweight, versatile, and highly stable for enterprise workloads. In fact, it is considered more stable and easier to manage than Ubuntu.
|
||||
|
||||
![][4]
|
||||
|
||||
##### 4) SUSE Linux Enterprise Server
|
||||
|
||||
Another formidable and worthy contender in providing an excellent platform for servers is SUSE Linux Enterprise Server ( SLES ). The server operating system is created and maintained by SUSE, a German-based organization.
|
||||
|
||||
SLES is a commercial distribution that was built to handle enterprise-grade workloads. It is adaptable to any environment and is optimized for stability, reliability, and security. It is highly scalable and allows IT teams to efficiently deploy their applications and services in response to growing business demands.
|
||||
|
||||
The latest SLES release provides interoperability with ease of administration. It also provides increased support and compatibility with Docker containers, Kubernetes, and geo-clusters. The latter provides flexibility with high availability allowing IT teams to configure replication clusters that span multiple data center regions.
|
||||
|
||||
SUSE Linux Enterprise Server not only supports in-house workloads but is also offered on popular cloud providers including Microsoft Azure, Google Compute Engine, and Amazon Web Services.
|
||||
|
||||
|
||||
##### 5) OpenSUSE Leap
|
||||
|
||||
Developed by the OpenSUSE project, OpenSUSEis a non-commercial RPM-based Linux distribution that is developed and maintained by SUSE. OpenSUSE is free and open-source and provides two editions:
|
||||
|
||||
- OpenSUSE Leap
|
||||
- OpenSUSE Tumbleweed
|
||||
|
||||
OpenSUSE TumbleWeed is the rolling release version of OpenSUSE. It contains the latest stable applications including an updated kernel, git, SAMBA, desktop applications, and many more. It, therefore, makes a perfect distribution of choice for developers or power users who need to leverage the latest software stacks in their workloads. However, due to frequent kernel updates, it’s not the ideal choice for servers since frequent updates can cause inconsistencies with other third-party driver modules.
|
||||
|
||||
OpenSUSE Leap is the preferred OpenSUSE option for servers. It’s an open-source and community-driven distribution that has a slower release cycle and, hence, a better fit than TumbleWeed. It is community-driven and this means that it undergoes rigorous testing before being released.
|
||||
|
||||
Leap is comparatively easy to use and offers high performance and stability ideal for handling enterprise-grade workloads. It is a great alternative to commercial server distributions such as SLES and RHEL and allows companies to deploy their workloads both on bare metal and cloud deployments.
|
||||
|
||||
![][6]
|
||||
|
||||
### 6) Rocky Linux
|
||||
|
||||
Rocky Linux is a Linux distribution that was developed as a replacement for CentOS Linux which reached EOL ( End Of Life ) on 31st, December 2021. It is a free and opensource Linux distribution that is enterprise-ready, providing rock-solid stability, reliability, and regular updates with a 10-year support lifecycle at absolutely no cost
|
||||
|
||||
Rocky Linux is an enterprise operating system designed to be 100% bug-for-bug compatible with Red Hat Enterprise Linux and is currently under intensive development by the community.
|
||||
|
||||
The distribution has gained massive popularity since the untimely discontinuation of CentOS Linux. It can be installed on both servers, and desktop computers. It’s also available in custom-built images on Public cloud providers such as Amazon AWS, and Google Compute Engine.
|
||||
|
||||
Rocky Linux developers have availed a migration script that allows users to migrate from other enterprise editions such as CentOS Linux and Oracle Linux to Rocky Linux.
|
||||
|
||||
![][7]
|
||||
|
||||
### 7) AlmaLinux
|
||||
|
||||
Another alternative that was developed to plug in the gap left by CentOS Linux is AlmaLinux. This is yet another enterprise operating system that is completely free and opensource.
|
||||
|
||||
AlmaLinux was originally created by CloudLinux but is currently community driven. It offers a production-grade enterprise operating system that is 1:1 binary compatible with Red Hat Enterprise Linux (RHEL). In a nutshell, it’s a clone of RHEL and provides rock-solid stability and benefits that come with RHEL at no cost.
|
||||
|
||||
Being an Enterprise-grade server OS, AlmaLinux can comfortably run heavy and critical workloads. In addition, it provides regular releases that come with long-term support.
|
||||
|
||||
![][8]
|
||||
|
||||
### 8) Oracle Linux
|
||||
|
||||
Developed by Oracle Corporation, Oracle Linux is a secure and high-performance operating system that is compiled from RHEL source code. It is optimized for hybrid and multi-cloud deployments, and just like Rocky and AlmaLinux, Oracle Linux is 100% binary compatible with Red Hat Linux.
|
||||
|
||||
Oracle Linux is a viable option for data centers and certainly a perfect replacement for CentOS which reached EOL. It is rock-solid stable and posts incredible performance ideal for enterprise applications.
|
||||
|
||||
Unlike Commercial Linux distributions such as RHEL and SUSE, Oracle Linux is completely free to download, use and redistribute. It is available under the GNU General Public License (GPLv2).
|
||||
|
||||
### 9) Fedora Server
|
||||
|
||||
Fedora is a free and open-source Linux distribution that is developed and maintained by Fedora Project which is sponsored by Red Hat.
|
||||
|
||||
Fedora serves as the upstream, community distribution of Red Hat Enterprise Linux. All the applications go through rigorous testing before they are pushed to RHEL. As such, it is referred to as a ‘Bleeding Edge’ operating system. This implies is regularly gets the latest software applications and updates.
|
||||
|
||||
For a long time, Fedora has been popular for its Workstation Edition which was built for laptop and desktop computers. Over time, it has expanded to include other editions such as Fedora Server, Fedora IoT, and Fedora CoreOS.
|
||||
|
||||
Fedora Server is a robust, reliable, and flexible operating system that ships with the best and latest data center technologies. As a leading-edge edition, it offers the very latest technologies in the open-source community. It is easy to install, set up, and administer using various tools such as Cockpit web console.
|
||||
|
||||
Fedora is also fast, remarkably stable, and secure. It works just fine for production and enterprise workloads. New releases of Fedora are pushed out once every 6 months.
|
||||
|
||||
![][10]
|
||||
|
||||
### 10) Fedora CoreOS
|
||||
|
||||
Last on our list is Fedora CoreOS. This is a minimal operating system that is optimized specifically for running containerized applications and workloads. According to its home page, it touts itself as “an automatically-updating, minimal operating system for running containerized workloads securely and at scale.”
|
||||
|
||||
By default, it ships with both podman and docker and comes in three release streams namely: Stable, Testing, and Next. You can get images for bare-metal servers and virtualized environments as well as cloud images that are hosted by major cloud providers such as Amazon Web Service (AWS) and Google Cloud Platform (GCP).
|
||||
|
||||
##### Conclusion
|
||||
|
||||
That was a round-up of the best Linux distributions for servers. We hope you found this guide insightful. Any thoughts on our guide? Your feedback is very much welcome.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linuxtechi.com/top-10-linux-distributions-for-servers/
|
||||
|
||||
作者:[Pradeep Kumar][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linuxtechi.com/author/pradeep/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.redhat.com/en
|
||||
[2]: https://www.linuxtechi.com/wp-content/uploads/2019/10/Neofetch-Command-Output-RHEL-System.png
|
||||
[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Login-Screen-After-Ubuntu-Server-22-04-Installation.png
|
||||
[4]: https://www.linuxtechi.com/wp-content/uploads/2021/08/Login-screen-Debian11.png
|
||||
[6]: https://www.linuxtechi.com/wp-content/uploads/2018/09/openSUSE-Leap15-Installation-Option.jpg
|
||||
[7]: https://www.linuxtechi.com/wp-content/uploads/2022/07/neofetch-rockylinux9-post-installation.png
|
||||
[8]: https://www.linuxtechi.com/wp-content/uploads/2021/04/AlmaLinux8-Dashboard-After-Installation.jpg
|
||||
[10]: https://www.linuxtechi.com/wp-content/uploads/2016/11/Fedora-Linux-Desktop.png
|
@ -0,0 +1,346 @@
|
||||
[#]: subject: "Beyond Bash: 9 Lesser-Known Linux Shells and Their Capabilities"
|
||||
[#]: via: "https://itsfoss.com/shells-linux/"
|
||||
[#]: author: "Sreenath https://itsfoss.com/author/sreenath/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Beyond Bash: 9 Lesser-Known Linux Shells and Their Capabilities
|
||||
======
|
||||
|
||||
A Shell provides an interface to Linux and Unix-like systems by interpreting commands and acts as an intermediary between the user and the core workings of the operating system.
|
||||
|
||||
Undoubtedly, the **bash shell is the most popular one**, and some users prefer other shells like ZSH, which is the default shell in macOS. But many shells exist other than these popular ones, with different features and use cases.
|
||||
|
||||
In this article, we will take a look at some less popular shells that are actively maintained and provide a different user experience.
|
||||
|
||||
### 1. Fish Shell
|
||||
|
||||
When talking about shells other than bash/zsh, the first name coming to our mind is the fish shell.
|
||||
|
||||
Fish is a **smart, user-friendly command line shell** primarily for UNIX-like operating systems.
|
||||
|
||||
![fish shell][1]
|
||||
|
||||
**Features of Fish Shell**
|
||||
|
||||
- Autosuggestion of commands based on history and completions.
|
||||
- Supports 24-bit color.
|
||||
- It supports syntax highlighting, and all features work out of the box.
|
||||
|
||||
**Install Fish**
|
||||
|
||||
Fish is available in the official repos of almost all Linux distributions. In Ubuntu, you can install it by:
|
||||
|
||||
```
|
||||
sudo apt install fish
|
||||
```
|
||||
|
||||
The version in the Ubuntu repos is a bit old. If you want to install the latest version, you can use the official PPA provided by the team.
|
||||
|
||||
```
|
||||
sudo apt-add-repository ppa:fish-shell/release-3
|
||||
sudo apt update
|
||||
sudo apt install fish
|
||||
```
|
||||
|
||||
[Fish Shell][2]
|
||||
|
||||
### 2. Nushell
|
||||
|
||||
Nushell is a new type of shell that works in **Linux, macOS, Windows, BSD**, etc. **Nu**, as it’s also called, it takes its philosophy and inspiration from projects like [PowerShell][3], functional programming languages, and modern [CLI][4] tools.
|
||||
|
||||
![nushell][5]
|
||||
|
||||
**Features of Nushell**
|
||||
|
||||
- **Everything is data:** Nu pipelines use structured data so you can safely select, filter, and sort the same way every time.
|
||||
- **Powerful plugins:** It's easy to extend Nu using a powerful plugin system.
|
||||
- **Easy to read error messages.** Nu operates on typed data, so it catches bugs that other shells don’t. And when things break, Nu tells you exactly where and why.
|
||||
- Clean IDE support.
|
||||
|
||||
**Install Nushell**
|
||||
|
||||
If you’re on Ubuntu, you won’t find an apt repository to install Nushell. But you can build it by installing the required dependencies, as per its [instructions on GitHub][6].
|
||||
|
||||
Fortunately, there is a way to install it on any distro using **Homebrew**. You can refer to our tutorial on [installing and using Homebrew Package Manager on Linux][7].
|
||||
|
||||
Once you successfully set it up on Linux, you need to type in the following command to install Nushell:
|
||||
|
||||
```
|
||||
brew install nushell
|
||||
```
|
||||
|
||||
Head to its official website to explore more installation options.
|
||||
|
||||
[Nushell][8]
|
||||
|
||||
### 3. Dune
|
||||
|
||||
The project's creator describes **Dune** as a shell by the beach. Dune is a **fast, useful and pretty shell**, offering a few niche metaprogramming features such as quoting.
|
||||
|
||||
![dune shell][9]
|
||||
|
||||
**Features of Dune Shell**
|
||||
|
||||
- Before entering the interactive mode, Dune executes _the prelude,_ a startup file stored in the home directory.
|
||||
- Dune's REPL is entirely customizable
|
||||
- You can define aliases by assigning a variable to a program's name
|
||||
- Use a macro to write functions that modify your shell's environment and act like commands or programs
|
||||
- Dune offers an extensive standard library and also provides a pretty interface to see all the functions available in each module.
|
||||
|
||||
**Install Dune Shell**
|
||||
|
||||
Dune shell is available in the Arch Linux repository as **dunesh**.
|
||||
|
||||
For all other users, the Dune shell can be installed with cargo. So first, you need to [install the latest version of rust][10]. If you already have rust installed, ensure you have the latest version and then proceed to install Dune.
|
||||
|
||||
```
|
||||
cargo install -f dune
|
||||
```
|
||||
|
||||
Once installed, you can access the shell by entering the following:
|
||||
|
||||
```
|
||||
dunesh
|
||||
```
|
||||
|
||||
[Dune Shell][11]
|
||||
|
||||
### 4. Xonsh
|
||||
|
||||
Xonsh is a **Python-powered, cross-platform shell** and command prompt. It combines Python and bash shell so that you can run Python commands directly in the shell. You can even combine Python and shell commands.
|
||||
|
||||
![xonsh shell][12]
|
||||
|
||||
We had a separate article on Xonsh if you are curious to learn more:
|
||||
|
||||
**Features of Xonsh Shell**
|
||||
|
||||
- The Xonsh language has shell primitives that you are used to from Bash
|
||||
- Prepare environment variables and arguments in Python and use them in shell commands
|
||||
- Xontribs is a 3rd-party extension system
|
||||
- Customizable tab completion, key bindings, color styles
|
||||
- Rich interface to discover history
|
||||
|
||||
**Installing Xonsh Shell**
|
||||
|
||||
Xonsh is available in the repos of many Linux distributions like Ubuntu, Fedora, etc. So, to install it on Ubuntu, run:
|
||||
|
||||
```
|
||||
sudo apt install xonsh
|
||||
```
|
||||
|
||||
Xonsh also provides an AppImage package, which can be downloaded from their download page. You may refer to our [AppImage guide][13] if you are new to the file format.
|
||||
|
||||
[Xonsh][14]
|
||||
|
||||
### 5. Hilbish
|
||||
|
||||
Hilbish is an **extensible shell** that is very customizable via the Lua programming language. The shell is aimed at both casual users and power users.
|
||||
|
||||
![hilbish shell][15]
|
||||
|
||||
Features of Hilbish
|
||||
|
||||
- Simple and Easy Scripting
|
||||
- History and Completion Menus: Provides the user with proper menus for completions and history searching
|
||||
- Syntax highlighting and hinting are available via the Lua API
|
||||
- It works on Unix systems and Windows, but on Windows, there may encounter issues.
|
||||
|
||||
**Installing Hilbish**
|
||||
|
||||
Hilbish is not available in the package repositories of Ubuntu. So, you will be building it from the source.
|
||||
|
||||
To install it, you need **Go and task** installed.
|
||||
|
||||
```
|
||||
sudo apt install golang-go
|
||||
sudo snap install task --classic
|
||||
```
|
||||
|
||||
Once the dependencies are installed, run the following commands to install Hilbish shell:
|
||||
|
||||
```
|
||||
git clone --recursive https://github.com/Rosettea/Hilbish
|
||||
cd Hilbish
|
||||
go get -d ./...
|
||||
```
|
||||
|
||||
If you want a stable branch, run these commands:
|
||||
|
||||
```
|
||||
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
|
||||
task build
|
||||
sudo task install
|
||||
```
|
||||
|
||||
[Hilbish][16]
|
||||
|
||||
### 6. Elvish
|
||||
|
||||
Elvish is an expressive programming language and a versatile interactive shell. It runs on Linux, Mac, and Windows. Even if **v1.0** has not been released, it is already suitable for most daily interactive use.
|
||||
|
||||
![elvish shell][17]
|
||||
|
||||
**Features of Elvish**
|
||||
|
||||
- **Powerful Pipelines:** Pipelines in Elvish can carry structured data, not just text. You can stream lists, maps, and even functions through the pipeline.
|
||||
- **Intuitive Control Structures**
|
||||
- **Directory History:** Elvish remembers all the directories you have been to. You can access it by pressing `CTRL+L`.
|
||||
- **Command History**
|
||||
- **Built-in File Manager:** Accessible by pressing CTRL + N
|
||||
|
||||
**Install Elvish**
|
||||
|
||||
Elvish shell is available in Ubuntu and Arch Linux package managers. So to install it, open a terminal and run:
|
||||
|
||||
```
|
||||
sudo apt install elvish
|
||||
```
|
||||
|
||||
[Elvish][18]
|
||||
|
||||
### 7. Oh
|
||||
|
||||
According to its developers, Oh is a reimagining of the Unix shell.
|
||||
|
||||
It aims to become a more powerful and robust replacement to modern options while respecting the conventions established by the Unix shell over the last half-century.
|
||||
|
||||
![][19]
|
||||
|
||||
**Features of Oh Shell**
|
||||
|
||||
- First-class channels, pipes, environments, and functions
|
||||
- Rich return values that work with standard shell constructs
|
||||
- Support for modularity.
|
||||
- A simplified set of evaluation and quoting rules.
|
||||
- A syntax that deviates as little as possible from established conventions;
|
||||
|
||||
**Installing Oh**
|
||||
|
||||
Oh provides a pre-compiled binary. You need to download it from their [official GitHub page][20].
|
||||
|
||||
You need to give execution permission to the file using the command:
|
||||
|
||||
```
|
||||
chmod +x filename
|
||||
```
|
||||
|
||||
Now, you can run it by :
|
||||
|
||||
```
|
||||
./<name of binary file>
|
||||
```
|
||||
|
||||
[Oh][21]
|
||||
|
||||
### 8. Solidity
|
||||
|
||||
Solidity is an interactive shell with lightweight session recording and remote compiler support. When you change the solidity pragma/language, it automatically fetches a matching remote compiler.
|
||||
|
||||
![][22]
|
||||
|
||||
**Features of Solidity**
|
||||
|
||||
- `pragma solidity <version>` attempts to dynamically load the selected compiler version
|
||||
- Sessions can be saved and restored using the `.session` command.
|
||||
- Settings are saved on exit (not safe when running concurrent shells).
|
||||
- `$_` is a placeholder for the last known result.
|
||||
- Special commands are dot-prefixed. Everything else is evaluated as Solidity code.
|
||||
|
||||
**Install Solidity**
|
||||
|
||||
You can install solidity shell through npm.
|
||||
|
||||
[Ensure you have the latest version of nodejs][23] and npm installed, then type the following command:
|
||||
|
||||
```
|
||||
npm install -g solidity-shell
|
||||
```
|
||||
|
||||
Once installed, run **solidity-shell** to start the session.
|
||||
|
||||
[Solidity Shell][24]
|
||||
|
||||
### 9. Yash
|
||||
|
||||
Yash, or yet another shell is a POSIX-compliant command line shell written in C99 (ISO/IEC 9899:1999). It has features for daily interactive and scripting use.
|
||||
|
||||
![][25]
|
||||
|
||||
**Features of Yash Shell**
|
||||
|
||||
- Global aliases
|
||||
- Socket redirection, pipeline redirection, and process redirection
|
||||
- Prompt command and command-not-found handler
|
||||
- Command line completion with predefined completion scripts for more than 100 commands
|
||||
- Command line prediction based on command history
|
||||
|
||||
**Installing Yash Shell**
|
||||
|
||||
To install the shell, you need to go to their [GitHub releases][26] page and download the tar file. Now extract the tar file; inside it, you will find an INSTALL file with instructions to install it.
|
||||
|
||||
Typically, you should execute the below command inside the extracted folder.
|
||||
|
||||
```
|
||||
./configure && make && sudo make install
|
||||
```
|
||||
|
||||
[Yash][27]
|
||||
|
||||
### Honorable Mentions
|
||||
|
||||
- **Ion:** [Ion Shell][28] is a modern system shell written in Rust, primarily for **RedoxOS**. It is still a work in progress, and users should expect syntax changes.
|
||||
- **Closh:** [Closh][29] is a bash-like shell that combines the best of traditional UNIX shells with the power of [Clojure][30]. It aims to be a modern alternative to bash. This, too, is in the early stages of development.
|
||||
- **Dash**: [Dash][31] is a POSIX-compliant, fast and lightweight shell from Debian.
|
||||
|
||||
💬 _What do you think about these shells listed? Would you experiment by changing the default shell to some of the options here? What's your favorite one? Share your thoughts in the comments box below._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/shells-linux/
|
||||
|
||||
作者:[Sreenath][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/sreenath/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://itsfoss.com/content/images/2023/01/fish-shell.png
|
||||
[2]: https://fishshell.com/
|
||||
[3]: https://itsfoss.com/microsoft-open-sources-powershell/
|
||||
[4]: https://itsfoss.com/gui-cli-tui/
|
||||
[5]: https://itsfoss.com/content/images/2023/01/nushell.png
|
||||
[6]: https://github.com/nushell/nushell
|
||||
[7]: https://itsfoss.com/homebrew-linux/
|
||||
[8]: https://www.nushell.sh/
|
||||
[9]: https://itsfoss.com/content/images/2023/01/dunesh.png
|
||||
[10]: https://itsfoss.com/install-rust-cargo-ubuntu-linux/
|
||||
[11]: https://github.com/adam-mcdaniel/dune
|
||||
[12]: https://itsfoss.com/content/images/2023/01/xonsh.png
|
||||
[13]: https://itsfoss.com/use-appimage-linux/
|
||||
[14]: https://xon.sh/
|
||||
[15]: https://itsfoss.com/content/images/2023/01/hilbish.png
|
||||
[16]: https://rosettea.github.io/Hilbish/
|
||||
[17]: https://itsfoss.com/content/images/2023/01/elvish.png
|
||||
[18]: https://elv.sh/
|
||||
[19]: https://itsfoss.com/content/images/2023/01/oh_Shell.png
|
||||
[20]: https://github.com/michaelmacinnis/oh#linux
|
||||
[21]: https://github.com/michaelmacinnis/oh
|
||||
[22]: https://itsfoss.com/content/images/2023/01/solidity-shell.png
|
||||
[23]: https://itsfoss.com/install-nodejs-ubuntu/
|
||||
[24]: https://github.com/tintinweb/solidity-shell
|
||||
[25]: https://itsfoss.com/content/images/2023/01/yash.png
|
||||
[26]: https://github.com/magicant/yash/releases/tag/2.53
|
||||
[27]: https://yash.osdn.jp/index.html.en
|
||||
[28]: https://gitlab.redox-os.org/redox-os/ion
|
||||
[29]: https://github.com/dundalek/closh
|
||||
[30]: https://clojure.org/
|
||||
[31]: https://linuxhandbook.com/dash-shell/
|
||||
|
@ -0,0 +1,144 @@
|
||||
[#]: subject: "GNOME Screenshot Tool: Old and New Methods"
|
||||
[#]: via: "https://www.debugpoint.com/gnome-screenshot-tool-usage/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
GNOME Screenshot Tool: Old and New Methods
|
||||
======
|
||||
|
||||
**Here are the details about the GNOME Screenshot tool, its usage and how to install and launch them in older and modern methods.**
|
||||
|
||||
![][1]
|
||||
|
||||
In 2022, GNOME changed its default screenshot tool and built the screenshot function as part of the GNOME Shell. It’s not a separate application anymore.
|
||||
|
||||
Earlier, GNOME featured a native GTK app gnome-screenshot via all the major Linux distributions such as Ubuntu and Fedora. However, from [GNOME 42][2] onwards, this has been removed. Hence [Ubuntu 22.04][3] and Fedora 36 onwards, you only get the following new screenshot UI as a default screenshot utility.
|
||||
|
||||
This change fundamentally broke many workflows. Since it is not an executable you can launch separately, you only depend on the keyboard’s print-screen key. And only a shortcut is available via application search.
|
||||
|
||||
Hence, capturing screenshots with a delay in the new GNOME screenshot UI becomes much more challenging.
|
||||
|
||||
Here are some of the ways you can still use the older GNOME Screenshot tool and how to trigger the new screenshot UI manually.
|
||||
|
||||
### GNOME Screenshot Tool: How to install the old GUI
|
||||
|
||||
If you are using Ubuntu 22.04 and above, or any Ubuntu-based distribution with a GNOME desktop, run the following command to install it.
|
||||
|
||||
```
|
||||
sudo apt install gnome-screenshot
|
||||
```
|
||||
|
||||
And for Fedora users, use the following command.
|
||||
|
||||
```
|
||||
sudo dnf install gnome-screenshot
|
||||
```
|
||||
|
||||
If you are using a **GNOME desktop in Arch Linux** or Manjaro Linux GNOME, then use the below command to install it.
|
||||
|
||||
```
|
||||
pacman -S gnome-desktop
|
||||
```
|
||||
|
||||
After installation, launch it via the application menu.
|
||||
|
||||
![GNOME Screenshot (old)][4]
|
||||
|
||||
![GNOME Screenshot main window (old)][5]
|
||||
|
||||
For further customization, you can open Settings and remove the keybinding of Print-Screen from the Shell’s new UI and create a custom keyboard shortcut with the following commands.
|
||||
|
||||
```
|
||||
gnome-screenshot --window <for window>
|
||||
gnome-screenshot --area <for area>
|
||||
gnome-screenshot <for fullscreen>
|
||||
```
|
||||
|
||||
### GNOME Screenshot UI: How to manually trigger it via the command line
|
||||
|
||||
The function which executes when you press the Print-Screen key from the keyboard is part of the [GNOME Shell code][6]. Unfortunately, it is protected inside dbus API, and you can not invoke it directly.
|
||||
|
||||
It has been done to make you safe under Wayland so that no arbitrary code gets access to dbus call functions via any script.
|
||||
|
||||
However, this broke many use cases and scripts which people wrote over the years. For example, many users reported [Zoom][7] videoconferencing calls [broke][8] under GNOME-Wayland due to this, which was eventually solved via the below method of turning off the safe mode.
|
||||
|
||||
Let’s see how you can turn it off and trigger the gnome-shell screenshot
|
||||
|
||||
Use caution before using the following steps. Since it may open up your GNOME Shell for arbitrary script access. Make sure you know what you are doing.
|
||||
|
||||
First, you need to open [GNOME looking glass][9] to turn off the safe mode.
|
||||
|
||||
Press `ALT+F`2 and type below:
|
||||
|
||||
```
|
||||
lg
|
||||
```
|
||||
|
||||
![Launch looking glass][10]
|
||||
|
||||
Select Evaluator at the top, and in the command window, type the following. And hit enter.
|
||||
|
||||
```
|
||||
global.context.unsafe_mode = true
|
||||
```
|
||||
|
||||
![Turn off safe mode][11]
|
||||
|
||||
You should see a response that it is turned off.
|
||||
|
||||
![Verification][12]
|
||||
|
||||
Now press escape to close the looking glass. And open a terminal prompt.
|
||||
|
||||
And type the following to launch the screenshot tool.
|
||||
|
||||
```
|
||||
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.screenshotUI.open();'
|
||||
```
|
||||
|
||||
You should see the new GNOME Shell screenshot triggered.
|
||||
|
||||
![Launch new GNOME Shell Screenshot UI from CLI][13]
|
||||
|
||||
If you want to turn it off, open `lg` again and set it to false.
|
||||
|
||||
```
|
||||
global.context.unsafe_mode = true
|
||||
```
|
||||
|
||||
### Closing Notes
|
||||
|
||||
Usage-wise, you can still use the new screenshot feature via any shell script by turning off the safe mode. But it is not recommended. It’s always better to use the old GNOME Screenshot tool to avoid all the hassles.
|
||||
|
||||
Cheers.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/gnome-screenshot-tool-usage/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2023/01/gnome-sc1-1.jpg
|
||||
[2]: https://www.debugpoint.com/gnome-42/
|
||||
[3]: https://www.debugpoint.com/ubuntu-22-04-review/
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2023/01/GNOME-Screenshot-old.jpg
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2023/01/GNOME-Screenshot-main-window-old.jpg
|
||||
[6]: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/screenshot.js#L2210
|
||||
[7]: https://www.debugpoint.com/zoom-install-linux-ubuntu-download/
|
||||
[8]: https://community.zoom.com/t5/Meetings/Wayland-screen-sharing-broken-with-GNOME-41-on-Fedora-35/m-p/22539
|
||||
[9]: https://wiki.gnome.org/Projects/GnomeShell/LookingGlass
|
||||
[10]: https://www.debugpoint.com/wp-content/uploads/2023/01/Launch-looking-glass.jpg
|
||||
[11]: https://www.debugpoint.com/wp-content/uploads/2023/01/Turn-off-safe-mode.jpg
|
||||
[12]: https://www.debugpoint.com/wp-content/uploads/2023/01/Verification.jpg
|
||||
[13]: https://www.debugpoint.com/wp-content/uploads/2023/01/Launch-new-GNOME-Shell-Screenshot-UI-from-CLI.jpg
|
@ -0,0 +1,242 @@
|
||||
[#]: subject: "How to Analyse Sentiments Using Machine Learning"
|
||||
[#]: via: "https://www.opensourceforu.com/2022/09/how-to-analyse-sentiments-using-machine-learning/"
|
||||
[#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "chai001125"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
如何使用机器学习来分析情感
|
||||
======
|
||||
|
||||
>本文将帮助你理解什么是 <ruby>情感分析<rt>sentiment analysis</rt></ruby>,并且你能了解如何使用机器学习进行情感分析。我们使用了不同的机器学习算法进行情感分析,然后将各个算法的准确率结果进行比较,以确定哪一种算法最适合这个问题。
|
||||
|
||||
情感分析是自然语言处理(NLP)中的一个重要的内容。情绪指的是我们对某一事件、物品、情况或事物产生的感觉。情感分析是一个从文本中自动提取人类情感的研究领域。它在上世纪 90 年代初才慢慢地开始发展起来。
|
||||
|
||||
本文将让你明白如何将机器学习 (ML) 用于情感分析,并比较不同机器学习算法的结果。本文的目标不在于研究提高算法性能的方法。
|
||||
|
||||
如今,我们生活在一个快节奏的社会中,所有的商品都能在网上购买到,每个人都可以在网上发表自己的评论。而一些商品的负面网络评论可能会损害公司的声誉,从而影响公司的销售额。因此对公司来说,通过商品评论来了解客户真正想要什么变得非常重要。但是这些评论数据太多了,无法一个个地手动查看所有的评论。这就是情绪分析诞生的缘由。
|
||||
|
||||
现在,就让我们看看如何用机器学习开发一个模型,来进行基本的情绪分析吧。
|
||||
|
||||
### 现在就开始吧!
|
||||
|
||||
#### 获取数据
|
||||
|
||||
第一步是选择一个数据集。你可以从任何公开的评论中进行选择,例如推文或电影评论。数据集中包含两列:标签和实际的文本段。
|
||||
|
||||
下图显示了我们选取的部分数据集。
|
||||
|
||||
![Figure 1: Data sample][1]
|
||||
|
||||
接下来,我们导入所需的库:
|
||||
|
||||
```
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
from nltk.stem.porter import PorterStemmer
|
||||
import re
|
||||
import string
|
||||
```
|
||||
|
||||
我们使用 NumPy 和 Pandas 库来处理数据。至于其他库,我们会在使用到它们时再说明。
|
||||
|
||||
数据集已准备就绪,并且已导入所需的库。接着,我们需要用 Pandas 库将数据集读入到我们的项目中去。我们使用以下的代码将数据集读入 Pandas 数据帧(DataFrame)类型:
|
||||
|
||||
```
|
||||
sentiment_dataframe = pd.read_csv(“/content/drive/MyDrive/Data/sentiments - sentiments.tsv”,sep = ‘\t’)
|
||||
```
|
||||
|
||||
#### 数据处理
|
||||
|
||||
现在我们的项目中已经导入好数据集了。然后,我们要对数据进行处理,以便算法可以更好地理解数据集的特征。我们首先为数据集中的列命名,通过下面的代码来完成:
|
||||
|
||||
```
|
||||
sentiment_dataframe.columns = [“label”,”body_text”]
|
||||
```
|
||||
|
||||
然后,我们对 `label` 列进行数值化:`negative` 的评论替换为 1,`positive` 的评论替换为 0。下图显示了经过基本修改后的 `sentiment_dataframe` 的值。
|
||||
|
||||
![Figure 2: Data frame with basic modifications][2]
|
||||
|
||||
#### 准备好特征值、目标值
|
||||
|
||||
下一步是数据的预处理。这是非常重要的一步,因为机器学习算法只能理解/处理数值形数据,而不能理解文本,所以此时要进行特征抽取,将字符串/文本转换成数值化的数据。此外,还需要删除冗余和无用的数据,因为这些数据可能会污染我们的训练模型。我们在这一步中去除了噪声数据、缺失值数据和不一致的数据。
|
||||
|
||||
对于情感分析,我们在数据帧中添加特征文本的长度和标点符号计数。我们还要进行词干提取,即将所有相似词(如“give”、“giving”等)转换为单一形式。完成后,我们将数据集分为两部分:特征值 X 和 目标值 Y。
|
||||
|
||||
上述内容是使用以下代码完成的。下图显示了执行这些步骤后的数据帧。
|
||||
|
||||
![Figure 3: Data frame after the division of the data set][3]
|
||||
|
||||
```
|
||||
def count_punct(text):
|
||||
count = sum([1 for char in text if char in string.punctuation])
|
||||
return round(count/(len(text) - text.count(“ “)),3)*100
|
||||
|
||||
tokenized_tweet = sentiment_dataframe[‘body_text’].apply(lambda x: x.split())
|
||||
stemmer = PorterStemmer()
|
||||
tokenized_tweet = tokenized_tweet.apply(lambda x: [stemmer.stem(i) for i in x])
|
||||
for i in range(len(tokenized_tweet)):
|
||||
tokenized_tweet[i] = ‘ ‘.join(tokenized_tweet[i])
|
||||
sentiment_dataframe[‘body_text’] = tokenized_tweet
|
||||
sentiment_dataframe[‘body_len’] = sentiment_dataframe[‘body_text’].apply(lambda x:len(x) - x.count(“ “))
|
||||
sentiment_dataframe[‘punct%’] = sentiment_dataframe[‘body_text’].apply(lambda x:count_punct(x))
|
||||
X = sentiment_dataframe[‘body_text’]
|
||||
y = sentiment_dataframe[‘label’]
|
||||
```
|
||||
|
||||
#### 特征工程:文本特征处理
|
||||
|
||||
我们接下来进行文本特征抽取,对文本特征进行数值化。为此,我们使用计数向量器(CountVectorizer),它返回词频矩阵。
|
||||
|
||||
在此之后,计算数据帧 X 中的文本长度和标点符号计数等特征。X 的示例如下图所示。
|
||||
|
||||
![Figure 4: Sample of final features][4]
|
||||
|
||||
#### 使用的机器学习算法
|
||||
|
||||
现在数据已经可以训练了。下一步是确定使用哪些算法来训练模型。如前所述,我们将尝试多种机器学习算法,并确定最适合情感分析的算法。由于我们打算对文本进行二元分类,因此我们使用以下算法:
|
||||
|
||||
* K-近邻算法(KNN)
|
||||
* 逻辑回归算法
|
||||
* 支持向量机(SVMs)
|
||||
* 随机梯度下降(SGD)
|
||||
* 朴素贝叶斯算法
|
||||
* 决策树算法
|
||||
* 随机森林算法
|
||||
|
||||
#### 划分数据集
|
||||
|
||||
首先,将数据集划分为训练集和测试集。使用 sklearn 库,详见以下代码:
|
||||
|
||||
```
|
||||
from sklearn.model_selection import train_test_split
|
||||
X_train, X_test, y_train, y_test = train_test_split(X,y, test_size = 0.20, random_state = 99)
|
||||
```
|
||||
|
||||
我们使用 20% 的数据进行测试,80% 的数据用于训练。划分数据的意义在于对一组新数据(即测试集)评估我们训练的模型是否有效。
|
||||
|
||||
##### K-近邻算法
|
||||
|
||||
现在,让我们开始训练第一个模型。首先,我们使用 KNN 算法。先训练模型,然后再评估模型的准确率(具体的代码都可以使用 Python 的 sklearn 库来完成)。详见以下代码,KNN 训练模型的准确率大约为 50%。
|
||||
|
||||
```
|
||||
from sklearn.neighbors import KNeighborsClassifier
|
||||
model = KNeighborsClassifier(n_neighbors=3)
|
||||
model.fit(X_train, y_train)
|
||||
model.score (X_test,y_test)
|
||||
|
||||
0.5056689342403629
|
||||
```
|
||||
|
||||
##### 逻辑回归算法
|
||||
|
||||
逻辑回归模型的代码十分类似——首先从库中导入函数,拟合模型,然后对模型进行评估。下面的代码使用逻辑回归算法,准确率大约为 66%。
|
||||
|
||||
```
|
||||
from sklearn.linear_model import LogisticRegression
|
||||
model = LogisticRegression()
|
||||
model.fit (X_train,y_train)
|
||||
model.score (X_test,y_test)
|
||||
|
||||
0.6621315192743764
|
||||
```
|
||||
|
||||
##### 支持向量机算法
|
||||
|
||||
以下代码使用 SVM,准确率大约为 67%。
|
||||
|
||||
```
|
||||
from sklearn import svm
|
||||
model = svm.SVC(kernel=’linear’)
|
||||
model.fit(X_train, y_train)
|
||||
model.score(X_test,y_test)
|
||||
|
||||
0.6780045351473923
|
||||
```
|
||||
|
||||
##### 随机森林算法
|
||||
|
||||
以下的代码使用了随机森林算法,随机森林训练模型的准确率大约为 69%。
|
||||
|
||||
```
|
||||
from sklearn.ensemble import RandomForestClassifier
|
||||
model = RandomForestClassifier()
|
||||
model.fit(X_train, y_train)
|
||||
model.score(X_test,y_test)
|
||||
|
||||
0.6938775510204082
|
||||
```
|
||||
|
||||
##### 决策树算法
|
||||
|
||||
接下来,我们使用决策树算法,其准确率约为 61%。
|
||||
|
||||
```
|
||||
from sklearn.tree import DecisionTreeClassifier
|
||||
model = DecisionTreeClassifier()
|
||||
model = model.fit(X_train,y_train)
|
||||
model.score(X_test,y_test)
|
||||
|
||||
0.6190476190476191
|
||||
```
|
||||
|
||||
##### 随机梯度下降算法
|
||||
|
||||
以下的代码使用随机梯度下降算法,其准确率大约为 49%。
|
||||
|
||||
```
|
||||
from sklearn.linear_model import SGDClassifier
|
||||
model = SGDClassifier()
|
||||
model = model.fit(X_train,y_train)
|
||||
model.score(X_test,y_test)
|
||||
|
||||
0.49206349206349204
|
||||
```
|
||||
|
||||
##### 朴素贝叶斯算法
|
||||
|
||||
以下的代码使用朴素贝叶斯算法,朴素贝叶斯训练模型的准确率大约为 60%。
|
||||
|
||||
```
|
||||
from sklearn.naive_bayes import GaussianNB
|
||||
model = GaussianNB()
|
||||
model.fit(X_train, y_train)
|
||||
model.score(X_test,y_test)
|
||||
|
||||
0.6009070294784581
|
||||
```
|
||||
|
||||
#### 情感分析的最佳算法
|
||||
|
||||
接下来,我们绘制所有算法的准确率图。如下图所示。
|
||||
|
||||
![Figure 5: Accuracy performance of the different algorithms][5]
|
||||
|
||||
可以看到,对于情感分析这一问题,随机森林算法有最佳的准确率。由此,我们可以得出结论,随机森林算法是所有机器算法中最适合情感分析的算法。我们可以通过处理得到更好的特征、尝试其他矢量化技术、或者使用更好的数据集或更好的分类算法,来进一步提高准确率。
|
||||
|
||||
既然,随机森林算法是解决情感分析问题的最佳算法,我将向你展示一个预处理数据的样本。在下图中,你可以看到模型会做出正确的预测!试试这个来改进你的项目吧!
|
||||
|
||||
![Figure 6: Sample predictions made][6]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.opensourceforu.com/2022/09/how-to-analyse-sentiments-using-machine-learning/
|
||||
|
||||
作者:[Jishnu Saurav Mittapalli][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[chai001125](https://github.com/chai001125)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-1-Data-sample.jpg
|
||||
[2]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-2-Data-frame-with-basic-modifications-3.jpg
|
||||
[3]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-3-Data-frame-after-the-division-of-the-data-set.jpg
|
||||
[4]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-4-Sample-of-final-features.jpg
|
||||
[5]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-5-Accuracy-performance-of-the-different-algorithms.jpg
|
||||
[6]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-6-Sample-predictions-made.jpg
|
@ -1,137 +0,0 @@
|
||||
[#]: subject: "10 universal steps for open source code review"
|
||||
[#]: via: "https://opensource.com/article/22/10/code-review"
|
||||
[#]: author: "Martin Kopec https://opensource.com/users/martin-kopec"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "yzuowei"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
开源代码评审的十个通用步骤
|
||||
======
|
||||
|
||||
只要你遵循这些通用流程,<ruby>代码评审<rt>code review</rt></ruby>并不可怕。
|
||||
|
||||
你是否曾需要对代码进行评审,但你还没有完全理解整个项目?或许你避开去评审从而避免你看起来像是什么都不知道的洋相。
|
||||
|
||||
本篇文章想要告诉你一个更好的方法。代码评审并不需要你知道所有事情。实际上,就我个人经验而言,这种情况非常普遍。
|
||||
|
||||
我还记得在我刚加入<ruby>红帽<rt>Red Hat</rt></ruby>做实习的时候,我被要求参与代码评审。我们当时采取的是 +1 或 -1 的投票系统,而我在一开始的时候常常踌躇该如何评审。我发现我总是问自己对于一处改动是否应该给予 +1 当别人已经投了 -1,我会看起来很蠢吗?
|
||||
|
||||
如果你对一处改动投了 +1, 但是别人又投了 -1,这又意味着什么呢?这不意味任何事!你可能只是漏掉了一处细节而别人又恰好注意到了。这不意味着世界末日。这也是为什么我们会用投票系统。正如同所有开源项目一样,代码合并是一项协同工作。
|
||||
|
||||
最近,我接到了太多的代码评审工作以至于我难以维持进度。我同时也注意到了参与评审的贡献者数量正在稳步减少。
|
||||
|
||||
基于这个原因,我想要写一篇文章阐述我对代码评审的个人观点。在这篇文章里,我会分享一些诀窍与技巧。我会向你展示几个问题你可以用来自问自答,我也会为在评审代码时需要注意什么提供一些想法。
|
||||
|
||||
### 代码评审的目的是什么?
|
||||
|
||||
你是否曾写过一个非常简单的补丁?补丁太过琐碎以至于你认为评审是多余的?或许你马上进行了合并。直到晚些时候,你意识到你犯了个错误,一个明显或是愚蠢的错误,或是错误缩进,或是几行重复的代码在本可以调用函数的地方(是的,这些都是经验之谈!)。
|
||||
|
||||
一段代码本可以交予他人评审并及时发现这些问题。
|
||||
|
||||
代码评审的一个目的便是为你在尝试解决的问题带来一双全新的视角。新开阔的视野也正是为什么代码评审至关重要。
|
||||
|
||||
你可能会认为评审别人的代码需要你是一名专家,或是编程语言专家,或是项目专家,或两者兼具。让我来告诉你一个所有代码评审者都想跟你说的秘密吧:大错特错!你并不需要完全理解项目或者编程语言来为改动提供全新视角。我将向你展示代码评审的通用流程。
|
||||
|
||||
### 代码评审的通用流程
|
||||
|
||||
这是我的代码评审流程被拆分成几个要点。这个流程包含了我会问我自己的一些问题,以帮助我专注于代码的变化以及其后果。你不需要严格依照顺序来进行评审。如果有任何原因导致你无法执行其中的某一步,跳过那一步就好。
|
||||
|
||||
### 1. 理解改动,问改动想要解决的问题,以及为什么要解决这个问题
|
||||
|
||||
为什么需要改动的解释以及任何相关背景都应该被放在<ruby>提交<rt>commit</rt></ruby>信息里。如果没有,要求相关信息并请随意投 -1 直到相关信息被提供。
|
||||
|
||||
改动想解决的问题需要被解决吗?它是项目应当聚焦的问题,还是与项目完全无关?
|
||||
|
||||
### 2. 你会如何实现解决方案?它会不一样吗?
|
||||
|
||||
在这个时候,你应该已经知道代码改动是为了什么。换做是你会怎么做?在进一步对改动进行细节评审前思考这个问题。如果你想出了一个不一样的解法,并且你认为你的解法更好,在评审中提出来。你不需要投 -1;去问问作者为什么没有往那个方向走,看看这次讨论会把你们带向何方。
|
||||
|
||||
### 3. 运行有改变和无改变的代码
|
||||
|
||||
我通常会在代码中设置几个断点,运行代码并检查新代码是如何与其余部分互动的。
|
||||
|
||||
如果你无法运行整个代码,试着将带有新代码的函数复制到一个新的本地文件,模拟输入数据,然后运行。这在你不知道怎么运行整个项目或者无法接触到运行所需的特殊环境时很有帮助。
|
||||
|
||||
### 4. 新代码会破坏任何东西吗?
|
||||
|
||||
我是说,任何东西。想一想可能的后果。
|
||||
|
||||
以一个新的命令行选项为例,它会总是被目标所接受吗?
|
||||
|
||||
是否存在这样一种情况使得新选项无法被接受或是会与其他东西起冲突?
|
||||
|
||||
或许新代码是一个新的导入。那么这个新的库,很可能也是新的依赖,能够在老版本或者项目的运行系统中被找到吗?
|
||||
|
||||
安全方面呢?新的依赖足够安全吗?你至少可以在网上快速地搜索一下。还有,注意一下控制台日志里的警告。有的时候在同样的库里也可以找到更安全的方法。
|
||||
|
||||
### 5. 新代码是否有效?
|
||||
|
||||
你刚刚确认了被提出的解决方案大概是正确的。现在该检查代码本身了。你需要关注代码的有效性和必要性。
|
||||
|
||||
检查新代码的风格。它与项目的代码风格相匹配吗?任何开源项目都(应该)有一份文档告知(新)贡献者项目所遵循的风格和优秀实践。
|
||||
|
||||
比如说,OpenStack 社区的所有项目都有一份 HACKING.rst 文件。你经常也能找到一份[新贡献者指南][1]包含所有必须知道的信息。
|
||||
|
||||
### 6. 确认所有新增的变量和导入都被使用
|
||||
|
||||
你正在评审的代码常常已经过多次迭代,有的时候代码的最终版本与初始版已迥然不同。所以我们很容易忘记一些在历史版本中加入的变量与引用。自动化检测通常会用到 lint 工具,类似 Python 中的 [flake8][12]。
|
||||
|
||||
(LCTT 译注:[lint][5] 指编程中用来发现代码潜在错误和约束代码风格的工具,起源于 C 语言编程中的静态分析工具 lint。lint 本意为衣服上积累的绒毛与灰尘,lint 的取名寓意则在于捕捉编程时产生的“绒毛与灰尘”)
|
||||
|
||||
你可以在不声明新变量的情况下重写代码吗?通常情况下你可以,但问题是这样是否更好。这会带来什么益处吗?我们的目标不是多写花式的一行代码,而是写出高效且易读的代码。
|
||||
|
||||
### 7. 新的函数和方法是否必要?
|
||||
|
||||
项目里的别的地方是否存在可以被复用的功能类似的函数?确保避免重新发明轮子以及重新实现已经被定义的逻辑永远都是值得的。
|
||||
|
||||
### 8. 有单元测试吗?
|
||||
|
||||
如果补丁增加了新的函数或者在函数内添加了新的逻辑,它也应该附带对应的单元测试。新函数的作者总是比别人更适合写该函数的单元测试。
|
||||
|
||||
### 9. 验证重构
|
||||
|
||||
如果这次提交对现有代码进行了重构(它可能重命名了某个变量,或者是改变了的变量的作用域,或者是通过加减参数来改变函数的足迹,又或者是删去了某个东西),问一问你自己:
|
||||
|
||||
- 这个可以被删除吗?它会影响到稳定分支吗?
|
||||
- 所有出现的地方都删掉了吗?
|
||||
|
||||
你可以利用 [grep 命令][3]来查找。你不会相信有多少次我投 -1 就是因为这个。这是一个任何人都会犯的错误,也正因如此任何人都可以发现它。
|
||||
|
||||
提交的所有者很容易忽略这些事情,这完全可以理解。我也犯过很多次这种错误。我最终发现问题的根源在于我太急于提出评审,以至于我忘记了对仓库进行整体检查。
|
||||
|
||||
除了对项目仓库的检查外,检查其他代码用户也十分必要。如果有别的项目导入了这个项目,它们可能也需要进行重构。在 OpenStack 社区中,我们有对应的工具来查询别的社区项目。
|
||||
|
||||
### 10. 项目文档是否需要做出更改?
|
||||
|
||||
你可以再一次使用 [grep 命令][4]来检查在项目文档中是否提到了相关的代码改动。用常识来判断这次改动是否需要被收入文档以告知最终用户,还是只是一个不会影响用户体验的内部变化。
|
||||
|
||||
### 额外提示:考虑周到
|
||||
|
||||
当你在评审完新代码后提出建议或评论时,要考虑周到,反馈准确,描述详尽。如果有你不理解的地方就发出提问。如果你认为代码存在错误,解释你的理由。记住,作者无法修复他不知道的漏洞。
|
||||
|
||||
### 最后几句
|
||||
|
||||
唯一的坏评审是没有评审。通过评审和投票,你提供了你的观点并为此发声。没有人指望你来做出最终决定(除非你是核心维护者),但是投票系统允许你提供你的观点和意见。相信我,补丁所有者会很高兴你这么做了的。
|
||||
|
||||
你能想到别的要点来给出好的评审吗?你是否有我不知道的特殊技巧?在评论中分享它们吧!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/10/code-review
|
||||
|
||||
作者:[Martin Kopec][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[yzuowei](https://github.com/yzuowei)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/martin-kopec
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://docs.openstack.org/tempest/latest/contributor/contributing.html
|
||||
[2]: https://opensource.com/article/19/5/python-flake8
|
||||
[3]: https://opensource.com/downloads/grep-cheat-sheet
|
||||
[4]: https://www.redhat.com/sysadmin/how-to-use-grep
|
||||
[5]: https://codedocs.org/what-is/lint-software
|
@ -0,0 +1,93 @@
|
||||
[#]: subject: "Discover the power of the Linux SpaceFM file manager"
|
||||
[#]: via: "https://opensource.com/article/22/12/linux-file-manager-spacefm"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
发现 Linux SpaceFM 文件管理器的强大
|
||||
======
|
||||
|
||||
SpaceFM 是一个使用 GTK 工具包的 Linux 的标签式文件管理器,所以它很适合在 [GNOME][1]、[Mate][2]、[Cinnamon][3] 等的桌面上使用。SpaceFM 还具有一个内置的设备管理器系统,所以它特别适合于窗口管理器,像 [Fluxbox][4] 或 [fvwm][5],它们通常不包括一个图形设备管理器。如果你对 Linux 上的文件管理器满意,但你想尝试一个设计上有点不同的文件管理器,SpaceFM 值得一看。
|
||||
|
||||
### 安装 SpaceFM
|
||||
|
||||
在 Linux 上,你可能会在你的发行版的仓库中找到 **SpaceFM**。在 Fedora、Mageia、OpenMandriva 和类似的软件中:
|
||||
|
||||
```
|
||||
$ sudo dnf install spacefm
|
||||
```
|
||||
|
||||
在 Debian 和基于 Debian 的系统上:
|
||||
|
||||
```
|
||||
$ sudo apt install spacefm
|
||||
```
|
||||
|
||||
### 面板
|
||||
|
||||
我不知道为什么 SpaceFM 被称为 SpaceFM,但可能是因为它做出了一致的努力,让你把窗口中的每一点空间都用来做有用的事情。默认情况下,SpaceFM 实际上是相当简单的、标准的文件管理器。它有一个列出你的文件的面板,一个工具栏,和一个菜单栏。
|
||||
|
||||
![SpaceFM is typical in design. At first.][6]
|
||||
|
||||
所有的“常规”规则都适用。
|
||||
|
||||
- **双击**打开一个目录或在其默认的应用中打开一个文件。
|
||||
- **右键点击**可获得一个上下文菜单,提供许多标准选项(复制、粘贴、重命名、查看属性、创建新文件夹,等等)。
|
||||
|
||||
不过,SpaceFM 使自己与众不同的方式是它的面板系统。SpaceFM 默认显示一个面板。这就是列出你的文件的大文件窗口。但它最多可以有四个面板视图,再加上一些用于某些特定任务的额外面板。
|
||||
|
||||
### 打开一个新的面板
|
||||
|
||||
在你的文件管理器中,你可以看到两个目录,而不是看到一个目录。要在自己的窗格中调出另一个目录,按 **Ctrl+2** 或进入**视图**菜单,选择 **Panel 2**。或者,点击菜单面板中从左开始的第二个绿点图标。
|
||||
|
||||
有了两个面板,你可以把文件从一个目录移到另一个目录,而不需要打开一个新的文件管理器窗口,或者你可以浏览两个目录来比较其内容。
|
||||
|
||||
但为什么要满足于两个面板呢?也许你更想一次看到三个目录。要在一个专门的窗格中调出第三个目录,请按 **Ctrl+3** 或进入**查看**菜单,选择 **Panel 3**。或者,点击菜单面板中从左开始的第三个绿点图标。这个面板出现在 SpaceFM 窗口的底部。
|
||||
|
||||
打开三个面板后,你可以在几个目录之间移动文件,或将文件从一个公共的“垃圾场”(如你的桌面或下载文件夹)分类到特定的目录。
|
||||
|
||||
当然,当你尝试了三个面板,你可能会发现自己很想拥有第四个面板。要在自己的窗格中打开第四个目录,按 **Ctrl+4** 或进入**查看**菜单,选择 **Panel 4**。或者,点击菜单面板中从左开始的第四个绿点图标。这个会在面板 3 旁边打开,并将你的 SpaceFM 窗口分成四份。
|
||||
|
||||
![SpaceFM can have up to four panels.][7]
|
||||
|
||||
那么_第五个_面板呢?好吧,实际上 SpaceFM 仅有四个面板。如果你真的想有第五个面板,你必须打开一个新的 SpaceFM 窗口。然而,仍有更多的面板,用于文件列表以外的信息,可供探索。
|
||||
|
||||
### 特殊面板
|
||||
|
||||
在**查看**菜单中可以看到,除了文件面板外,还有一些特定的任务面板可以选择显示。这包括:
|
||||
|
||||
- **任务管理器**:列出正在进行的文件管理器进程。这不是一个通用的任务管理器,所以要设置 nice 值或检测僵尸 PID,[htop 或 top][8] 仍然是你选择的工具。
|
||||
- **书签**:常用文件夹的链接,如桌面、文档、下载和任何你想保持方便的位置。
|
||||
- **设备**:USB 驱动器和远程文件系统。
|
||||
- **文件树**:按照目录继承顺序查看文件系统。
|
||||
|
||||
这些面板在 SpaceFM 的左侧打开,但它们是堆叠的。你可以同时打开书签、设备、任务和文件树,尽管它会有一个非常高的 SpaceFM 窗口。
|
||||
|
||||
### 为 SpaceFM 腾出空间
|
||||
|
||||
SpaceFM 是一个可配置的多任务文件管理器。它最大限度地增加了你可以在一个窗口中展示的信息,并让你决定什么是重要的,以及什么时候重要。本文重点介绍了 SpaceFM 的面板,因为至少在我看来,这些是该应用最独特的方面。然而,SpaceFM 还有很多东西,包括插件、首选项、设计模式、键盘快捷键和自定义。这不是一个小的应用,尽管它是一个轻量级的。花些时间在 SpaceFM 上,因为你永远不知道你会发现什么。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/12/linux-file-manager-spacefm
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/article/19/12/gnome-linux-desktop
|
||||
[2]: https://opensource.com/article/19/12/mate-linux-desktop
|
||||
[3]: https://opensource.com/article/19/12/cinnamon-linux-desktop
|
||||
[4]: https://opensource.com/article/19/12/fluxbox-linux-desktop
|
||||
[5]: https://opensource.com/article/19/12/fvwm-linux-desktop
|
||||
[6]: https://opensource.com/sites/default/files/2022-10/spacefm.webp
|
||||
[7]: https://opensource.com/sites/default/files/2022-10/spacefm-panels.webp
|
||||
[8]: https://opensource.com/life/16/2/open-source-tools-system-monitoring
|
@ -0,0 +1,98 @@
|
||||
[#]: subject: "Document with BookStack, an open source Confluence alternative"
|
||||
[#]: via: "https://opensource.com/article/23/1/bookstack-open-source-documentation"
|
||||
[#]: author: "Dan Brown https://opensource.com/users/ssddanbrown"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
使用 BookStack 写文档,一个开源的 Confluence 替代品
|
||||
======
|
||||
|
||||
BookStack 是一个开源的、基于网络的文档系统,它允许你创建一个结构化的知识库供个人、团队或公司使用。BookStack 专注于易用性和设计,以提供适合具有潜在的混合技术技能的受众的体验。它建立在 PHP 框架 Laravel 之上,使用 MySQL 或 MariaDB 作为数据存储。
|
||||
|
||||
在尝试为我的工作场所寻找文档或 wiki 系统后,我构建了 BookStack。[Confluence][1] 是最符合我要求的选项,但基于用户的定价带了的阻碍。Confluence 的封闭性也对我要构建的文档的寿命提出了质疑。最后,我决定建立自己的平台来满足我的需求。我用 MIT 许可发布它,以回馈我多年来喜爱并从中受益的开源社区。
|
||||
|
||||
### 内容层次和组织选项
|
||||
|
||||
为了保持熟悉和直观,BookStack 使用了现实世界的书籍术语来描述其组织结构。文档内容被创建“页”:
|
||||
|
||||
- 页属于一个特定的“书”。
|
||||
- 在一本书中,页可以选择性地被分组为“章节”。
|
||||
- 随着文档的增长,你可以使用“书架”来对“书”进行分类,如果需要,“书”可以成为多个书架的一部分。
|
||||
|
||||
这种结构是 BookStack 的核心,而且往往是决定 BookStack 是否适合你的使用情况的爱与恨的方面。
|
||||
|
||||
在这个核心层次上,BookStack 还提供了标签、用户收藏夹和高级搜索功能,以确保内容可被发现。
|
||||
|
||||
### 编写文档
|
||||
|
||||
在 BookStack 中编写文档的主要方法是通过使用其所见即所得(WYSIWYG)编辑器,它利用了开源的 [Tiny][2] 项目。这个编辑器提供了一系列的内容格式,包括:
|
||||
|
||||
- 各种标题级别
|
||||
- 代码块
|
||||
- 可折叠的块
|
||||
- 表格
|
||||
- 图片
|
||||
- 链接
|
||||
- iFrame 嵌入
|
||||
- 提醒呼出
|
||||
- 项目符、编号和任务列表
|
||||
- 绘图(通过与开源 [diagrams.net][3] 的整合)
|
||||
|
||||
如果你喜欢 [Markdown][4],你可以使用内置的 Markdown 编辑器,它提供实时预览并支持与所见即所得编辑器相同的功能集。如果权限允许,你甚至可以根据你所编辑的页面,在这些编辑器选项之间跳转。
|
||||
|
||||
### 你的数据是如何存储的
|
||||
|
||||
文档以相对简单的 HTML 格式存储在 [MySQL 或 MariaDB][5] 数据库中,如果使用了 Markdown,除了原始的 Markdown 内容外。很多设计和开发决定都是为了保持这种 HTML 格式的简单性。它尽可能地使用普通的标准 HTML 元素,以确保原始文档内容保持开放和可移植。
|
||||
|
||||
上传的图片、附件和创建的图纸被保存在本地文件系统中,但也可以选择存储在一个与 s3 兼容的数据存储中,比如开源的 [MinIO][6]。
|
||||
|
||||
为了保持你的内容可访问性,有内置的选项可以将内容导出为 PDF、HTML、纯文本或 Markdown。对于外部消费,有一个 HTTP REST API 和一个 webhook 系统。在扩展方面,一个“逻辑主题系统”允许在广泛的系统事件中运行自定义的 PHP 代码。
|
||||
|
||||
### 为业务做好准备
|
||||
|
||||
BookStack 具有一系列的功能来支持商业环境。内置了对一系列认证选项的支持,包括 SAML2、OpenID Connect 和 LDAP,允许使用 [KeyCloak][7] 等平台轻松实现单点登录。MFA 选项是可用的,并且可以根据角色进行授权。审计日志提供整个实例的修改活动的完整可见性。
|
||||
|
||||
一个完全基于角色的权限系统为管理员提供了对系统内容的创建、查看、更新和删除操作的完全控制。这允许每个角色的系统默认值,以及在每个层次项目基础上设置自定义权限的选项。
|
||||
|
||||
### 一个支持的社区
|
||||
|
||||
经过 7 年多的活跃,BookStack 的社区已经发展到了各种讨论和支持的渠道。我们现在有:
|
||||
|
||||
- [我们的文档站点][8]
|
||||
- [YouTube 上的视频指南][9]
|
||||
- [一个 subreddit][10]
|
||||
- [一个活跃的 GitHub 问题列表][11]
|
||||
- [付费业务支持][12]
|
||||
|
||||
如果你想玩玩 BookStack,你可以[在我们的演示网站][13]试试。要了解如何设置你自己的实例,请访问[我们文档的安装页面][14]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/23/1/bookstack-open-source-documentation
|
||||
|
||||
作者:[Dan Brown][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/ssddanbrown
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://opensource.com/article/20/9/open-source-alternatives-confluence
|
||||
[2]: https://github.com/tinymce/
|
||||
[3]: https://www.diagrams.net/
|
||||
[4]: https://opensource.com/article/19/9/introduction-markdown
|
||||
[5]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet
|
||||
[6]: https://github.com/minio/
|
||||
[7]: https://www.keycloak.org/
|
||||
[8]: https://www.bookstackapp.com/docs/
|
||||
[9]: https://www.youtube.com/c/BookStackApp
|
||||
[10]: https://www.reddit.com/r/bookstack
|
||||
[11]: https://github.com/BookStackApp/BookStack/issues
|
||||
[12]: https://www.bookstackapp.com/support
|
||||
[13]: https://demo.bookstackapp.com/books/bookstack-demo-site/page/logging-in-to-the-demo-site
|
||||
[14]: https://www.bookstackapp.com/docs/admin/installation/
|
Loading…
Reference in New Issue
Block a user