Merge branch 'master' of https://github.com/LCTT/TranslateProject into translating

This commit is contained in:
geekpi 2022-08-17 08:42:44 +08:00
commit b154e005bd
7 changed files with 848 additions and 36 deletions

View File

@ -3,16 +3,16 @@
[#]: author: "Sirko Kemter https://fedoramagazine.org/author/gnokii/"
[#]: collector: "lujun9972"
[#]: translator: "aREversez"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14935-1.html"
MAKE MORE with Inkscape Ink/Stitch
Inkscape 扩展应用:Ink/Stitch
======
![MAKE more with Inkscape - Ink/Stitch][1]
Inkscape 是 Fedora 设计团队最喜爱最常用的软件,它的功能可不止于制作精美的矢量图形。矢量图形(也就是 SVG 文件可以帮助实现更多操作许多软件也支持这一格式。不过Inkscape 还有其他功能有待发掘。[本系列][2] 第一篇文章介绍了如何 [使用 Inkscape 生成 GCode 文件][3];本篇文章将探索 Inkscape 的另一项展功能:用于绣花设计的 [Ink/Stitch][4]。
Inkscape 是 Fedora 设计团队最喜爱最常用的软件,它的功能可不止于制作精美的矢量图形。矢量图形(也就是 SVG 文件可以帮助实现更多操作许多软件也支持这一格式。不过Inkscape 还有其他功能有待发掘。[本系列][2] 第一篇文章介绍了如何 [使用 Inkscape 生成 GCode 文件][3];本篇文章将探索 Inkscape 的另一项展功能:用于绣花设计的 [Ink/Stitch][4]。
### 绣花 DIY
@ -40,10 +40,10 @@ Inkscape 是 Fedora 设计团队最喜爱最常用的软件,它的功能可不
* **.10o** 丰田绣花机
* **.100** 丰田绣花机
* **.CSD** PoemHuskygram 和胜家家用绣花缝纫机
* **.CSD** PoemHuskygram 和胜家家用绣花缝纫机
* **.DSB** 百灵达绣花机
* **.JEF** 车乐美 MemoryCraft 10000
* **.SEW** 车乐美 MemoryCraft 5700, 8000, and 9000
* **.SEW** 车乐美 MemoryCraft 5700、8000 和 9000
* **.PES** 兄弟和 Babylock 家用绣花缝纫机
* **.PEC** 兄弟和 Babylock 家用绣花缝纫机
* **.HUS** 好时运家用绣花缝纫机
@ -55,8 +55,6 @@ Inkscape 是 Fedora 设计团队最喜爱最常用的软件,它的功能可不
* **.XXX** Compucon 和 胜家家用绣花缝纫机
* **.ZSK** 美国市场的 ZSK 绣花机
关于绣花机会用到的文件格式,上面列出来的只是九牛一毛,可 [在此][14] 查看全部格式。如果你想进一步了解这些文件格式,可点击 [此处][15] 获取更多信息。
#### Ink/Stitch 文件格式
@ -67,17 +65,17 @@ Ink/Stitch 最初使用的是 [libembroidery][12] 库,现在则使用 [pyembro
除了文件格式,绣花缝纫软件还需解决其它一些问题。
支持繁杂多样的线迹类型是一个难题,绘制工具与缝制工具的搭配使用又是另一个难题。不过,为什么非要从无到有搞出一套新应用?为什么不依赖现有的矢量软件?这样一来,开发者只需要在其基础上增添绣花展功能即可。后者就是 [Ink/Stitch 项目][4] 过去四年来的设计理念。
支持繁杂多样的线迹类型是一个难题,绘制工具与缝制工具的搭配使用又是另一个难题。不过,为什么非要从无到有搞出一套新应用?为什么不依赖现有的矢量软件?这样一来,开发者只需要在其基础上增添绣花展功能即可。后者就是 [Ink/Stitch 项目][4] 过去四年来的设计理念。
### 安装 Ink/Stitch
Ink/Stitch 是 [Inkscape 的一个拓展功能][16]。不过,由于 Inkscape 下载安装拓展的新功能还处于测试阶段,在其提供的拓展功能中可能无法找到 Ink/Stitch。因此你需要自行手动 [下载][17] 该拓展。下载后,将压缩包解压到 Inkscape 拓展所在路径,默认路径为 _~/.config/Inkscape/extensions_或者放置在系统全局路径_/usr/share/inkscape/extensions_。若你改变了默认路径则需检查 Inkscape 设置选项,找到拓展文件的存放位置。
Ink/Stitch 是 [Inkscape 的一个扩展功能][16]。不过,由于 Inkscape 下载安装扩展的新功能还处于测试阶段,在其提供的扩展功能中可能无法找到 Ink/Stitch。因此你需要自行手动 [下载][17] 该扩展。下载后,将压缩包解压到 Inkscape 扩展所在路径,默认路径为 `~/.config/Inkscape/extensions`(或者放置在系统全局路径:`/usr/share/inkscape/extensions`)。若你改变了默认路径,则需检查 Inkscape 设置选项,找到扩展文件的存放位置。
### 自定义:为 Ink/Stitch 安装插件
Ink/Stitch 提供了为 Inkscape 安装插件的功能,用户需首先执行这一功能。
依次点击如下选项:_<ruby>扩展<rt>Extensions</rt></ruby> &gt; Ink/Stitch &gt; <ruby>线条颜色管理<rt>Thread Color Management</rt></ruby> &gt; <ruby>为 Inkscape 安装线条调色板<rt>Install thread color palettes for Inkscape</rt></ruby>_,之后等待片刻。
依次点击如下选项:<ruby>扩展<rt>Extensions</rt></ruby> > Ink/Stitch > <ruby>线条颜色管理<rt>Thread Color Management</rt></ruby> > <ruby>为 Inkscape 安装线条调色板<rt>Install thread color palettes for Inkscape</rt></ruby>,之后等待片刻。
虽然这一过程不会出现进度条之类的提示,不过也无需着急。
@ -85,17 +83,17 @@ Ink/Stitch 提供了为 Inkscape 安装插件的功能,用户需首先执行
![Inkscape with the swatches dialogue open, which shows the Madeira Rayon color palette][18]
如果你使用的 Ink/Stitch 是从 Github 下载的 2.0.0 版本,那么下载下来的 ZIP 文件里就包括了色板文件。你只需将其解压到正确的路径:_~/.config/inkscape/palettes/_。如果你需要环形模板可以点击 [此处][19] 下载,并将其保存到 _~/.config/inkscape/templates_ 目录下.
如果你使用的 Ink/Stitch 是从 Github 下载的 2.0.0 版本,那么下载下来的 ZIP 文件里就包括了色板文件。你只需将其解压到正确的路径:`~/.config/inkscape/palettes/`。如果你需要环形模板,可以点击 [此处][19] 下载,并将其保存到 `~/.config/inkscape/templates` 目录下。
重新启动 Inkscape可在 _<ruby>文件<rt>File</rt></ruby> &gt; <ruby>由模板新建<rt>New From Template</rt></ruby>_ 下找到该模板。
重新启动 Inkscape可在 <ruby>文件<rt>File</rt></ruby> > <ruby>由模板新建<rt>New From Template</rt></ruby> 下找到该模板。
### Ink/Stitch 绣字
到目前为止,绣花设计最简单也最常用的方法就是使用 Ink/Stitch 的 _<ruby>文字缝制<rt>Lettering</rt></ruby>_ 功能。该功能位于 _<ruby>拓展<rt>Extensions</rt></ruby> &gt; Ink/Stitch &gt; <ruby>文字缝制<rt>Lettering</rt></ruby>_。绣花文字缝制可不是一件简单事儿,它其实就是所谓的缎面绣字,需要做好特殊的文字设置。
到目前为止,绣花设计最简单也最常用的方法就是使用 Ink/Stitch 的 <ruby>文字缝制<rt>Lettering</rt></ruby> 功能。该功能位于 <ruby>扩展<rt>Extensions</rt></ruby> > Ink/Stitch > <ruby>文字缝制<rt>Lettering</rt></ruby>。绣花文字缝制可不是一件简单事儿,它其实就是所谓的缎面绣字,需要做好特殊的文字设置。
![Inkscape with a “Chopin” glyph for satin stitching defined for the Lettering function][20]
你可以将路径转换为缎面绣但是这种方法比使用文字缝制功能还要繁琐许多。多亏了社区的活跃2021 年 5 月份发布的 Ink/Stitch 2.0 版本预置了更多的字体。2.0 版本还增加了 _<ruby>拓展<rt>Extensions</rt></ruby> &gt; Ink/Stitch &gt; <ruby>字体管理<rt>Font Management</rt></ruby>_ 功能,让用户更方便地管理这些字体。
你可以将路径转换为缎面绣但是这种方法比使用文字缝制功能还要繁琐许多。多亏了社区的活跃2021 年 5 月份发布的 Ink/Stitch 2.0 版本预置了更多的字体。2.0 版本还增加了 <ruby>扩展<rt>Extensions</rt></ruby> > Ink/Stitch > <ruby>字体管理<rt>Font Management</rt></ruby> 功能,让用户更方便地管理这些字体。
此外,还有制作字体的功能,但是你需要了解如何使用 Inkscape 设计字体,可在 [此处][21] 浏览相关英文教程。这里只给出大概的介绍:首先创建一个 SVG 字体,接着将其储存在 JSON 文件中,这样便可以在 Ink/Stitch 字体管理功能中使用。
@ -105,15 +103,15 @@ Ink/Stitch 提供了为 Inkscape 安装插件的功能,用户需首先执行
### 绣制区域、路径等对象
Ink/Stitch 最容易实现的就是绣制区域或者路径。你需要做的只是画出路径。如果你使用的是形状,那么你需要将其转换成路径,然后执行如下操作:_<ruby><rt>Extensions</rt></ruby> &gt; Ink/Stitch &gt; <ruby>填充工具<rt>Fill Tools</rt></ruby> &gt; <ruby>分离填充对象<rt>Break Apart Fill Objects…<ruby><rt>_,将路径分割成若干部分。
Ink/Stitch 最容易实现的就是绣制区域或者路径。你需要做的只是画出路径。如果你使用的是形状,那么你需要将其转换成路径,然后执行如下操作:<ruby><rt>Extensions</rt></ruby> > Ink/Stitch > <ruby>填充工具<rt>Fill Tools</rt></ruby> > <ruby>分离填充对象<rt>Break Apart Fill Objects…</rt></ruby>,将路径分割成若干部分。
虽然 Inkscape 也有 _<ruby>路径<rt>Path</rt></ruby> &gt; <ruby>分离<rt>Break apart</rt></ruby>_ 功能,但是在这种情况下并不可行。
虽然 Inkscape 也有 <ruby>路径<rt>Path</rt></ruby> > <ruby>分离<rt>Break apart</rt></ruby> 功能,但是在这种情况下并不可行。
接下来,运行 Ink/Stitch 内置模拟器:_<ruby><rt>Extensions</rt></ruby> &gt; Ink/Stitch &gt; <ruby>可视化并导出<rt>Visualise and Export</rt></ruby> &gt; <ruby>模拟器/实际预览<rt>Simulator/Realistic Preview</rt></ruby>_.
接下来,运行 Ink/Stitch 内置模拟器:<ruby><rt>Extensions</rt></ruby> > Ink/Stitch > <ruby>可视化并导出<rt>Visualise and Export</rt></ruby> > <ruby>模拟器/实际预览<rt>Simulator/Realistic Preview</rt></ruby>
![The new Fedora logo as Stitch Plan Preview][23]
注意,模拟器运行时需要占用大量的系统资源,而且启动时间也比较长。其实,以下功能操作起来会更加简便:_<ruby><rt>Extensions</rt></ruby> &gt; Ink/Stitch &gt; <ruby>可视化并导出<rt>Visualise and Export</rt></ruby> &gt; <ruby>线迹计划预览<rt>Stitch Plan Preview</rt></ruby>_。该功能会在文件外部对线条进行渲染。
注意,模拟器运行时需要占用大量的系统资源,而且启动时间也比较长。其实,以下功能操作起来会更加简便:<ruby><rt>Extensions</rt></ruby> > Ink/Stitch > <ruby>可视化并导出<rt>Visualise and Export</rt></ruby> > <ruby>线迹计划预览<rt>Stitch Plan Preview</rt></ruby>。该功能会在文件外部对线条进行渲染。
![Nicubunus Fedora hat icon as embroidery. The angles for the stitches of the head part and the brim are different so that it looks more realistic. The outline is done in Satin stitching][24]
@ -123,11 +121,11 @@ Ink/Stitch 会使用连续的线条(非虚线)将每个笔画转换成之字
![Parameter setting dialogue and on the right the Fedora logo shape embroidered as Zig-Zag line][25]
这个方法虽然简单,但绝不是最好的选择。最好的选择是使用缎面工具,该功能可以在 _<ruby>拓展<rt>Extensions</rt></ruby> &gt; <ruby>缎面工具<rt>Satin Tools</rt></ruby>_ 找到。其中,转换功能又是重中之重,它可以将路径转换为缎面笔画。
这个方法虽然简单,但绝不是最好的选择。最好的选择是使用缎面工具,该功能可以在 <ruby>扩展<rt>Extensions</rt></ruby> > <ruby>缎面工具<rt>Satin Tools</rt></ruby> 找到。其中,转换功能又是重中之重,它可以将路径转换为缎面笔画。
![Fedora logo shape as Satin Line embroidery][26]
通过 _<ruby>拓展<rt>Extensions</rt></ruby> &gt; <ruby>缎面工具<rt>Satin Tools</rt></ruby> &gt; <ruby>旋转缎纹路径<rt>Flip Satin Column Rails</rt></ruby>_,你还可以改变线迹的方向。这样做可以凸显缎面绣的立体感,典型的例子就是泡芙刺绣(一种非常具有立体感的刺绣)。支持这种功能的机器还可以为绣花时产生的多余的连线线迹标记出修剪记号。这些记号正是从 Ink/Stitch 自身符号库里安装得到的符号。
通过 <ruby>扩展<rt>Extensions</rt></ruby> > <ruby>缎面工具<rt>Satin Tools</rt></ruby> > <ruby>旋转缎纹路径<rt>Flip Satin Column Rails</rt></ruby>,你还可以改变线迹的方向。这样做可以凸显缎面绣的立体感,典型的例子就是泡芙刺绣(一种非常具有立体感的刺绣)。支持这种功能的机器还可以为绣花时产生的多余的连线线迹标记出修剪记号。这些记号正是从 Ink/Stitch 自身符号库里安装得到的符号。
### Ink/Stitch 线迹库
@ -135,33 +133,25 @@ Ink/Stitch 会使用连续的线条(非虚线)将每个笔画转换成之字
* **平针**:平针用于边缘装饰,沿直线或曲线缝制出一排短小的线迹,由此组成的一条条虚线就是平针。虚线的尺寸可大可小。
![A running stitch each dashed line will be converted in such one][27]
![A running stitch each dashed line will be converted in such one][27]
* **豆针**:豆针可用于边缘装饰或添加设计细节。使用平针来回缝制就是豆针,这种缝法会增加线迹的厚度。
![Bean Stitches creating a thicker line][28]
![Bean Stitches creating a thicker line][28]
* **手工针**在该模式下Ink/Stitch 会将路径的每个节点当作穿针点;这些节点也正是针穿入的位置。
![In manual mode each node will be the needle penetration point][29]
![In manual mode each node will be the needle penetration point][29]
* **E 字针**E 字针是一种简单但十分好用的绷缝线迹,用于贴花织物。这种线迹多用于婴儿装,因为婴儿的皮肤比较敏感。
![E-Stitch mostly used for applications on baby cloths, soft but strong connection][30]
![E-Stitch mostly used for applications on baby cloths, soft but strong connection][30]
### 绣花用线列表
有些绣花机尤其是商用的绣花机根据设计的需要可以提前适配不同的针线。必要时这类机器会自动切换使用合适的针线。有些绣花文件格式支持这一功能但有些并不支持。Ink/Stitch 可以将用户设置好的线条列表应用到绣花设计中。
如果你想在现有的设计上导入线条列表,可执行如下操作:_<ruby><rt>Extensions</rt></ruby> &gt; Ink/Stitch &gt; <ruby>导入线条列表<rt>Import Threadlist</rt></ruby>_。同样的,线条列表也可以导出:_<ruby>另存为 zip 文件,打包多种不同的文件格式<rt>Save As different file formats as *.zip</rt></ruby>_。当然也可以将其打印出来_<ruby><rt>Extensions</rt></ruby> &gt; Ink/Stitch &gt; <ruby>可视化并导出<rt>Visualise and Export</rt></ruby> &gt; <ruby>打印 PDF<rt>Print PDF</rt></ruby>_
如果你想在现有的设计上导入线条列表,可执行如下操作:<ruby><rt>Extensions</rt></ruby> > Ink/Stitch > <ruby>导入线条列表<rt>Import Threadlist</rt></ruby>。同样的,线条列表也可以导出:<ruby>另存为<rt>Save As</rt></ruby> 不同的文件格式,如 *.zip。当然也可以将其打印出来<ruby><rt>Extensions</rt></ruby> > Ink/Stitch > <ruby>可视化并导出<rt>Visualise and Export</rt></ruby> > <ruby>打印 PDF<rt>Print PDF</rt></ruby>
### 结语
@ -174,7 +164,7 @@ via: https://fedoramagazine.org/make-more-with-inkscape-ink-stitch/
作者:[Sirko Kemter][a]
选题:[lujun9972][b]
译者:[aREversez](https://github.com/aREversez)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,117 @@
[#]: subject: "Linux Kernel 6.0 RC1 is out with Run-Time Kernel Verification"
[#]: via: "https://www.debugpoint.com/linux-kernel-6-0-rc1/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Linux Kernel 6.0 RC1 is out with Run-Time Kernel Verification
======
Linus Torvalds releases Linux Kernel 6.0 RC1 for everyone to test, and heres a feature recap.
![Linux Kernel 6.0][1]
Following the [Linux Kernel 5.19][2] released a few days back, Linus [released the first release candidate][3] of Linux 6.0 for testing. It officially closes the merge window for this release while you test.
### Why 6.0?
Usually, the mainline Kernel version increases by the minor version and this release should have been Kernel 5.20. However, Linus decided to increase the significant version number, hence the Kernel 6.0.
> Despite the major number change, theres nothing fundamentally different about this release Ive long eschewed the notion that major numbers are meaningful, and the only reason for a “hierarchical” numbering system is to make the numbers easier to remember and distinguish. Which is why when the minor number gets to around 20 I prefer to just increment the major number instead and reset to something smaller.
Lets take a look at whats in store.
### Linux Kernel 6.0 RC1 New Features
#### Processors
AMD Zen systems gets a [performance boost][4] with updated NUMA balancing in the Kernel scheduler.
The Ratbleed speculative execution exploits fixing [continues][5] in this release affecting Intel 8th Gen+ and AMD Zen 1+ CPU family. Although the Ratbleed has not yet been found in the wild (only in Lab), the fix continues in this Kernel.
Lenovo and AMD [bring][6] the Automatic Mode Transition (AMT) support for Ryzen power ThinkPad laptops. This feature should give firmware-based power handling in those laptops with better efficiency.
New audio hardware [support][7] for AMD Ryzen 7000 desktop processors (Raphael) lands in this release with ACP 6.x support.
AMD is [preparing][8] for the release day with additional Instruction based sampling support for the Zen 4 series.
More CPU [temperature monitoring code][9] lands for AMD 17th and 19th family of models.
Initial work starts landing for Lenovos ARM Laptop X13 featuring Qualcomm Snapdragon 8cx Gen3 (SC8280XP) CPU.
Likewise, in all releases, a bunch of SOC chips get support in Linux Kernel 6. The most notable ones include NXP i.MX93 SoC (primarily used for smart devices in home solutions).
Heres a quick list (not complete) of the SOCs that gets [support][10] in this instalment.
* Broadcom SOCs for broadband devices * BCM63178 * BCM63158 * BCM4912 * BCM6858 * BCM6878 * BCM6846 * BCM63146 * BCM6856 * BCM6855 * BCM6756 * BCM63148 * BCM6813
* Allwinners H616 (IPTV, OTT streaming)
* Marvell Prestera 98DX2530
* Google Chameleon v3 FPGA
In addition, a bunch of RISC-V processor code was introduced with an aim to support it in future.
#### GPU
Work continues in this Kernel release for Intel DG2/Alchemist and AMD RDNA3 graphics cards; the support is entirely not there but is in progress for future versions.
A bunch of frame buffer device driver [update][11] (mostly fixes) arrives for Atari GPUs. Most noteworthy are the patchsets to fix VGA modes, colour handling and numerous code clean-ups.
Intel Meteor Lake GPU [support][12] is starting up in this release.
#### Storage and file systems
Like all releases, the famous and supported file systems are updated and improved.
Since the usage of SSDs is increasing, the flash-friendly file system (F2FS) [enhances][13] memory handling, garbage collection optimization and more.
One Microsoft employee provides a [patch][14] to improve locking performance & reliability for CIF/SMB3 protocol to improve multi-channel operation over the network.
#### Additional Changes
Other noteworthy changes across this Kernel release include early work for Wi-Fi 7 support, more feature updates on the ongoing random number generation and setting up system hostname via Kernel parameter.
Furthermore, one of the vital features is the “Run-Time Verification” codebase which helps Linux run in safety-critical infrastructure. The method takes an approach where the system specification instruction set is compared against the actual execution instruction set by re-implementing instruction sets at run-time. This is based on a paper which you can read [here][15]. The actual patch is present on this [page][16].
### Download
You can download the source tree from the following page:
| - | - | - | - | - |
| :- | :- | :- | :- | :- |
| mainline: | 6.0-rc1 | [tarball] | [patch] | [browse] |
If you are running benchmarks, testing new hardware and finding issues, report to the Kernel mailing list.
The Linux Kernel 6.0 is expected to be released by the beginning of Q4 2022, i.e. October timeframe. Hence, Ubuntu 22.10 may get this version (although I am doubtful about that).
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/linux-kernel-6-0-rc1/
作者:[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/2022/08/kernel6rc1.jpg
[2]: https://www.debugpoint.com/2022/05/linux-kernel-5-18/
[3]: https://lore.kernel.org/lkml/CAHk-=wgRFjPHV-Y_eKP9wQMLFDgG+dEUHiv5wC17OQHsG5z7BA@mail.gmail.com/T/#u
[4]: https://lore.kernel.org/lkml/Yufc5Mq1aqLVV%2FOv@gmail.com/T/#u
[5]: https://lore.kernel.org/lkml/Yvd%2Fg8RODN%2FpSkCX@gmail.com/T/#u
[6]: https://lore.kernel.org/lkml/19d29009-ab84-fffc-82dd-9754e65b092e@redhat.com/
[7]: https://www.phoronix.com/news/AMD-Raphael-Audio-Driver-Linux
[8]: https://lkml.org/lkml/2022/8/4/694
[9]: https://lore.kernel.org/lkml/Yue6jQd37wpssGeZ@zn.tnic/
[10]: https://lore.kernel.org/linux-arm-kernel/CAK8P3a1DVcc=AV29AJJxMzBVoU-grFaNet0ndxPgPFvpK-ZANQ@mail.gmail.com/T/
[11]: https://lore.kernel.org/lkml/Yu7J2Yj6UyAiE2Ne@ls3530/
[12]: https://lists.freedesktop.org/archives/dri-devel/2022-July/364441.html
[13]: https://lore.kernel.org/lkml/YvE6fO1r0znOdr60@google.com/
[14]: https://lore.kernel.org/lkml/CAH2r5mvaTWyWnPpYk=OPCbud85LEo5Oj=K2ZK56jmri6452zRQ@mail.gmail.com/
[15]: https://dl.acm.org/doi/abs/10.1007/978-3-030-30446-1_17
[16]: https://lore.kernel.org/lkml/20220803112014.7ffed04e@gandalf.local.home/

View File

@ -0,0 +1,69 @@
[#]: subject: "My practical advice for new programmers"
[#]: via: "https://opensource.com/article/22/8/coding-advice-new-programmers"
[#]: author: "Sachin Samal https://opensource.com/users/sacsam005"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
My practical advice for new programmers
======
Being an efficient and curious problem-solver will help you succeed as a programmer.
Have you ever been stuck or gone blank trying to solve a problem related to something that you just learned from YouTube or Google tutorials? You seem to understand every line of the code, but without the tutorial, you find yourself in a difficult position. If you have looked at problem-solving in HackerRank or LeetCode, you can relate to how an aspiring programmer feels seeing those challenges for the first time. Everything seems out of the box! Being unable to apply what you learned from a tutorial might make you doubt your knowledge and abilities as you begin to understand the basics of the programming language you're learning.
### Putting programming tutorials into practice
Should you start back at the beginning? If you do that, you may soon find that you've covered those topics more than enough times. Starting from scratch is not necessarily a waste, but how can you be more efficient?
Memorization is simply not the solution in programming. Having said that, you cannot neglect the importance of getting used to syntaxes. There is a significant difference between memorizing and making a habit. The latter is difficult to break. Make a habit of playing around with the programming language's regular syntaxes, functions, methods, patterns, paradigms, and constructs to ace it. Acing a programming language involves a lot of creativity and practice. It is essential to practice syntaxes until they flow as smoothly in your brain as the blood runs through your veins.
### How problem-solving works
How you approach solutions depends on many factors. These factors could be anything from technical constraints to user needs. The world has innumerable problems and there are many ways of solving each. Deciding on the best way involves extensive problem-solving skills.
Here is a simple example. You need to achieve a result of **6** by *adding* two numbers. You can accomplish this several ways:
**3+3=6** or **4+2=6** or **5+1=6**
Similarly, say you need to achieve a result of **6** by using two numbers and either subtraction, division, or multiplication. You have many options, including:
**8-2=6** or **12/2=6** or **3*2=6**
Each solution may have a different constraint. You must consider all of these when developing effective real-world solutions. Is the solution feasible? Accessible? Interoperable? Scalable? Minimizing the constraint and developing an optimal solution depends on the business need and type of problem.
### Practice matters
The goal of programming is much more than problem-solving. Understanding *how* the code functions from an engineering perspective is always an advantage. That's where code reviews come into play at an enterprise level. The bare minimum requirement in programming is to have basic coding knowledge, including the language's syntaxes, functions, and methods. At the end of the day, coding is what you *do*, so practicing always helps improve your skills. Fluency in writing and developing complex solutions comes with consistent practice and learning.
### Learning to code
My goal for writing and sharing this article is to encourage new programmers to seek the great problem solver in themselves. Please don't stop believing in yourself.
There are many habits to nurture for successful coding. Here are my ways of staying effective while learning to code:
1. A [cheat sheet][1] of syntaxes, methods, and functions can come in handy.
2. Break problems into smaller parts to make them easier to follow.
3. Try to understand the core concept of how code functions.
4. Try to improvise with your solutions but always stick to the basics in the beginning.
5. Create as many applications and components as possible while practicing.
6. Never copy/paste code from open platforms like stack overflow/exchange, especially without understanding the context.
7. After following the tutorial, try to build everything from scratch. If you manage to accomplish half of it by yourself, that's still an achievement.
Good luck to all of us.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/8/coding-advice-new-programmers
作者:[Sachin Samal][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/sacsam005
[b]: https://github.com/lkxed
[1]: https://opensource.com/downloads/cheat-sheets

View File

@ -0,0 +1,34 @@
[#]: subject: "The Effect of Nvidias Open Source Drivers On Linux Gamers"
[#]: via: "https://www.opensourceforu.com/2022/08/the-effect-of-nvidias-open-source-drivers-on-linux-gamers/"
[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
The Effect of Nvidias Open Source Drivers On Linux Gamers
======
The community will receive an open source driver from Nvidia for the first time with the release of the R515 driver, which should make it easier for Linux users to use Nvidia graphics cards in their computers. It is advantageous for Nvidia to support more open source technological standards. Unfortunately, Nvidia has not consistently embraced open sourcing software, which has led to some controversy in their user group. However, this might be improving with the new R515 driver.
People have been pleading for Nvidia to make their driver software more accessible, like firms like Intel and AMD that offer open source drivers for their goods. But up until now, Nvidias drivers have been closed-source, which doesnt present too many problems for Windows users but makes utilising Nvidia GPUs more difficult to optimise for the Linux community. Unlike AMD drivers, which are open source and enable developers to fully see how the drivers were coded, Nvidia drivers are closed-source, making it impossible for developers to examine the source code of a driver and create their software with a complete understanding of how the drivers were created.
So how will Linux gaming be impacted by Nvidias new R515 drive? Most likely, it wont have a significant impact right away. Nvidia GPUs can be used for gaming on Linux because the company offers Linux drivers, despite the fact that they are proprietary. Numerous Linux distributions, including PopOS, will automatically install Nvidia drivers for the user. However, if Nvidia keeps releasing its drivers as open source software over time, Linux developers will be able to benefit from the advantages that open sourcing drivers has provided for AMD, such as increased compatibility and a variety of driver options, either proprietary or open source, depending on what the user requires. In the same way that AMD and Intel are the most dependable choices on Linux in comparison to Nvidia, being open source can also aid in the development of drivers and boost dependability for Linux.
Because of how amazing Nvidias proprietary drivers have always been on Windows and how great they are generally on Linux, many gamers and Linux users continue to utilise Nvidia GPUs rather than exclusively AMD. Before the R515 driver, there was also a free and open-source Nvidia driver named Nouveau. The official Nvidia proprietary drivers were generally faster and more dependable than this driver. This is most likely caused by Nouveau not being the official open source driver from Nvidia and instead being a product of Nvidia driver reverse engineering. Another drawback of Nouveau is that it does not enable GPU reclocking, which is a major obstacle for customers who want to overclock their Nvidia GPU.
Overall, the news that Nvidia will now officially offer open source drivers is a significant plus. Since the drivers are now open source, the community will be able to assist in the development of new drivers, giving developers far more information about the drivers they are creating applications and games for. Over time, Linux will also gain since it has a high chance of being just as dependable and compatible with Nvidia GPUs as it is with AMD and Intel, which will improve gaming performance and efficiency. Nvidias decision to make its software open source may continue to increase pressure on other tech companies to disclose more information about their products, which will support a more liberal and open future for technology.
--------------------------------------------------------------------------------
via: https://www.opensourceforu.com/2022/08/the-effect-of-nvidias-open-source-drivers-on-linux-gamers/
作者:[Laveesh Kocher][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/laveesh-kocher/
[b]: https://github.com/lkxed

View File

@ -0,0 +1,123 @@
[#]: subject: "A look inside an EPUB file"
[#]: via: "https://opensource.com/article/22/8/epub-file"
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
A look inside an EPUB file
======
EPUB files are a great way to publish content using an open format.
![How to find files in Linux][1]
Image by: Lewis Cowles, CC BY-SA 4.0
eBooks provide a great way to read books, magazines, and other content on the go. Readers can enjoy eBooks to pass the time during long flights and train rides. The most popular eBook file format is the EPUB file, short for "electronic publication." EPUB files are supported across a variety of eReaders and are effectively the standard for eBook publication today.
The EPUB file format is an open standard based on XHTML for content and XML for metadata, contained in a zip file archive. And because everything is based on open standards, we can use common tools to create or examine EPUB files. Let's explore an EPUB file to learn more about it. [A guide to tips and tricks for C programming][2], published earlier this year on Opensource.com, is available in PDF or EPUB format.
Because EPUB files are XHTML content and XML metadata in a zip file, you can start with the `unzip` command to examine the EPUB from the command line:
```
$ unzip -l osdc_Jim-Hall_C-Programming-Tips.epub
Archive: osdc_Jim-Hall_C-Programming-Tips.epub
Length Date Time Name
--------- ---------- ----- ----
20 06-23-2022 00:20 mimetype
8259 06-23-2022 00:20 OEBPS/styles/stylesheet.css
1659 06-23-2022 00:20 OEBPS/toc.xhtml
4460 06-23-2022 00:20 OEBPS/content.opf
44157 06-23-2022 00:20 OEBPS/sections/section0018.xhtml
1242 06-23-2022 00:20 OEBPS/sections/section0002.xhtml
22429 06-23-2022 00:20 OEBPS/sections/section0008.xhtml
[...]
9628 06-23-2022 00:20 OEBPS/sections/section0016.xhtml
748 06-23-2022 00:20 OEBPS/sections/section0001.xhtml
3370 06-23-2022 00:20 OEBPS/toc.ncx
8308 06-23-2022 00:21 OEBPS/images/image0011.png
6598 06-23-2022 00:21 OEBPS/images/image0009.png
[...]
14492 06-23-2022 00:21 OEBPS/images/image0005.png
239 06-23-2022 00:20 META-INF/container.xml
--------- -------
959201 41 files
```
This EPUB contains a lot of files, but much of this is content. To understand how an EPUB file is put together, follow the process flow of an eBook reader:
1. eBook readers need to verify that the EPUB file is really an EPUB file. They verify the file by examining the `mimetype` file at the root of the EPUB archive. This file contains just one line that describes the MIME type of the EPUB file:
```
application/epub+zip
```
2. To locate the content, eBook readers start with the `META-INF/container.xml` file. This is a brief XML document that indicates where to find the content. For this EPUB file, the `container.xml` file looks like this:
```
<?xml version="1.0" encoding="UTF-8"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<rootfiles>
<rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/>
</rootfiles>
</container>
```
To make the `container.xml` file easier to read, I split the single line into multiple lines and added some spacing to indent each line. XML files don't really care about extra white space like new lines and spaces, so this extra spacing doesn't affect the XML file.
3. The `container.xml` file says the root of the EPUB starts with the `content.opf` file in the OEBPS directory. The OPF extension is because EPUB is based on the Open Packaging Format, but the `content.opf` file is really just another XML file.
4. The `content.opf` file contains a complete manifest of the EPUB contents, plus an ordered table of contents, with references to find each chapter or section. The `content.opf` file for this EPUB is quite long, so I'll show just a bit of it here as an example.
The XML data is contained within a `<package>` block, which itself has a `<metadata>`block, the `<manifest>` data, and a `<spine>`block that contains the eBook's table of contents:
```
<?xml version="1.0" encoding="UTF-8"?>
<package unique-identifier="unique-identifier" version="3.0" xmlns="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:opf="http://www.idpf.org/2007/opf">
<metadata>
<dc:identifier id="unique-identifier">osdc002</dc:identifier>
<dc:title>Tips and Tricks for C Programming</dc:title>
<dc:creator>Jim Hall</dc:creator>
<dc:language>English</dc:language>
<meta property="dcterms:modified">2022-06-23T12:09:13Z</meta>
<meta content="LibreOffice/7.3.0.3$Linux_X86_64 LibreOffice_project/0f246aa12d0eee4a0f7adcefbf7c878fc2238db3 (libepubgen/0.1.1)" name="generator"/>
</metadata>
<manifest>
...
<item href="sections/section0001.xhtml" id="section0001" media-type="application/xhtml+xml"/>
<item href="images/image0003.png" id="image0003" media-type="image/png"/>
<item href="styles/stylesheet.css" id="stylesheet.css" media-type="text/css"/>
<item href="toc.ncx" id="toc.ncx" media-type="application/x-dtbncx+xml"/>
...
</manifest>
<spine toc="toc.ncx">
<itemref idref="section0001"/>
<itemref idref="section0002"/>
<itemref idref="section0003"/>
...
</spine>
</package>
```
You can match up the data to see where to find each section. Thats how EPUB readers do it. For example, the first item in the table of contents references `section0001` which is defined in the manifest as located in the `sections/section0001.xhtml` file. The file doesnt need to be named the same as the idref entry, but thats how LibreOffice Writers automated process created the file. (You can see in the metadata that this EPUB was created with LibreOffice version 7.3.0.3 on Linux, which can export content as EPUB files.)
### The EPUB format
EPUB files are a great way to publish content using an open format. The EPUB file format is XML metadata with XHTML content, inside a zip container. While most technical writers use tools to create EPUB files, because EPUB is based on open standards means you can create your own EPUB files in some other way.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/8/epub-file
作者:[Jim Hall][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/jim-hall
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/find-file-linux-code_magnifying_glass_zero.png
[2]: https://opensource.com/downloads/guide-c-programming

View File

@ -0,0 +1,347 @@
[#]: subject: "Check Disk Space Using Agedu In Linux"
[#]: via: "https://ostechnix.com/agedu-find-out-wasted-disk-space-in-linux/"
[#]: author: "sk https://ostechnix.com/author/sk/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Check Disk Space Using Agedu In Linux
======
Find Wasted Disk Space With Agedu
Running out of disk space? It is time to find out which directories and files are occupying the most disk space. Fortunately, checking Linux disk space is made easier with **Agedu** utility. This guide explains **what is Agedu**, how to install Agedu, and how to **check disk space** in Linux and **find wasted disk space using Agedu**.
### What Is Agedu?
**Agedu** is a command line utility that tracks down the wasted disk space in your Linux system. Agedu works just like as [du command][1]. It scans your hard disk and displays the disk usage result in the Terminal window.
Agedu has a built-in web server, so we can display the result as a neatly organized HTML report in different colors in our web browser.
It distinguishes the data in different colors. The red color represents the data that has been accessed a long time ago, Green represents the recently accessed data, and the spectrum through orange and yellow represents points in between.
By analyzing the colored output, we can immediately get a grasp of which directories and files have been used frequently and which data have been stagnated.
Once we find out the stagnated data, we can simply delete them if they are no longer needed or move them safely to an archive medium to free up some disk space.
Agedu has both CLI and web-based interface. You can view the disk usage report either from the Terminal window or from a web browser.
Agedu is a cross-platform utility. It works on Linux, Unix and Windows operating systems. It is an open source program and is released under MIT license.
Let us go ahead and see how to use agedu to find wasted disk space in Linux with practical examples.
### Install Agedu in Linux
Agedu is packaged for popular Linux distributions and is available in the default repositories of some Linux versions.
**Install Agedu in Arch Linux:**
Agedu is available in AUR, so you can install it on Arch Linux, EndeavourOS and Manjaro Linux an **AUR** helper programs, such as [Paru][2] or [Yay][3].
```
$ paru -S agedu
```
Or,
```
$ yay -S agedu
```
**Install Agedu in Debian, Ubuntu, Linux Mint, Pop OS:**
Agedu is available in the default repositories of Debian-based systems like Ubuntu, Linux Mint, and Pop OS. To install Agedu in Debian and Ubuntu, run:
```
$ sudo apt install agedu
```
**Install Agedu in Fedora, RHEL and its clones:**
On RPM based distributions like Fedora, RHEL, CentOS, AlmaLinux, Rocky Linux, add **[EPEL]** repository using command:
```
$ sudo dnf install epel-release
```
And then, install agedu as shown below.
```
$ sudo dnf install agedu
```
On older RPM-based systems, replace `dnf` with `yum` in the above commands.
### Check Disk Space With Agedu In Linux
The usage of agedu utility is trivial. The syntax of agedu is:
```
agedu [ options ] action [action...]
```
Let us see some examples.
Open the Terminal and run the following command to scan $HOME directory.
```
$ agedu -s /home/ostechnix/
```
**Sample output:**
```
Built pathname index, 6731 entries, 684647 bytes of index
Faking directory atimes
Building index
Final index file size = 1475496 bytes
```
![Scan A Directory With Agedu In Linux][4]
This command will create data index file called "`agedu.dat` " in the current working directory.
#### View Linux Disk Space Usage Reports With Agedu
To query the disk space report from the index file which we created in the previous step, run:
```
$ agedu -t /home/ostechnix/
```
**Sample output:**
```
30288 /home/ostechnix/.cache
6804 /home/ostechnix/.config
3875876 /home/ostechnix/.docker
40 /home/ostechnix/.gnupg
864 /home/ostechnix/.local
12 /home/ostechnix/.password-store
76 /home/ostechnix/.pki
512 /home/ostechnix/Downloads
604 /home/ostechnix/descent
5844 /home/ostechnix/dotfile
39076 /home/ostechnix/grub2-themes
335188 /home/ostechnix/snap
4684516 /home/ostechnix
```
Let us narrow down the report more specifically. Say for example, to list the files which are not viewed or accessed for last 2 days and more, run:
```
$ agedu -t /home/ostechnix/ -a 2d
```
**Sample output:**
```
15216 /home/ostechnix/.cache
5740 /home/ostechnix/.config
51052 /home/ostechnix/.docker
40 /home/ostechnix/.gnupg
328 /home/ostechnix/.local
12 /home/ostechnix/.password-store
512 /home/ostechnix/Downloads
604 /home/ostechnix/descent
5844 /home/ostechnix/dotfile
39076 /home/ostechnix/grub2-themes
335028 /home/ostechnix/snap
842756 /home/ostechnix
```
Similarly, just replace letter **"d"** with **"w"**for**weeks, "m"**for**months, "y"**for**years**.
For instance, you can view the files which are not accessed for the past two weeks using this command:
```
$ agedu -t /home/ostechnix/ -a 2w
```
#### Get Disk Space Reports Of Particular File Types
Agedu offers many useful options to track down the disk usage. One among them is view reports of a particular file type.
For example, let us generate the report of txt files using command:
```
$ agedu -s . --exclude '*' --include '*.txt'
```
**Sample output:**
```
Built pathname index, 714 entries, 59257 bytes of index
Faking directory atimes
Building index
Final index file size = 189056 bytes
```
The above command will scan the disk usage taken only by the .txt files and excludes all other files in the current directory.
Likewise, to scan a particular path, just specify it as shown below.
```
$ sudo agedu -s /home/ostechnix/Downloads --exclude '*' --include '*.txt'
```
To view the report, run:
```
$ sudo agedu -t /home/ostechnix/Downloads
```
#### View Disk Space Usage Reports In Web Browser
To generate HTML report and view it on the web browser, run:
```
$ agedu -w --auth none
```
You can use just **"sudo agedu -w"**, however **"--auth none"** option will eliminate the 403 forbidden error.
**Sample output:**
```
URL: http://localhost:33239/
```
The HTML report of disk usage has been generated. Let us take a look at it. Open up your web browser and point it to **http://localhost:33239** or **http://IP-Address:33239**. Please note that different port number will be generated each time you run this command.
![View Disk Space Report Using Agedu In Web Browser][5]
Click on any directory to view its sub directories disk usage.
![View Disk Space Report Of Sub-directories Using Agedu In Web Browser][6]
As you see above, the most used disk space is showed on the top followed by subsequent smaller results. To exit Agedu, go back to the Terminal window where the Agedu is running and press **CTRL+D**.
Once you find out data which are no longer used for a long time, you can just delete them or move them to any external medium.
#### Configure Password Authentication For Agedu Web Interface
Agedu web interface doesn't has authentication by default. However, It has an option to allow us to enable password protection to view the reports in web browser.
Enter the following command to generate a password to access agedu's web interface.
```
$ agedu -w --address localhost:46484 --auth basic
```
This command will automatically create a username with password as shown in the output below. Please note down the username and password.
```
Username: agedu
Password: 29tj42tdtgrgpa3y
URL: http://localhost:46484/
```
Now, open your web browser and point it to **http://locahost:46484**. This time it will ask you to enter the username and its password.
![Configure Password Authentication For Agedu Web Interface][7]
Once you entered the valid username and its password, you can access the agedu web interface.
#### Define Custom Username And Password
I don't like the default username and password. I want to define my own. Can I be able to do that? Of course you can.
To set a custom username with password, run:
```
$ agedu -w --address locahost:46484 --auth basic --auth-fd 0
```
Next, enter your custom user and its password as shown below.
```
ostechnix:password
```
Here **ostechnix** is my username and its password is **password**. It's just an example. I recommend you to use a strong password.
And then, press `CTRL+D` to exit and return back to Terminal.
From now, you can access the agedu's web interface using your custom username and password.
#### Remove Index Files
After deleting the unused files/directories, remove the index file generated by agedu:
```
$ agedu -R
```
You can also combine `-w` and `-R` options to view the disk space report and delete the index file after viewing the report like below.
```
$ agedu -s /home/ostechnix -w -R
```
The above command scans the HOME directory, builds its index, serves disk report via web browser, and cleans it up once you close the browser window.
#### Set Custom Port For Agedu
As you see before, agedu serves the result via different random ports each time. You can set a particular port of your liking if you want to.
To set a port for agedu, run:
```
$ agedu -w --address localhost:1234 --auth none
```
Here, 1234 is the custom port. Replace it with your own.
**Sample output:**
```
URL: http://localhost:1234/
```
Or just specify the actual IP address.
```
$ sudo agedu -w --address 192.168.1.40:1234
```
Now, you can view the report by visiting the URL - **http://localhost:1234** or **http://192.168.1.40:1234** from your browser.
To exit Agedu, go the terminal where Agedu is running and press **CTRL+D**.
For more details, refer Agedu manual page.
```
$ man agedu
```
### Conclusion
Checking Linux disk space once in a while will help you to clean up unnecessary junk in your hard drive. With the help of Agedu, we can easily check disk space in Linux and track down the wasted disk space and finally remove them if they no longer needed.
**Resource:**
* [Agedu home page][8]
--------------------------------------------------------------------------------
via: https://ostechnix.com/agedu-find-out-wasted-disk-space-in-linux/
作者:[sk][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://ostechnix.com/author/sk/
[b]: https://github.com/lkxed
[1]: https://ostechnix.com/find-size-directory-linux/
[2]: https://ostechnix.com/how-to-install-paru-aur-helper-in-arch-linux/
[3]: https://ostechnix.com/yay-found-yet-another-reliable-aur-helper/
[4]: https://ostechnix.com/wp-content/uploads/2022/08/Find-Wasted-Disk-Space-With-Agedu-In-Linux.png
[5]: https://ostechnix.com/wp-content/uploads/2022/08/View-Disk-Space-Report-Using-Agedu-In-Web-Browser.png
[6]: https://ostechnix.com/wp-content/uploads/2022/08/View-Disk-Space-Report-Of-Sub-directories-Using-Agedu-In-Web-Browser.png
[7]: https://ostechnix.com/wp-content/uploads/2022/08/Configure-Password-Authentication-For-Agedu-Web-Interface.png
[8]: http://www.chiark.greenend.org.uk/~sgtatham/agedu/

View File

@ -0,0 +1,132 @@
[#]: subject: "Marktext is an Excellent Editor Even for Those Who Dont Know Markdown"
[#]: via: "https://itsfoss.com/marktext-editor/"
[#]: author: "Abhishek Prakash https://itsfoss.com/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Marktext is an Excellent Editor Even for Those Who Dont Know Markdown
======
Another Markdown editor? Have we not seen all kinds of Markdown editors already?
I understand that feeling. If you are a Markdown lover, from [Joplin][1] to [Zettlr][2], you have tried most of them. And if you are not a Markdown fan, you probably dont care about these editors.
Markdown is an excellent markup language specially for people who write for the web. I am not going to go into the details here. We have an [excellent Markdown starters guide][3] if you are interested in learning more about it.
My focus here is on introducing you to (another) Markdown editor, Its called [Marktext][4] and it is an Electron app (dont hate me just yet).
I found it to be an excellent editor. It works as good as it looks. Let me share my experience and its features.
### Marktext: A Markdown editor for everyone
Hate [Electron framework][5] as much as possible but you cannot deny that Electron-based applications have a clean, modern interface.
![Marktext interface][6]
I prefer dark mode and hence I switched the theme. There are six themes in total for you to choose from.
![Marktext dark theme][7]
You can start writing the text immediately. If you dont remember the text, dont worry. Just use the insert option with @ and it will give you a number of options such as:
* Headings
* Divider line
* Table
* Mathematical equations
* HTML block
* Code block
* Quote block
* Lists
* Checklist
* Diagrams using vega-lite.js, flowchart.js, js-sequence and PlantUML
![Use various document elements in the editor by pressing @][8]
Select part of text and it gives you additional formatting option to change the text to bold, italic, underline, strike out. You can also highlight the text with yellow background text, convert them in inline code or inline math and create hyperlinks.
![Text formatting options][9]
Marktext also supports images. Though you know that images are not part of markdown (.md) file. They are external elements but you have the option to create a local assets folder in the same location where your Markdown file is saved.
![Images are supported too][10]
Adding image could have been made easier by including it in the insert menu. At the monet, you can add images by select texting and chosing the image option from the format options or use Ctrl+Shift+I keys. There is no scope for adding alt text or captions to the images. This should be improved.
I liked the tables feature in Marktext. You can insert table with predefined size. If you changed your mind, you can resize it as easily. You can move the rows and columns, all with mouse drag and drop without touching the underlying code.
![Tables are very well supported in Marktext][11]
You can enable the sidebar view. The sidebar gives you three options. You can open folders containing multiple markdown files, perform a global search in all the files in the opened folder and show table of contents for the currently opened file. The table of content is automatically generated based on the subheadings.
![Sidebar view has three options: Show folder content, global search and table of content][12]
The gear icon at the bottom gives you additional settings to configure the editor. You can choose the themes, change image settings, views, enable auto-save and modify many more settings.
![Configuration and settings][13]
### Installing Marktext
Marktext is a cross-platform, open source application. Along with Linux, it is available for Windows and macOS.
For Linux, you get the options of AppImage and Flatpak. You can get the AppImage from[the release page][14].
I chose the Flatpak version for better system integration. And it did work well because Marktext automatically became the default editor for .md files on my Ubuntu 22.04 system.
Please ensure that you have Flatpak support enabled on your system and then add Flathub repo:
```
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
```
After that, use the command below to install it on your system:
```
flatpak install flathub com.github.marktext.marktext
```
If you dont like it, you can remove it using this command:
```
fkatpak uninstall com.github.marktext.marktext
```
### Verdict
There are plenty of small features like word count, math latex, spell checker or copy-pasting as markdown or HTML and I leave them up to you to discover.
Ill be honest. Despite using Markdown for writing articles for years, I dont remember all the syntaxes. I remember the common ones for headings, lists, code block etc but if I have to create a table, Ill have to search the web.
I have [experimented with a number of markdown editors][15] and there are plenty of good ones there. However, I took an instant liking to Marktext and it is going to be on my system for a long time.
If you try it, do share your experience in the comment section.
--------------------------------------------------------------------------------
via: https://itsfoss.com/marktext-editor/
作者:[Abhishek Prakash][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/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/joplin/
[2]: https://itsfoss.com/zettlr-markdown-editor/
[3]: https://itsfoss.com/markdown-guide/
[4]: https://github.com/marktext/marktext/
[5]: https://www.electronjs.org/
[6]: https://itsfoss.com/wp-content/uploads/2022/08/marktext-interface.png
[7]: https://itsfoss.com/wp-content/uploads/2022/08/marktext-dark-theme.png
[8]: https://itsfoss.com/wp-content/uploads/2022/08/marktext-insert-options.png
[9]: https://itsfoss.com/wp-content/uploads/2022/08/text-formatting-options-marktext.png
[10]: https://itsfoss.com/wp-content/uploads/2022/08/images-in-marktext.png
[11]: https://itsfoss.com/wp-content/uploads/2022/08/tables-in-marktext.png
[12]: https://itsfoss.com/wp-content/uploads/2022/08/sidebar-view-marktext.png
[13]: https://itsfoss.com/wp-content/uploads/2022/08/marktext-settings.png
[14]: https://github.com/marktext/marktext/releases
[15]: https://itsfoss.com/best-markdown-editors-linux/