Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang 2019-12-01 19:27:22 +08:00
commit 9ca714806f
11 changed files with 1232 additions and 567 deletions

View File

@ -1,13 +1,13 @@
[#]: collector: (lujun9972)
[#]: translator: (robsean)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11631-1.html)
[#]: subject: (How to Install LEMP (Linux, Nginx, MariaDB, PHP) on Fedora 30 Server)
[#]: via: (https://www.linuxtechi.com/install-lemp-stack-fedora-30-server/)
[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/)
如何在 Fedora 30 Server 上安装 LEMP (Linux, Nginx, MariaDB, PHP)
如何在 Fedora 30 Server 上安装 LEMPLinux、Nginx、MariaDB、PHP
======
在这篇文章中,我们将看看如何在 Fedora 30 Server 上安装 **LEMP** 。LEMP 代表:
@ -17,19 +17,17 @@
* M -> Maria DB
* P -> PHP
我假设 [Fedora 30][1] 已经安装在你的电脑系统上。
![](https://img.linux.net.cn/data/attachment/album/201912/01/103537wil7hd36dhcxdh03.jpg)
我假设 **[Fedora 30][1]** 已经安装在你的电脑系统上
LEMP 是一组强大的软件设置集合,它安装在一个 Linux 服务器上以帮助使用流行的开发平台来构建网站LEMP 是 LAMP 的一个变种,在其中不是 Apache ,而是使用 EngineXNginx此外使用 MariaDB 代替 MySQL。这篇入门指南是一个安装 Nginx、Maria DB 和 PHP 的独立指南的作品集合
![LEMP-Stack-Fedora30][2]
### 在 Fedora 30 Server 上安装 Nginx、PHP 7.3 和 PHP-FPM
LEMP 是一组强大的软件设置集合,它安装在一个 Linux 服务器上以帮助使用流行的开发平台来构建网站LEMP 是 LAMP 的一个变种,在其中不是 **Apache** ,而是使用 **EngineX (Nginx)** 此外,使用 **MariaDB** 代替 **MySQL** 。这篇入门指南是一个安装 Nginx, Maria DB 和 PHP 的独立指南的作品集合
让我们看看如何在 Fedora 30 Server 上安装 Nginx 和 PHP 以及 PHP FPM
### 在 Fedora 30 Server 上安装 Nginx PHP 7.3 和 PHP-FPM
让我们看看如何在 Fedora 30 Server 上安装 Nginx 和 PHP 以及 PHP FPM 。
### 步骤 1) 切换到 root 用户
#### 步骤 1) 切换到 root 用户
在系统上安装 Nginx 的第一步是切换到 root 用户。使用下面的命令:
@ -39,25 +37,25 @@ root@linuxtechi ~]$ sudo -i
[root@linuxtechi ~]#
```
### 步骤 2) 使用 dnf 命令安装 Nginx PHP 7.3 和 PHP FPM
#### 步骤 2) 使用 dnf 命令安装 Nginx、PHP 7.3 和 PHP FPM
使用下面的 dnf 命令安装 Nginx
使用下面的 `dnf` 命令安装 Nginx
```
[root@linuxtechi ~]# dnf install nginx php php-fpm php-common -y
```
### 步骤 3) 安装额外的 PHP 模块
#### 步骤 3) 安装额外的 PHP 模块
PHP 的默认安装仅自带基本模块和最需要的模块,如果你需要额外的模块,像 PHP 支持的 GD XML ,命令行接口 Zend OPCache 功能等等,你总是能够选择你的软件包,并一次性安装所有的东西。查看下面的示例命令:
PHP 的默认安装仅自带基本模块和最需要的模块,如果你需要额外的模块,像 PHP 支持的 GD、XML、命令行接口、Zend OPCache 功能等等,你总是能够选择你的软件包,并一次性安装所有的东西。查看下面的示例命令:
```
[root@linuxtechi ~]# sudo dnf install php-opcache php-pecl-apcu php-cli php-pear php-pdo php-pecl-mongodb php-pecl-redis php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml -y
```
### 步骤 4) 开始 & 启用 Nginx 和 PHP-fpm 服务
#### 步骤 4) 开始 & 启用 Nginx 和 PHP-fpm 服务
使用下面的命令来开始并启用 Nginx 服务
使用下面的命令来开始并启用 Nginx 服务
```
[root@linuxtechi ~]# systemctl start nginx && systemctl enable nginx
@ -65,7 +63,7 @@ Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /u
[root@linuxtechi ~]#
```
使用下面的命令来开始并启用 PHP-FPM 服务
使用下面的命令来开始并启用 PHP-FPM 服务
```
[root@linuxtechi ~]# systemctl start php-fpm && systemctl enable php-fpm
@ -73,9 +71,9 @@ Created symlink /etc/systemd/system/multi-user.target.wants/php-fpm.service →
[root@linuxtechi ~]#
```
**核实 Nginx (Web 服务) 和 PHP 安装,**
#### 步骤 5) 核实 Nginx (Web 服务) 和 PHP 安装
**注意:** 假使操作系统防火墙是启用的,并运行在你的 Fedora 30 系统上,那么使用下面的命令来准许 80 和 443 端口
注意:假使操作系统防火墙是启用的,并运行在你的 Fedora 30 系统上,那么使用下面的命令来准许 80 和 443 端口
```
[root@linuxtechi ~]# firewall-cmd --permanent --add-service=http
@ -88,24 +86,22 @@ success
[root@linuxtechi ~]#
```
打开网页浏览器,输入下面的 URL http://<Your-Server-IP>
打开网页浏览器,输入下面的 URL http://<Your-Server-IP>
[![Test-Page-HTTP-Server-Fedora-30][3]][4]
![Test-Page-HTTP-Server-Fedora-30][4]
上面的屏幕证实 NGINX 已经成功地安装。
上面的屏幕证实 Nginx 已经成功地安装。
现在,让我们核实 PHP 安装,使用下面的命令创建一个测试 php 页(info.php)
现在,让我们核实 PHP 安装,使用下面的命令创建一个测试 php 页`info.php`
```
[root@linuxtechi ~]# echo "<?php phpinfo(); ?>" > /usr/share/nginx/html/info.php
[root@linuxtechi ~]#
```
在网页浏览器中输入下面的 URL
在网页浏览器中输入下面的 URL http://<Your-Server-IP>/info.php
http://<Your-Server-IP>/info.php
[![Php-info-page-fedora30][5]][6]
![Php-info-page-fedora30][6]
上面的页面验证 PHP 7.3.5 已经被成功地安装。现在,让我们安装 MariaDB 数据库服务器。
@ -113,7 +109,7 @@ http://<Your-Server-IP>/info.php
MariaDB 是 MySQL 数据库的一个极好的替代品,因为它的工作方式与 MySQL 非常类似,并且兼容性也与 MySQL 一致。让我们看看在 Fedora 30 Server 上安装 MariaDB 的步骤。
### 步骤 1) 切换到 root 用户
#### 步骤 1) 切换到 root 用户
在系统上安装 MariaDB 的第一步是切换到 root 用户,或者你可以使用有 root 权限的本地用户。使用下面的命令:
@ -122,25 +118,25 @@ MariaDB 是 MySQL 数据库的一个极好的替代品,因为它的工作方
[root@linuxtechi ~]#
```
### 步骤 2) 使用 dnf 命令安装 MariaDB (10.3) 的最新版本
#### 步骤 2) 使用 dnf 命令安装 MariaDB10.3的最新版本
在 Fedora 30 Server 上使用下面的命令来安装 MariaDB
在 Fedora 30 Server 上使用下面的命令来安装 MariaDB
```
[root@linuxtechi ~]# dnf install mariadb-server -y
```
### 步骤 3) 开启并启用 MariaDB 服务
#### 步骤 3) 开启并启用 MariaDB 服务
在步骤2中成功地安装 mariadb 后,接下来的步骤是开启 MariaDB 服务。使用下面的命令:
在步骤 2 中成功地安装 MariaDB 后,接下来的步骤是开启 MariaDB 服务。使用下面的命令:
```
[root@linuxtechi ~]# systemctl start mariadb.service ; systemctl enable mariadb.service
```
### 步骤 4) 保护 MariaDB 安装
#### 步骤 4) 保护安装好的 MariaDB
当我们安装 MariaDB 服务器时,因为默认情况下没有 root密码,在数据库中也创建匿名用户。因此,来保护 MariaDB 安装,运行下面的 “mysql_secure_installation” 命令
当我们安装 MariaDB 服务器时,因为默认情况下没有 root 密码,在数据库中也会创建匿名用户。因此,要保护安装好的 MariaDB运行下面的 `mysql_secure_installation` 命令:
```
[root@linuxtechi ~]# mysql_secure_installation
@ -152,7 +148,7 @@ MariaDB 是 MySQL 数据库的一个极好的替代品,因为它的工作方
![Secure-MariaDB-Installation-Part2][8]
### 步骤 5) 测试 MariaDB 安装
#### 步骤 5) 测试 MariaDB 安装
在你安装后,你总是能够测试是否 MariaDB 被成功地安装在 Fedora 30 Server 上。使用下面的命令:
@ -161,7 +157,7 @@ MariaDB 是 MySQL 数据库的一个极好的替代品,因为它的工作方
Enter password:
```
接下来,你将被提示一个密码。输入在 MariaDB 保护安装期间你设置的密码,接下来你可以看到 MariaDB 欢迎屏幕。
接下来,你将被提示一个密码。输入在保护安装好的 MariaDB 期间你设置的密码,接下来你可以看到 MariaDB 欢迎屏幕。
```
Welcome to the MariaDB monitor. Commands end with ; or \g.
@ -175,7 +171,7 @@ Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
```
最后,我们已经在你的 Fedora 30 Server 上成功地完成安装 LEMP (Linux, Nginx, MariaDB and PHP) 的所有工作。请在下面的反馈部分发布你的评论和建议,我们将尽快在后面回应。
最后,我们已经在你的 Fedora 30 Server 上成功地完成安装 LEMPLinux、Nginx、MariaDB 和 PHP的所有工作。请在下面的反馈部分发布你的评论和建议,我们将尽快在后面回应。
--------------------------------------------------------------------------------
@ -184,7 +180,7 @@ via: https://www.linuxtechi.com/install-lemp-stack-fedora-30-server/
作者:[Pradeep Kumar][a]
选题:[lujun9972][b]
译者:[robsean](https://github.com/robsean)
校对:[校对者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,105 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-11629-1.html)
[#]: subject: (Switching from Python 2 to Python 3: What you need to know)
[#]: via: (https://opensource.com/article/19/11/end-of-life-python-2)
[#]: author: (Katie McLaughlin https://opensource.com/users/glasnt)
从 Python 2 切换到 Python 3 你所需要了解的
======
> Python 2 将在几周内走到生命终点,这篇文章是你迁移到 Python 3 之前应该知道的。
![](https://img.linux.net.cn/data/attachment/album/201912/01/095336lbppn8qp1nnnwqqp.jpg)
从 2020 年 1 月 1 日开始Python 2.7 将不再得到正式支持。在此日期之后,将会发布一个[最终错误修复][2]计划,但是仅此而已。
Python 2 的生命终点EOL对你意味着什么如果正在运行着 Python 2你需要迁移。
### 是谁决定 Python 2 的生命终点?
在 [2012][3] 年,维护 Python 编程语言的团队审查了其选项。有两个越来越不同的代码库Python 2 和 Python 3。这两者都很流行但是较新的版本并未得到广泛采用。
除了 Python 3 中完全重写的 Unicode 支持改变了处理数据的底层方式造成的断层,这个主要版本的变化还一次性出现了一些非向后兼容的更改。这种断层的决定成文于 [2006 年][4]。为了减轻该断层的影响Python 2 继续保持了维护,并向后移植了一些 Python 3 的功能。为了进一步帮助社区过渡EOL 日期[从 2015 年延长至 2020 年][5],又延长了五年。
该团队知道,维护不同的代码库是必须解决的麻烦。最终,他们[宣布了][6]一项决定:
>“我们是制作和照料 Python 编程语言的志愿者。我们已决定 2020 年 1 月 1 日将是我们停止使用 Python 2 的日子。这意味着在这一天之后,即使有人发现其中存在安全问题,我们也将不再对其进行改进。你应尽快升级到 Python 3。”
[Nick Coghlan][7] 是 CPython 的核心开发人员,也是 Python 指导委员会的现任成员,[在他的博客中添加了更多信息][8]。由 [Barry Warsaw][10](也是 Python 指导委员会的成员)撰写的 [PEP 404][9] 详细说明了 Python 2.8 永远不会面世的原因。
### 有人还在支持 Python 2 吗?
提供者和供应商对 Python 2 的支持会有所不同。[Google Cloud 宣布了][11]它计划未来如何支持 Python 2。红帽还[宣布了红帽企业 LinuxRHEL的计划][12],而 AWS 宣布了 AWS 命令行界面和 [SDK][14] 的[次要版本更新要求][13]。
你还可以阅读 [Vicki Boykis][16] 在 Stack Overflow 撰写的博客文章“[为什么迁移到 Python 3 需要这么长时间?][15]”,其中她指出了采用 Python 3 缓慢的三个原因。
### 使用 Python 3 的原因
不管是否有持续的支持,尽快迁移到 Python 3 是一个好主意。Python 3 将继续受到支持,它具有 Python 2 所没有的一些非常优雅的东西。
最近发布的 [Python 3.8][17] 包含 [海象运算符][19]、[位置参数][20]和[自描述的格式化字符串][21]等[功能][18]。Python 3 的早期版本引入的[功能][22],例如 [异步 IO][23]、[格式化字符串][24]、[类型提示][25] 和 [pathlib][26],这里只提及了一点点。
下载最多的前 360 个软件包[已迁移到 Python 3][27]。你可以使用 [caniusepython3][28] 软件包检查你的 `requirements.txt` 文件,以查看你依赖的任何软件包是否尚未迁移。
### 将 Python 2 移植到 Python 3 的参考资源
有许多参考资源可简化你向 Python 3 的迁移。例如,“[将 Python 2 移植到 Python 3 指南][29]”列出了许多工具和技巧,可帮助你实现与 Python 2/3 单一源代码的兼容性。在 [Python3statement.org][30] 上也有一些有用的技巧。
[Dustin Ingram][31] 和 [Chris Wilcox][32] 在 [Cloud Next '19][33]上作了一个演讲,详细介绍了向 Python 3 过渡的一些动机和迁移模式。[Trey Hunner][34] 在 [PyCon 2018 演讲][35]上介绍了 Python 3 最有用的功能,鼓励你进行迁移,以便你可以利用它们。
### 加入我们!
距 2020 年 1 月 1 日仅有几周了。如果你需要每天提醒一下它即将到来的时间(并且你使用 Twitter 的话),请关注 [Python 2 日落倒计时][36] Twitter 机器人。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/11/end-of-life-python-2
作者:[Katie McLaughlin][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/glasnt
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/govt_a%20new%20dawn.png?itok=b4zU-VAY (A sunrise)
[2]: https://www.python.org/dev/peps/pep-0373/#maintenance-releases
[3]: https://github.com/python/peps/commit/a733bc927acbca16bfa3de486fb2c7d3f767a748
[4]: https://www.python.org/dev/peps/pep-3000/#compatibility-and-transition
[5]: https://github.com/python/peps/commit/f82462002b86feff36215b4230be28967039b0cc
[6]: https://www.python.org/doc/sunset-python-2/
[7]: https://twitter.com/ncoghlan_dev
[8]: http://python-notes.curiousefficiency.org/en/latest/python3/questions_and_answers.html
[9]: https://www.python.org/dev/peps/pep-0404/
[10]: https://twitter.com/pumpichank
[11]: https://cloud.google.com/python/docs/python2-sunset/?utm_source=osdc&utm_medium=blog&utm_campaign=pysunset
[12]: https://access.redhat.com/solutions/4455511
[13]: https://aws.amazon.com/blogs/developer/deprecation-of-python-2-6-and-python-3-3-in-botocore-boto3-and-the-aws-cli/
[14]: https://aws.amazon.com/sdk-for-python/
[15]: https://stackoverflow.blog/2019/11/14/why-is-the-migration-to-python-3-taking-so-long/
[16]: https://twitter.com/vboykis
[17]: https://www.python.org/downloads/
[18]: https://docs.python.org/3.8/whatsnew/3.8.html
[19]: https://docs.python.org/3.8/whatsnew/3.8.html#assignment-expressions
[20]: https://docs.python.org/3.8/whatsnew/3.8.html#positional-only-parameters
[21]: https://docs.python.org/3.8/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging
[22]: https://docs.python.org/3.8/whatsnew/index.html
[23]: https://docs.python.org/3.8/library/asyncio.html#module-asyncio
[24]: https://docs.python.org/3.7/whatsnew/3.6.html#pep-498-formatted-string-literals
[25]: https://docs.python.org/3.7/whatsnew/3.5.html#pep-484-type-hints
[26]: https://docs.python.org/3.8/library/pathlib.html#module-pathlib
[27]: http://py3readiness.org/
[28]: https://pypi.org/project/caniusepython3/
[29]: https://docs.python.org/3/howto/pyporting.html
[30]: https://python3statement.org/practicalities/
[31]: https://twitter.com/di_codes
[32]: https://twitter.com/chriswilcox47
[33]: https://www.youtube.com/watch?v=Bye7Rms0Vgw&utm_source=osdc&utm_medium=blog&utm_campaign=pysunset
[34]: https://twitter.com/treyhunner
[35]: https://www.youtube.com/watch?v=klaGx9Q_SOA
[36]: https://twitter.com/python2sunset

View File

@ -0,0 +1,111 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (My Linux story: Covering open source in Spanish)
[#]: via: (https://opensource.com/article/19/11/linux-open-source-spanish)
[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen)
My Linux story: Covering open source in Spanish
======
Meet Lorenzo Carbonell, who brings GNU/Linux and open source to the
Spanish-speaking community through his blog site, El Atareao, and
applications.
![Guy on a laptop on a building][1]
From time to time, when I'm looking for some help on how to do something on my GNU/Linux desktop or server, I'll come across an article or conversation in a language other than English. If that language happens to be French or Spanish, that's fine for me. If it's in Portuguese or Italian, I can stumble through it. And, for other languages, occasionally, I'll give one of those online AI translators a go in the hopes of gleaning something useful.
But for folks who are comfortable only in English, I suspect that many potentially useful (and sometimes very entertaining) sources are unknown and ignored. And what are the options for people who aren't comfortable in English, when so much that is written about open source (and many other topics) is in English?
Last year, while researching [open source music players][2], I had the good fortune to stumble on [El Atareao Linux para legos][3], a well-written, gorgeously illustrated Castilian Spanish blog that focuses on GNU/Linux and open source topics. El Atareao contains tutorials, discussions about applications, and podcasts. Its author, Lorenzo Carbonell, writes beautifully clear and entertaining text and generously shares his accumulating wisdom in a very practical form. He also develops open source applications, including LPlayer, which is how I found his blog.
I had a discussion with Lorenzo about what it takes to create a great non-English, open source-oriented blog. Here is our conversation, translated from Spanish and edited for clarity.
**Q: Lorenzo, I've been a fan of your blog since May 2018. I like everything about it—very interesting articles, solid content, beautiful images, great design overall. What motivated you to start this fine project? And what motivates you today?**
**A:** I got to know GNU/Linux at university about 25 years ago; it attracted my attention, and I used it for several months. For whatever reason—maybe I wasn't sufficiently prepared, maybe the distribution, Slackware, was too much for me—I decided to abandon it when I started working. However, it stuck in my memory.
About 10 years ago, I was tired of bringing office work home, and I decided to come up with a solution. At that moment, some recollection of that GNU/Linux operating system came back to me, and I thought using a different operating system might be the solution. The incompatibility between the two would make it hard to bring work home, I thought.
I chose Ubuntu as my platform, and this distribution has stayed with me until today, a distribution that showed me my mistake: With Ubuntu, or really any other distro, I can still do office work at home!
Yes, in the beginning, I had some difficulties. And these difficulties were what led to the birth of Atareao.es, because that was where I posted the lessons I learned from this incredible operating system.
Using an open source operating system, which provides the opportunity to get into the guts of the system and adapt its functions to my needs, stole my heart. Implementing applications like [LPlayer][4], [Touchpad-Indicator][5], or [My Weather Indicator][6] and seeing other people finding them useful filled me with satisfaction. Not only the satisfaction of implementing applications and bringing them to the attention of other users through Atareao.es, but also the satisfaction of being able (or at least trying) to show the potential of this operating system. The potential of this operating system is that it allows you to do almost anything you can imagine, for the simple reason that the code is there and available so that you can study it and adapt it to your needs.
What motivates me? To have an operating system with so much potential; that is the great unknown. This is what motivates me: having successes to shout to the four winds to let everyone know. And once everyone knows, each one can decide. This is one of the reasons for free applications that can make life simpler or at least help the newly arrived.
**Q: Please explain the name "El Atareao"… is it local slang? I understand "el atareado" (the busy person).**
**A:** "El Atareao" was something that arose from work 10 years ago. At that time, I was always busy with work. A close friend mentioned that phrase to me, and it branded itself in my mind. Now it's "el atareao" that will support the company. And to honor and respect this, I used the name for this site.
So with respect to "atareao" in place of "atareado," effectively it's local slang.
**Q: So when you aren't "atareao," what do you do? Are you a software developer? Do you work in open source by day?**
**A:** Currently, I'm working as a developer and in part as a system administrator. And I must say that this came about thanks to Atareao.es. Before, I was working in something completely and totally different, but software development has been my passion. And so, relatively recently, a visionary (or a crazy person) rescued me from my old job and brought me to this incredible world of development, where you can convert anything you can imagine to reality. I say "visionary" because he knew how to see what I could not, and "crazy" because he has to be really bold to make that bet. Today I'm like a kid in a candy store.
**Q: Your articles provide a solid amount of useful detail. For example, this [article about Rsync][7]. How do you decide on a topic? How do you determine your readers' level of ability so you can write in a way they can understand?**
**A:** Normally, the articles arise from my need to solve a problem or a situation that I'm facing or that someone has contacted me to ask for help. Though the latter is less common because interactivity in the world 2.0 is not always what I, and I suppose others, would like.
The objective of any article is to be sufficiently detailed so that any person reading it can reproduce it and can succeed at putting the material to work. It's very frustrating to read an article about some technology that is apparently really simple and not be able to make it work—because the person who wrote the article did not try it out, or because it's vaguely documented, or because it's explained in a technically excessive manner.
My objective is to try to acquaint as many people as possible to the greatest extent possible with this operating system. How can I tell you about something if you can't make it work because I didn't explain it sufficiently or with enough detail? When someone writes to me and tells me they were unable to follow something or that it wasn't well explained or that there is some error, it makes me very uneasy and motivates me to write better, to strengthen myself, to study more, to learn.
With respect to the readers' level of ability, this is probably my biggest worry. I know that the majority who read Atareao.es are beginners or "legos" (in the sense of not being professionals), and I try to orient myself to these people. Nevertheless, some of the readers are professionals and are quite challenging to satisfy. In whatever way, I always try for the most straightforward and simple result. Or, at least to be sufficiently clear, so that I can understand it without problems.
**Q: Do you have other hobbies apart from this blog?**
**A:** Currently, the blog, the podcast, and developing applications absorb nearly all of my free time. An article or a podcast takes a couple of hours. Creating an application never ends and sucks up all my available time.
But one hobby that I am dedicated to is running; this is something I do every day or nearly so. And so, as I mention in the "[Who am I?][8]" section of the blog, if one day you visit Silla, the town in Valencia where I live, early in the morning, you can find me on my running circuits. When we travel, which is the other hobby that I have and share with my wife, my running shoes and my laptop always come with me. You can always find me traveling or running or sitting in a coffee shop writing an article.
**Q: As someone who is not a native speaker of (Castilian) Spanish, I nevertheless enjoy your use of the language; I feel that how one expresses oneself is as important as what is written. Can you elaborate on this?**
**A:** It seems to me very important that an article, whether it's technical or not, should have the best possible wording. And not only to be correct, syntactically and semantically, but to be able to tell a story, a story that engages.
For this reason, whenever I can, I try to write the technical article within an experience, a situation, or a circumstance that has happened to me. From my perspective, writing about real, daily successes that frame a technical article works better for readers and makes them feel much more involved.
**Q: There are a lot of people who prefer information in their mother tongue. As someone who writes in Spanish, what do you think about this issue? Do you have any idea of the level of demand for information about open source software in Spanish?**
**A:** I think that Spanish speakers, and especially those born in Spain, prefer (Castilian) Spanish as their working language. In Spain, they don't teach us English; rather, they teach us how to pass the English course, which is a real shame. I would enjoy speaking, writing, and expressing myself in English as well as you, but there isn't a means, despite the fact that every day, I consume more video and audio in English, and every day I push myself more with it. I need English more and more; I need to develop myself better in this language.
With respect to the demand for open source software in Spanish, as far as I understand, it's very low, too low for my liking. In general, open source software is the unknown. Few know Linux, and few understand that it's what is behind open source software. A significant number come at first for the simple fact that it's free. This is a great advantage because it's a way to first approach open source. Nevertheless, it's necessary to go deeper, to take a radical turn, because to the Spanish speaker, or at least to the Spaniard, when something is free or very cheap, it seems that it is of low quality. And "free" software is not synonymous with "no cost"; it must be defined based on its high quality.
**Q: Where is** **El Atareao** **going in the future? More podcasts? YouTube channels? Adding other authors? Syndicated content?**
**A:** Where is Atareao.es going? I know where I'd like it to go. I'd like to dedicate myself to it full time. I'd like to live on [income from] the site, although I know that's really difficult. One approach that I'm exploring is to convert it to a membership site, although providing the content for free. This is something that I need to keep working on.
As a part of this, I'm trying to participate in related events and give talks at conferences. I started down this road last year at [Ubucon][9] Europe 2018, I continued this year, and next year I'd like to deepen this involvement. "De-virtualization" is important, putting faces to names, seeing that open source software isn't something far away, distant, or cold; quite the contrary.
In the short term, I'd like to work on my [YouTube channel][10] while working on talks and attending conferences. I'm planning to start a series on YouTube, although I don't have it completed, and only my wife and now you (all) know about it.
### Conclusion
Thanks very much, Lorenzo, for taking the time to share your thoughts with us, and best wishes for the continued success of El Atareao.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/11/linux-open-source-spanish
作者:[Chris Hermansen][a]
选题:[lujun9972][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/clhermansen
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_code_programming_laptop.jpg?itok=ormv35tV (Guy on a laptop on a building)
[2]: https://opensource.com/article/18/6/open-source-music-players
[3]: https://www.atareao.es/
[4]: https://github.com/atareao/lplayer
[5]: https://github.com/atareao/Touchpad-Indicator
[6]: https://github.com/atareao/my-weather-indicator
[7]: https://www.atareao.es/podcast/sincronizacion-en-red-y-vpn/
[8]: https://www.atareao.es/quien-soy/
[9]: https://wiki.ubuntu.com/Ubucon
[10]: https://www.youtube.com/c/atareao

View File

@ -1,261 +0,0 @@
23 open source audio-visual production tools
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-photo-camera-blue.png?itok=AsIMZ9ga)
Open source is well established in cloud infrastructure, web hosting, embedded devices, and many other areas. Fewer people know that open source is a great option for producing professional-level audio-visual materials.
As a product owner and sometimes marketing support person, I produce a lot of content for end users: documentation, web articles, video tutorials, event booth materials, white papers, interviews, and more. I have found plenty of great open source software that helps me do my job producing audio, video, print, and screen graphics. There are a lot of [reasons][1] that people choose open source over proprietary options, and I've compiled this list of open source audio and video tools for people who:
* want to switch to GNU/Linux, but need to start slowly with cross-platform software on their regular operating system;
* are already open source enthusiasts, but are new to open source A/V software and want to know which options to trust;
* want to discover new tools to fuel their creativity and don't want to use the same approaches or software everyone else uses; or
* have some other reason to use open source A/V solutions (if this is you, share your reason in the comments).
Fortunately, there is a lot of open source software available for A/V creators, as well as hardware that supports those applications. All of the software on this list meets the following criteria:
* cross-platform
* open source (for software and drivers)
* stable
* actively maintained
* well documented and supported
I've divided this list into graphics, audio, video, and animation solutions. Note that the software applications in this article are not exact equivalents of well-known proprietary software, they'll require you to learn new applications, and you may need to modify your workflow, but learning new tools enables you to create differently.
### Graphics
I create a lot of graphics for print and web, including logos, banners, video titles, and mockups. Here are some of the open source applications I use, as well as the hardware I use with them.
#### Software
**1.[Inkscape][2]** (vector graphics)
Inkscape is a good vector graphics editor for creating SVG and PDF files in the RGB color space. (It can create CMYK images, but that's not the main aim.) It's a lifesaver for manipulating SVG maps and charts for web applications; not only can you open files with the integrated XML editor, you can also see all of an object's parameters. One drawback: it is not well optimized on Mac. For examples, see [Inkscape's gallery][3].
**2.[GIMP][4]** (picture editor)
GIMP is my favorite application to edit images, including manipulating color, cropping and resizing, and (especially) optimizing file size for the web (many of my Photoshop-using colleagues ask me to do that last step for them). You can also create and draw images from scratch, but GIMP is not my favorite tool for that. See [GIMP Artists on DeviantArt][5] for examples.
**3.[Krita][6]** (digital painting)
So you have this beautiful Wacom drawing tablet on your desk, and you want to try a true digital painting application? Krita is what you need to create beautiful drawings and paintings. See [Krita's Gallery][7] to see what I mean.
**4.[Scribus][8]** (desktop publishing)
You can use Scribus to create a complete document, or just to convert a PDF from Inkscape or Libre Office from RGB to CMYK. One feature I really like: You can simulate and check what people with visual disabilities will experience with a Scribus document. I count on Scribus when I send PDF files to a commercial printer. While printing companies may be used to files created with proprietary solutions like InDesign, if your Scribus file is done correctly, your printer won't have any issues. Free trick: The first time you send a file, don't tell the printer the name of the software you used to create it. See [Made with Scribus][9] for examples of documents created with this software.
**5.[RawTherapee][10]** (RAW image photo development)
RawTherapee is the only completely cross-platform alternative to Lightroom I know of. You can use your camera in RAW mode, and then use RawTherapee to "develop" your picture. It provides a very powerful engine and a non-destructive editor. For examples, see [RawTherapee screenshots][11].
**6.[LibreOffice Draw][12]** (desktop publishing)
Although you may not think of LibreOffice Draw as a professional desktop publishing solution, it can save you in many situations; for example, if you are creating whitepapers, diagrams, or posters that other people (even those who don't know graphics software) can update later. Not only is it easy to use, it's also a great alternative to Impress or PowerPoint for creating interesting documents.
#### Graphics hardware
**Graphics tablets**
[Wacom][13] tablets (and compatibles) are usually well supported on all operating systems.
**Color calibration**
Color calibration products are available on all operating systems, including GNU/Linux. The [Spyder][14] products by Datacolor are well supported with applications for all platforms.
**Scanners and printers**
Graphic artists need the colors they output (whether print or electronic) to be accurate. But devices that are truly cross-platform, with easy-to-install drivers for all platform, are not as common as you'd think. Your best choices are scanners that are compatible with TWAIN and printers that are compatible with Postscript. In my experience, professional-range printers and scanners from Epson and Xerox are less likely to have driver issues, and they always work out of the box, with beautiful and accurate colors.
### Audio
There are plenty of open source audio software options for musicians, video makers, game makers, music publishers, and others. Here are the ones that I've used for content creation and audio recording.
#### Software
**7. [Ardour][15] **(digital audio recording)
For recording and editing audio, the best alternative to the professional Pro Tools music-creation software is, hands down, Ardour. It sounds great, the mixer section is complete and flexible, it supports your favorite plugins, and it makes it very easy to edit, listen, and compare your modifications. I use it a lot for audio recording or mixing sound on videos. It's not easy to find music recorded with Ardour, because musicians rarely credit the software they use. However, you can get an idea of its capabilities by looking at its [features and screenshots][16].
(If you are looking for an "analog feeling" in term of sound and workflow, you can try [Harrison Mixbus][17], which is not an open source project, but is heavily based on Ardour, with Harrison's analog console emulator. I really like to work with it and my customers like the sound. Mixbus is cross platform.)
**8.[Audacity][18]** (audio editing)
Audacity is the "Swiss Army knife" of audio software. It's not perfect, but you can do almost everything with it. Plus it's very easy to use, and anyone can learn it in a few minutes. Like Ardour, it's hard to find work credited to Audacity, but you can find ways to use it on these [screenshots][19].
**9.[LMMS][20]** (music production)
LMMS, designed as an alternative to FL Studio, might not be as popular, but it is very complete and easy to use. You can use your favorite plugins, edit instruments using "piano roll" sequencing, play drum samples with a step sequencer, mix your tracks ... almost anything is possible. I use it to create audio loops for videos when I don't have the time to record musicians. See [The Best of LMMS][21] playlists for examples.
**10.[Mixxx][22]** (DJ, music mixing)
If you need powerful software to mix music and play DJ, Mixx is the one to use. It's compatible with most MIDI controllers, timecoded discs, and dedicated sound cards. You can manage your music library, add effects, and have fun. Take a look at the [features][23] to see how it works.
#### Audio interface hardware
While you can record audio with any computer's sound card, to record well, you need an audio interface—a specialized type of external sound card that records high-quality audio input. For cross-platform compatibility, most "USB Class Compliant" or "compatible with iOS" audio interface devices should work for MIDI or other audio. Below is a list of cross-platform devices I use and know well.
**[Behringer U-PHORIA UMC22][24]**
The UMC22 is the cheapest option you should consider. With less expensive options, the preamps are too noisy and the quality of the box is very low.
**[Presonus AudioBox USB][25]**
The AudioBox USB is one of the first USB Class Compliant (and thereby cross-platform) recording systems out there. It is very robust and available on the second-hand market.
**[Focusrite Scarlett][26]**
The Scarlett range is, in my opinion, the highest quality cross-platform sound card available. The various options range from devices with two to 18 input/outputs. You can find first-version models on the second-hand market, and the new second version offers better preamps and specs. I've worked a lot with the [2i2][27] model.
**[Arturia AudioFuse][28]**
The AudioFuse allows you to plug in nearly anything, from a microphone to a vinyl disc player to various digital inputs. It provides both great sound and great design, and it's what I'm using the most now. It is cross-platform, but the configuration software is not yet available for GNU/Linux. It remembers my configuration even after I unplug it from my Windows PC, but really, Arturia, please be serious and make the software available for GNU/Linux.
#### MIDI controllers
A MIDI controller is a musical instrument—e.g., keyboards, drum pads, etc.—that allow you to control music software and hardware. Most of the recent USB MIDI controllers are cross-platform and compatible with the main software used to record and edit audio. Web-based tutorials will help you configure them for different software; although it may be harder to find info on GNU/Linux configurations, they will work. I've used many Akai and M-Audio devices without any issues. It's best to try a musical instrument before you buy, at least to listen to the sound quality or to touch the buttons.
#### Audio codecs
Audio codecs compress and decompress digital audio to deliver the best-quality audio at the smallest possible file size. Fortunately, the best codec for listening and streaming happens to be open source: [FLAC][29]. [Ogg Vorbis][30] is another open source audio codec worth checking out; it's far better than MP3 at the same bitrate. If you need to export audio in different file formats, I recommend always exporting and archiving audio at the best possible quality, then compressing a specific version if it's needed.
### Video
The impact of video in brand communications is significant. Even if you are not a video specialist, it's smart to learn the basics.
#### Software
**11.[VLC][31]** (video player and converter)
Originally developed for media streaming, VLC is now known for its ability to read all video formats on all devices. It's very useful; for example, you can also use it to convert a video into another codec or container or to recover a broken video.
**12.[OpenShot][32]** (video editor)
OpenShot is simple software that produces great results, especially for short videos. (It is a bit limited in terms of editing or improving the sound of a video, but it will do the job.) I especially like the tool to move, resize, or crop a clip; it's perfect to create intros and outros that you can export, then use in a more complex editor. You can see [examples][33] (and get more information) on OpenShot's website.
**13.[Shotcut][34]** (video editor)
I think Shotcut is a bit more complete than OpenShot—it's a very good competitor to the basic editors in your operating system, and it supports 4K and professional codecs. Give it a try, I think you will love it. You can see examples in these [video tutorials][35].
**14.[Blender Velvets][36]** (vdeo editing, compositing, effects)
While the learning curve is not the lightest on this list, Blender Velvets is one of the most powerful solutions you will find. It is a collection of extensions and scripts, created by movie makers, that transform the Blender 3D creation software into a 2D video editor. While it's complexity means it's not my top choice for video editing, you can find plenty of tutorials on YouTube and other sites, and once you learn it, you can do everything with this software. Watch this [tutorial video][37] to see its functions and how it works.
**15.[Natron][38]** (compositing)
I don't use Natron, but I've gotten great feedback from people who do. It's an alternative to Adobe's After Effects, but works differently. To learn more, watch a few video tutorials, like these on [Natron's YouTube][39] channel.
**16.[OBS][40]** (live editing, recording, and streaming)
Open Broadcaster Software (OBS) is the leading solution for recording or [livestreaming][41] e-sports and video games on YouTube or Twitch. I use it a lot to record users' screens, conferences, meetups, etc. For more information, see the tutorial I wrote for Opensource.com about recording live presentations, [Part 1: Choosing your equipment][42] and [Part 2: Software setup][43].
#### Video hardware
First things first: You will need a powerful workstation with a fast hard drive and updated software and drivers.
**Graphics processing unit (GPU)**
Some software on this list, including Blender and Shotcut, use OpenGL and hardware acceleration, which have high GPU demands. I recommend the most powerful GPU you can afford. I've had good experience with AMD and Nvidia, depending on the platform. Don't forget to install the latest drivers.
**Hard drives**
In general, the faster and bigger the hard drive, the better it is for video. Don't forget to configure your software to use the right path.
**Video capture hardware**
* [Blackmagic Design][44]: Blackmagic provides very good, professional-grade video capture and playback hardware. Drivers are available for Mac, Windows, and GNU/Linux (but not all distributions).
* [Epiphan][45]: Among Epiphan's professional USB video capture devices is a new USB Class Compliant model for HDMI and high screen resolutions. However, you can find the older VGA devices on the secondhand market, for which they continue to provide dedicated drivers for GNU/Linux and Windows.
#### Video codecs
Unfortunately, it is still difficult to work with open source codecs. For example, many cameras use proprietary codecs to record videos in H.264 and sound in AC3, in a format called AVCHD. Therefore, we have to be pragmatic and use what is available.
The good news is that the content industry is moving to open source codecs to avoid fees and to use open standards. For distribution and streaming, [Google'][46][s WebM][46] is a good open source codec, and most video editors can export in that format. Also, [GoPro's][47][Cineform][47] codec for very high resolution and 360° video is now open source. Hopefully more devices and vendors will use it soon.
### 2D and 3D animation
Animation is not my field of expertise, so I've asked my friends who are working on animated content, including movies and series for kids, for their recommendations to compile this list.
#### Software
**17. [Blender][48] **(3D modeling and rendering)
Blender is the top open source and cross-platform software for 3D modeling and rendering. You can do your entire project directly in Blender, or use it to create 3D effects for a movie or video. You will find a lot of video tutorials on the web, so even though it isn't simple software, it's very easy to get started. Blender is a very active project and regularly produces short movies to showcase the technology. You can see some of them on [Blender Open Movies][49].
**18.[Synfig Studio][50]** (2D animation)
The first time I used Synfig, it reminded me of the good, old Macromedia Flash editor. Since then, it has grown into a full-featured 2D animation studio. You can use it to produce promotional stories, commercials, presentations, or original intros, outros, and transitions for your videos, or even to work on full animated movies. See [Synfig's portfolio][51] for some examples.
**19.[TupiTube][52]** (stop-motion, 2D animation)
TupiTube is an excellent way to learn the basics of 2D animation. You can transform a set of drawings or other pictures into a video or create an animated GIF or small loops. It's quite simple software, but very complete. Check out [TupiTube's YouTube][53] channel for some tutorials and examples.
#### Hardware
Animation uses the same hardware as graphic design, so look at the hardware list in the first section of this article for recommendations.
One additional note: You will need a powerful GPU for 3D modeling and rendering. The choices can be limited, depending on your platform or PC maker, but don't forget to install the latest drivers. Carefully choose your graphics card: they are expensive and critical for big 3D projects, particularly in the rendering step.
### Linux options
If you are a GNU/Linux user, I have some more good options for you. They aren't fully cross-platform, but some of them have a Windows installer, and some can be installed on Mac with Macports.
**20.[Kdenlive][54]** (video editor)
With its last release (a few months ago), Kdenlive became my favorite video editor, especially when I work on a long video on my Linux machine. If you are a regular user of popular non-linear video editors, Kdenlive (which stands for KDE Non-Linear Video Editor) will be easy for you to use. It has good video and audio effects, is great when you need to work on details, and works on BSD and MacOS (although it's aimed at GNU/Linux) and is being ported to Windows.
**21.[Darktable][55]** (RAW development)
Darktable is a very complete alternative to DxO that is made by photographers for photographers. Some research projects are using it as a platform for development and testing of new image processing algorithms. It is a very active project, and I can't wait until it becomes truly cross-platform.
**22.[MyPaint][56]** (digital painting)
MyPaint is like a light table for digital painting. It works well with Wacom devices, and its brush engine is particularly appreciated, so GIMP developers are looking closely at it.
**23.[Shutter][57]** (desktop screenshots)
When I create tutorials, I use a lot of screenshots to illustrate them. My favorite screenshot tool for GNU/Linux is Shutter; actually, I can't find an equivalent in terms of features for Windows or Mac. One missing piece: I would like to see Shutter add a feature to create animated GIF screenshots over a few seconds.
I hope this has convinced you that open source software is an excellent, viable solution for A/V content producers. If you are using other open source software—or have advice about using cross-platform software and hardware—for audio and video projects, please share your ideas in the comments.
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/2/open-source-audio-visual-production-tools
作者:[Antoine Thomas][a]
译者:[译者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/ttoine
[1]:https://opensource.com/resources/what-open-source
[2]:https://inkscape.org/
[3]:https://inkscape.org/en/gallery/
[4]:https://www.gimp.org/
[5]:https://gimp-artists.deviantart.com/gallery/
[6]:https://krita.org/
[7]:https://krita.org/en/features/gallery/
[8]:https://www.scribus.net/
[9]:https://www.scribus.net/category/made-with-scribus/
[10]:http://rawtherapee.com/
[11]:http://rawtherapee.com/blog/screenshots
[12]:https://www.libreoffice.org/discover/draw/
[13]:http://www.wacom.com/en-us
[14]:http://www.datacolor.com/photography-design/product-overview/#workflow_2
[15]:https://www.ardour.org/
[16]:http://ardour.org/features.html
[17]:http://harrisonconsoles.com/site/mixbus.html
[18]:http://www.audacityteam.org/
[19]:http://www.audacityteam.org/about/screenshots/
[20]:https://lmms.io/
[21]:https://lmms.io/showcase/
[22]:https://www.mixxx.org/
[23]:https://www.mixxx.org/features/
[24]:http://www.musictri.be/Categories/Behringer/Computer-Audio/Interfaces/UMC22/p/P0AUX
[25]:https://www.presonus.com/products/audiobox-usb
[26]:https://us.focusrite.com/scarlett-range
[27]:https://us.focusrite.com/usb-audio-interfaces/scarlett-2i2
[28]:https://www.arturia.com/products/audio/audiofuse/overview
[29]:https://en.wikipedia.org/wiki/FLAC
[30]:https://xiph.org/vorbis/
[31]:https://www.videolan.org/
[32]:https://www.openshot.org/
[33]:https://www.openshot.org/videos/
[34]:https://shotcut.com/
[35]:https://shotcut.org/tutorials/
[36]:http://blendervelvets.org/
[37]:http://blendervelvets.org/video-tutorial-new-functions-for-the-blender-velvets/
[38]:https://natron.fr/
[39]:https://www.youtube.com/playlist?list=PL2n8LbT_b5IeMwi3AIzqG4Rbg8y7d6Amk
[40]:https://obsproject.com/
[41]:https://opensource.com/article/17/7/obs-studio-pro-level-streaming
[42]:https://opensource.com/article/17/9/equipment-recording-presentations
[43]:https://opensource.com/article/17/9/equipment-setup-live-presentations
[44]:https://www.blackmagicdesign.com/
[45]:https://www.epiphan.com/
[46]:https://www.webmproject.org/
[47]:https://fr.gopro.com/news/gopro-open-sources-the-cineform-codec
[48]:https://www.blender.org/
[49]:https://www.blender.org/about/projects/
[50]:https://www.synfig.org/
[51]:https://www.synfig.org/#portfolio
[52]:https://maefloresta.com/
[53]:https://www.youtube.com/channel/UCBavSfmoZDnqZalr52QZRDw
[54]:https://kdenlive.org/
[55]:https://www.darktable.org/
[56]:http://mypaint.org/
[57]:http://shutter-project.org/

View File

@ -1,104 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Switching from Python 2 to Python 3: What you need to know)
[#]: via: (https://opensource.com/article/19/11/end-of-life-python-2)
[#]: author: (Katie McLaughlin https://opensource.com/users/glasnt)
Switching from Python 2 to Python 3: What you need to know
======
Python 2 will reach its end of life in mere weeks. Here's what to know
before you migrate to Python 3.
![A sunrise][1]
Python 2.7 will officially become unsupported beginning January 1, 2020. There is one [final bugfix][2] planned after this date, but then that's it.
What does this end of life (EOL) mean for you? If you run Python 2, you need to migrate.
### Who decided to EOL Python 2?
In [2012][3], the team maintaining the Python programming language reviewed its options. There were two increasingly different codebases, Python 2 and Python 3. Both were popular, but the newer version was not as widely adopted.
In addition to Python 3's disruption of changing the underlying way data is handled by completely reworking Unicode support, a major version change allowed non-backward-compatible changes to happen all at once. This decision was documented [in 2006][4]. To ease the disruption, Python 2 continued to be maintained, with some features backported. To further help the community transition, the EOL date was extended [from 2015 to 2020][5], another five years.
Maintaining divergent codebases was a hassle the team knew it had to resolve. Ultimately, a decision was [announced][6]:
> "We are volunteers who make and take care of the Python programming language. We have decided that January 1, 2020, will be the day that we sunset Python 2. That means that we will not improve it anymore after that day, even if someone finds a security problem in it. You should upgrade to Python 3 as soon as you can."
[Nick Coghlan][7], a core CPython developer and current member of the Python steering council, [adds more information in his blog][8]. And [PEP 404][9], written by [Barry Warsaw][10] (also a member of the Python steering council), details why Python 2.8 will never be a thing.
### Is anyone still supporting Python 2?
Support for Python 2 from providers and vendors will vary. [Google Cloud has announced][11] how it plans to support Python 2 going forward. Red Hat has also [announced plans for Red Hat Enterprise Linux (RHEL)][12], and AWS has announced [minor version update requirements][13] for the AWS command-line interface and [SDK][14].
You can also read the Stack Overflow blog post "[Why is the Migration to Python 3 Taking So Long?][15]" by [Vicki Boykis][16], in which she identifies three reasons why Python 3 adoption is slow. 
### Reasons to use Python 3
Regardless of ongoing support, it's a really good idea to migrate to Python 3 as soon as you can. Python 3 will continue to be supported, and it has some really neat things that Python 2 just doesn't have.
The recently released [Python 3.8][17] includes such [features][18] as the [walrus operator][19], [positional-only parameters][20], and [self-documenting f-strings][21]. Earlier releases of Python 3 introduced [features][22] such as [asyncio][23], [f-strings][24], [type hints][25], and [pathlib][26], just to name a few.
The top 360 most-downloaded packages [have already migrated to Python 3][27]. You can check your requirements.txt file using the [caniusepython3][28] package to see if any packages you depend on haven't yet been migrated.
### Resources for porting Python 2 to Python 3
There are many resources available to ease your migration to Python 3. For example, the [Porting Python 2 to Python 3 guide][29] lists a bunch of tools and tricks to help you achieve single-source Python 2/3 compatibility. There are also some useful tips on [Python3statement.org][30].
[Dustin Ingram][31] and [Chris Wilcox][32] gave a [presentation at Cloud Next '19][33] detailing some of the motivations and migration patterns for the transition into Python 3. [Trey Hunner][34] gave a [presentation at PyCon 2018][35] about Python 3's most useful features to encourage you to migrate so you can take advantage of them.
### Join us!
January 1, 2020, is now just weeks away. If you need daily reminders of just how soon that is (and you use Twitter), follow the [Countdown to Python 2 sunset][36] Twitter bot.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/11/end-of-life-python-2
作者:[Katie McLaughlin][a]
选题:[lujun9972][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/glasnt
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/govt_a%20new%20dawn.png?itok=b4zU-VAY (A sunrise)
[2]: https://www.python.org/dev/peps/pep-0373/#maintenance-releases
[3]: https://github.com/python/peps/commit/a733bc927acbca16bfa3de486fb2c7d3f767a748
[4]: https://www.python.org/dev/peps/pep-3000/#compatibility-and-transition
[5]: https://github.com/python/peps/commit/f82462002b86feff36215b4230be28967039b0cc
[6]: https://www.python.org/doc/sunset-python-2/
[7]: https://twitter.com/ncoghlan_dev
[8]: http://python-notes.curiousefficiency.org/en/latest/python3/questions_and_answers.html
[9]: https://www.python.org/dev/peps/pep-0404/
[10]: https://twitter.com/pumpichank
[11]: https://cloud.google.com/python/docs/python2-sunset/?utm_source=osdc&utm_medium=blog&utm_campaign=pysunset
[12]: https://access.redhat.com/solutions/4455511
[13]: https://aws.amazon.com/blogs/developer/deprecation-of-python-2-6-and-python-3-3-in-botocore-boto3-and-the-aws-cli/
[14]: https://aws.amazon.com/sdk-for-python/
[15]: https://stackoverflow.blog/2019/11/14/why-is-the-migration-to-python-3-taking-so-long/
[16]: https://twitter.com/vboykis
[17]: https://www.python.org/downloads/
[18]: https://docs.python.org/3.8/whatsnew/3.8.html
[19]: https://docs.python.org/3.8/whatsnew/3.8.html#assignment-expressions
[20]: https://docs.python.org/3.8/whatsnew/3.8.html#positional-only-parameters
[21]: https://docs.python.org/3.8/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging
[22]: https://docs.python.org/3.8/whatsnew/index.html
[23]: https://docs.python.org/3.8/library/asyncio.html#module-asyncio
[24]: https://docs.python.org/3.7/whatsnew/3.6.html#pep-498-formatted-string-literals
[25]: https://docs.python.org/3.7/whatsnew/3.5.html#pep-484-type-hints
[26]: https://docs.python.org/3.8/library/pathlib.html#module-pathlib
[27]: http://py3readiness.org/
[28]: https://pypi.org/project/caniusepython3/
[29]: https://docs.python.org/3/howto/pyporting.html
[30]: https://python3statement.org/practicalities/
[31]: https://twitter.com/di_codes
[32]: https://twitter.com/chriswilcox47
[33]: https://www.youtube.com/watch?v=Bye7Rms0Vgw&utm_source=osdc&utm_medium=blog&utm_campaign=pysunset
[34]: https://twitter.com/treyhunner
[35]: https://www.youtube.com/watch?v=klaGx9Q_SOA
[36]: https://twitter.com/python2sunset

View File

@ -1,162 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (lxbwolf)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to use loops in awk)
[#]: via: (https://opensource.com/article/19/11/loops-awk)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
How to use loops in awk
======
Learn how to use different types of loops to run commands on a record
multiple times.
![arrows cycle symbol for failing faster][1]
Awk scripts have three main sections: the optional BEGIN and END functions and the functions you write that are executed on each record. In a way, the main body of an awk script is a loop, because the commands in the functions run for each record. However, sometimes you want to run commands on a record more than once, and for that to happen, you must write a loop.
There are several kinds of loops, each serving a unique purpose.
### While loop
A **while** loop tests a condition and performs commands _while_ the test returns _true_. Once a test returns _false_, the loop is broken.
```
#!/bin/awk -f
BEGIN {
        # Print the squares from 1 to 10
    i=1;
    while (i &lt;= 10) {
        print "The square of ", i, " is ", i*i;
        i = i+1;
    }
exit;
}
```
In this simple example, awk prints the square of whatever integer is contained in the variable _i_. The **while (i &lt;= 10)** phrase tells awk to perform the loop only as long as the value of _i_ is less than or equal to 10. After the final iteration (while _i_ is 10), the loop ends.
### Do while loop
The **do while** loop performs commands after the keyword **do**. It performs a test afterward to determine whether the stop condition has been met. The commands are repeated only _while_ the test returns true (that is, the end condition has _not_ been met). If a test fails, the loop is broken because the end condition has been met.
```
#!/usr/bin/awk -f
BEGIN {
        i=2;
        do {
                print "The square of ", i, " is ", i*i;
                i = i + 1
        }
        while (i &lt; 10)
exit;
}
```
### For loops
There are two kinds of **for** loops in awk.
One kind of **for** loop initializes a variable, performs a test, and increments the variable together, performing commands while the test is true.
```
#!/bin/awk -f
BEGIN {
    for (i=1; i &lt;= 10; i++) {
        print "The square of ", i, " is ", i*i;
    }
exit;
}
```
Another kind of **for** loop sets a variable to successive indices of an array, performing a collection of commands for each index. In other words, it uses an array to "collect" data from a record.
This example implements a simplified version of the Unix command **uniq**. By adding a list of strings into an array called **a** as a key and incrementing the value each time the same key occurs, you get a count of the number of times a string appears (like the **\--count** option of **uniq**). If you print the keys of the array, you get every string that appears one or more times.
For example, using the demo file **colours.txt** (from the previous articles):
```
name       color  amount
apple      red    4
banana     yellow 6
raspberry  red    99
strawberry red    3
grape      purple 10
apple      green  8
plum       purple 2
kiwi       brown  4
potato     brown  9
pineapple  yellow 5
```
Here is a simple version of **uniq -c** in awk form:
```
#! /usr/bin/awk -f
NR != 1 {
    a[$2]++
}
END {
    for (key in a) {
                print a[key] " " key
    }
}
```
The third column of the sample data file contains the number of items listed in the first column. You can use an array and a **for** loop to tally the items in the third column by color:
```
#! /usr/bin/awk -f
BEGIN {
    FS=" ";
    OFS="\t";
    print("color\tsum");
}
NR != 1 {
    a[$2]+=$3;
}
END {
    for (b in a) {
        print b, a[b]
    }
}
```
As you can see, you are also printing a header column in the BEFORE function (which always happens only once) prior to processing the file.
### Loops
Loops are a vital part of any programming language, and awk is no exception. Using loops can help you control how your awk script runs, what information it's able to gather, and how it processes your data. Our next article will cover switch statements, **continue**, and **next**.
* * *
Would you rather listen to this article? It was adapted from an episode of [Hacker Public Radio][2], a community technology podcast by hackers, for hackers.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/11/loops-awk
作者:[Seth Kenlon][a]
选题:[lujun9972][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/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_progress_cycle_momentum_arrow.png?itok=q-ZFa_Eh (arrows cycle symbol for failing faster)
[2]: http://hackerpublicradio.org/eps.php?id=2330

View File

@ -0,0 +1,130 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Holiday gift guide: Books for the learner, explorer, or tinkerer on your list)
[#]: via: (https://opensource.com/article/19/11/books-wishlist-2019)
[#]: author: (Joshua Allen Holm https://opensource.com/users/holmja)
Holiday gift guide: Books for the learner, explorer, or tinkerer on your list
======
Get our list of books to give as gifts or add to your own wishlist this
holiday season.
![4 books that spell out open][1]
It is my pleasure to introduce Opensource.com's selection of books that would make excellent holiday gift ideas. We hope you find them interesting items to give as gifts this holiday season or to add to your own holiday wishlist. Each book exhibits qualities that make them excellent gifts for open source enthusiasts, as they all encourage learning, exploring, and tinkering.
### The Big Book of Maker Camp Projects
![The Big Book of Maker Camp Projects][2]
**by Sandy Roberts**
[_The Big Book of Maker Camp Projects_][3] contains dozens of projects that are perfect for maker camps or individuals looking to tinker. Projects cover a wide range of topics ranging from making faux campfires using LEDs and Circuit Playground Express (CPX) boards to tie-dye t-shirts and other wearable crafts. There are plenty of projects to keep maker camp participants engaged and entertained.
### How Open Source Ate Software
* * *
* * *
* * *
**![How Open Source Ate Software ][4]**
**by Gordon Haff**
Learn more about the history of open source with [_How Open Source Ate Software_][5]. This brief, 180-page book explores how open source became the phenomenon that it is today. This book is an excellent read for anyone interested in where open source came from and how it changed the way software is developed.
### The Rust Programming Language
* * *
* * *
* * *
**![The Rust Programming Language ][6]**
**by Steve Klabnik and Carol Nichols**
Learn one of the hot, new programming languages with [_The Rust Programming Language_][7]. Yes, this is a print edition of the exact same book that is installed with Rust and can be read in your browser by running **rustup doc --book**, but a physical book offers some benefits by giving the material inside a little more structure than the free HTML version. It is easier to digest material covered over a two-page spread instead of having to scroll through a long web page. Just be sure to get the edition with "Covers Rust 2018" on the cover, so you get a print copy that covers the latest Rust edition.
### Secret Coders: The Complete Box Set
* * *
* * *
* * *
**![Secret Coders][8]**
**by Gene Luen Yang &amp; Mike Holmes**
[_Secret Coders: The Complete Box Set_][9] collects all six volumes in the Secret Coder series. This series of graphic novels introduces readers to the world of coding by following the exploits of the three protagonists, Hopper, Eni, and Josh, as they explore coding and fight against the schemes of Dr. One-Zero. Each book in the series builds upon the volumes that precede it, and by the time readers have finished the series, they should have an excellent understanding of basic programming concepts.
### Thing Explainer
* * *
* * *
* * *
**![Thing Explainer][10]**
**by Randall Munroe**
[_Thing Explainer_][11], by the creator of the [xkcd webcomic][12], is a book in the same vein as David Macaulay's [_The Way Things Work_][13] and similar titles. This book, as one would expect from the title, explains things. Using only the 1,000 most common words in the English language and illustrations, Munroe explains airplanes, tectonic plates, and more.
### Open role-playing games and dice tower
![Pathfinder][14] | ![Starfinder][15]
---|---
![Fate Core][16] | ![Fate Accelerated][17]
If you would like to spend time with your friends and family having exciting adventures, consider one of several pen-and-paper role-playing games with rules books that are released under an open license.
For example, Paizo's [_Pathfinder_][18] and [_Starfinder_][19] are released under the [Open Game License][20], and [_Fate Core_][21] and [_Fate Accelerated_][22] from Evil Hat are released under the Open Game License and a Creative Commons Attribution license.
But these are just a few examples, there are plenty of role-playing games that are [released under an open license][23], so there are games out there for a variety of tastes. You can also pair the rule books with a homemade dice tower using these Creative Commons Attribution-NonCommercial licensed [dice tower plans][24].
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/11/books-wishlist-2019
作者:[Joshua Allen Holm][a]
选题:[lujun9972][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/holmja
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_OSDC_BYU_520x292_FINAL.png?itok=NVY7vR8o (4 books that spell out open)
[2]: https://opensource.com/sites/default/files/uploads/the_big_book_of_maker_camp_projects.jpg (The Big Book of Maker Camp Projects)
[3]: http://www.kaleidoscopeenrichment.com/home/the-big-book-of-maker-camp-projects/
[4]: https://opensource.com/sites/default/files/uploads/how_open_source_ate_software.jpg (How Open Source Ate Software )
[5]: https://www.apress.com/us/book/9781484238936
[6]: https://opensource.com/sites/default/files/uploads/the_rust_programming_language.jpg (The Rust Programming Language )
[7]: https://nostarch.com/Rust2018
[8]: https://opensource.com/sites/default/files/uploads/secret_coders_the_complete_boxed_set.jpeg (Secret Coders)
[9]: https://us.macmillan.com/secretcodersthecompleteboxedset/geneluenyang/9781250294685/
[10]: https://opensource.com/sites/default/files/uploads/thing_explainer.png (Thing Explainer)
[11]: https://xkcd.com/thing-explainer/
[12]: https://xkcd.com/
[13]: https://en.wikipedia.org/wiki/The_Way_Things_Work
[14]: https://opensource.com/sites/default/files/uploads/pathfinder_100px.jpg (Pathfinder)
[15]: https://opensource.com/sites/default/files/uploads/starfinder_100px.jpg (Starfinder)
[16]: https://opensource.com/sites/default/files/uploads/fate_core_100px.jpg (Fate Core)
[17]: https://opensource.com/sites/default/files/uploads/fate_accelerated_100px.jpg (Fate Accelerated)
[18]: https://paizo.com/pathfinder
[19]: https://paizo.com/starfinder
[20]: https://en.wikipedia.org/wiki/Open_Game_License
[21]: https://www.evilhat.com/home/fate-core/
[22]: https://www.evilhat.com/home/fae/
[23]: https://opensource.com/article/19/5/free-rpg-day
[24]: https://msraynsford.blogspot.com/2016/05/working-dice-tower-with-plans.html

View File

@ -0,0 +1,247 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to write a Python web API with Django)
[#]: via: (https://opensource.com/article/19/11/python-web-api-django)
[#]: author: (Rachel Waston https://opensource.com/users/rachelwaston)
How to write a Python web API with Django
======
Django is one of the most popular frameworks for Python API development.
Learn how to use it in this quick tutorial.
![Hands on a keyboard with a Python book ][1]
[Django][2] is the comprehensive web framework by which all other frameworks are measured. One of the most popular names in Python API development, Django has surged in popularity since its start in 2005.
Django is maintained by the Django Software Foundation and has experienced great community support, with over 11,600 members worldwide. On Stack Overflow, Django has around 191,000 tagged questions. Websites like Spotify, YouTube, and Instagram rely on Django for application and data management.
This article demonstrates a simple API to fetch data from a server using the GET method of the HTTP protocol.
### Set up a project
First, create a structure for your Django application; you can do this at any location on your system:
```
$ mkdir myproject
$ cd myproject
```
Then, create a virtual environment to isolate package dependencies locally within the project directory:
```
$ python3 -m venv env
$ source env/bin/activate
```
On Windows, use the command **env\Scripts\activate** to activate your Python virtual environment.
### Install Django and the Django REST framework
Next, install the Python modules for Django and Django REST:
```
$ pip3 install django
$ pip3 install djangorestframework
```
### Instantiate a new Django project
Now that you have a work environment for your app, you must instantiate a new Django project. Unlike a minimal framework like [Flask][3], Django includes dedicated commands for this process (note the trailing **.** character in the first command):
```
$ django-admin startproject tutorial .
$ cd tutorial
$ django-admin startapp quickstart
```
Django uses a database as its backend, so you should sync your database before beginning development. The database can be managed with the **manage.py** script that was created when you ran the **django-admin** command. Because you're currently in the **tutorial** directory, use the **../** notation to run the script, located one directory up:
```
$ python3 ../manage.py makemigrations
No changes detected
$ python4 ../manage.py migrate
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying sessions.0001_initial... OK
```
### Create users in Django
Create an initial user named **admin** with the example password of **password123**:
```
$ python3 ../manage.py createsuperuser \
  --email [admin@example.com][4] \
  --username admin
```
Create a password when you're prompted.
### Implement serializers and views in Django
For Django to be able to pass information over to an HTTP GET request, the information object must be translated into valid response data. Django implements **serializers** for this.
In your project, define some serializers by creating a new module named **quickstart/serializers.py**, which you'll use for data representations:
```
from django.contrib.auth.models import User, Group
from rest_framework import serializers
class UserSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = User
        fields = ['url', 'username', 'email', 'groups']
class GroupSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Group
        fields = ['url', 'name']
```
A [view][5] in Django is a function that takes a web request and returns a web response. The response can be HTML, or an HTTP redirect, or an HTTP error, a JSON or XML document, an image or TAR file, or anything else you can get over the internet. To create a view, open **quickstart/views.py** and enter the following code. This file already exists and has some boilerplate text in it, so keep that and append this text to the file:
```
from django.contrib.auth.models import User, Group
from rest_framework import viewsets
from tutorial.quickstart.serializers import UserSerializer, GroupSerializer
class UserViewSet(viewsets.ModelViewSet):
    """
    API endpoint  allows users to be viewed or edited.
    """
    queryset = User.objects.all().order_by('-date_joined')
    serializer_class = UserSerializer
class GroupViewSet(viewsets.ModelViewSet):
    """
    API endpoint  allows groups to be viewed or edited.
    """
    queryset = Group.objects.all()
    serializer_class = GroupSerializer
```
### Generate URLs with Django
Now you can generate URLs so people can access your fledgling API. Open **urls.py** in a text editor and replace the default sample code with this code:
```
from django.urls import include, path
from rest_framework import routers
from tutorial.quickstart import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
# Use automatic URL routing
# Can also include login URLs for the browsable API
urlpatterns = [
    path('', include(router.urls)),
    path('api-auth/', include('rest_framework.urls', namespace='rest_framework'))
]
```
### Adjust your Django project settings
The settings module for this example project is stored in **tutorial/settings.py**, so open that in a text editor and add **rest_framework** to the end of the **INSTALLED_APPS** list:
```
INSTALLED_APPS = [
    ...
    'rest_framework',
]
```
### Test your Django API
You're now ready to test the API you've built. First, start up the built-in server from the command line:
```
`$ python3 manage.py runserver`
```
You can access your API by navigating to the URL **<http://localhost:8000/users>** using **curl**:
```
$ curl --get <http://localhost:8000/users/?format=json>
[{"url":"<http://localhost:8000/users/1/?format=json","username":"admin","email":"admin@example.com","groups":\[\]}\]>
```
Or use Firefox or the [open source web browser][6] of your choice:
![A simple Django API][7]
For more in-depth knowledge about RESTful APIs using Django and Python, see the excellent [Django documentation][8].
### Why should I use Django?
The major benefits of Django:
1. The size of the Django community is ever-growing, so you have lots of resources for guidance, even on a complicated project.
2. Features like templating, routing, forms, authentication, and management tools are included by default. You don't have to hunt for external tools or worry about third-party tools introducing compatibility issues.
3. Simple constructs for users, loops, and conditions allow you to focus on writing code.
4. It's a mature and optimized framework that is extremely fast and reliable.
The major drawbacks of Django are:
1. Django is complex! From a developer's point of view, Django can be trickier to learn than a simpler framework.
2. There's a big ecosystem around Django. This is great once you're comfortable with Django, but it can be overwhelming when you're still learning.
Django is a great option for your application or API. Download it, get familiar with it, and start developing an amazing project!
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/11/python-web-api-django
作者:[Rachel Waston][a]
选题:[lujun9972][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/rachelwaston
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python-programming-code-keyboard.png?itok=fxiSpmnd (Hands on a keyboard with a Python book )
[2]: https://www.djangoproject.com/
[3]: https://opensource.com/article/19/11/python-web-api-flask
[4]: mailto:admin@example.com
[5]: https://docs.djangoproject.com/en/2.2/topics/http/views/
[6]: https://opensource.com/article/19/7/open-source-browsers
[7]: https://opensource.com/sites/default/files/uploads/django-api.png (A simple Django API)
[8]: https://docs.djangoproject.com/en/2.2

View File

@ -0,0 +1,185 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (7 maker gifts for kids and teens)
[#]: via: (https://opensource.com/article/19/11/maker-gifts-kids)
[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake)
7 maker gifts for kids and teens
======
Make your holiday gift shopping easy with this guide to gifts sure to
spark creativity and innovation in babies, kids, tweens, teens, and
beyond.
![Gift box opens with colors coming out][1]
Struggling with what gifts to give the young person in your life this holiday season? Here are my top picks for open source presents that will spark creativity and inspire for years to come.
### Hummingbird Robotics Kit
![Hummingbird Robotics Kit][2]
**Ages**: 8 to adult
**What it is:** The [Hummingbird Robotics Kit][3] is a complete robotics kit with a microcontroller, motors, LEDs, and sensors. The robot brain has special ports that little hands can easily attach robot components to. The Hummingbird kits don't come with a body, empowering users to create their own.
**Why I love it:** The Hummingbird works with multiple programming languages—from visual (BirdBlox, MakeCode, Snap) to text (Python and Java)— making it scalable as users' coding skills increase. All the components are exactly as you'd find them at an electronics store, not obscured by plastic like other robot kits. This demystifies the inner workings of robots and makes it easy to source more parts if needed.
Because there is no set project, the Hummingbird is the perfect robot for creativity.
The Hummingbird Bit has open source software and firmware. It works on Linux, Windows, Mac, Chromebook, Android, and iOS.
**Cost:** Starts at US$ 99.
### Makey Makey Classic
![Makey Makey Classic][4]
**Ages:** 6 to adult
**What it is:** [Makey Makey Classic][5] turns any conductive object, from marshmallows to a friend, into a computer key.
You use alligator clips to connect the Makey Makey to the conductive object of your choice. Then, you close the circuit between the ground connection and any trigger key by touching both conductive objects at the same time. The Makey Makey is a good way to safely explore electricity at home while creating interesting ways to interact with your computer.
**Why I love it:** Makey Makey can be paired with video games made in Scratch to create unique controllers that further immerse users in the game. The possibilities are endless, from instruments made of toilet rolls and foil to interactive art and stories. It works on Linux, Windows, and Mac computers with a USB port.
**Cost:** US$ 49.95
### Arduino Uno
![Arduino Uno][6]
**Ages**: 10 to adult
**What it is:** Arduinos are microcontrollers that can be purchased with or without an electronics kit, and they come in many different flavors, though I like the [Arduino Uno][7] the best. Additional components, such as LEDs, motors, and sensors can be purchased as needed from any electronics shop.
**Why I love it:** The Arduino Uno is well-documented, so it's easy for makers to find tutorials online. The Arduino can bring a wide variety of electronic projects to life, from simple to complex. The Arduino features open source firmware and hardware. It works on Linux, Mac, and Windows.
**Cost:** Starts at US$ 22.00 for the board. The overall cost varies depending on projects and skill level.
### DIY maker kit
![A maker kit assembled in a quick trip to the hardware store][8]
**Ages**: 8 to adult
**What it is:** Many of today's makers, creators, and programmers started out tinkering with objects that happened to be lying around. You can create an awesome maker kit for the young person in your life with a quick trip to the nearest electronics store. Here's what's in my maker kit:
* Eye goggles
* Hammer
* Nails and screws
* Scraps of wood
* Screwdrivers
* Wire
* LEDs
* Piezo buzzer
* Motors
* AA battery pack with leads
* Wire cutters
* Cardboard
* Masking tape
* Scrap fabric
* Buttons
* Thread
* Needles
* Zippers
* Hooks
* A cool tackle box to store everything in
**Why I love it: **Remember when you were a kid and your parents brought home an empty cardboard box that you turned into a spaceship or a house or a supercomputer? That's what a DIY maker kit can be for older kids.
Raw components empower kids to experiment and use their imaginations. A DIY maker kit can be completely customized for the recipient. Be sure to throw in some components the giftee may have never thought to create with, like giving an avid sewer some LEDs or a woodworker fabric.
**Cost:** Variable
### Heuristic play basket
![Heuristic play kit][9]
**Ages:** 8 months to 5 years
**What it is:** Heuristic play baskets are filled with interesting objects made from natural, non-toxic materials for infants and toddlers to explore using their five senses. It's open-ended, self-directed play at its best. The idea is that an adult will supervise (but not direct) a child's use of the basket and its items for a half-hour, then put the basket away until the next time.
It's easy to create a lovely play basket with common household objects. Try to include items with varying textures, sounds, smells, shapes, and weights. Here are some ideas to get you started.
* Colander or ridged wicker basket to hold everything
* Wooden spoon
* Metal whisks and spoons
* Scrubbing brush
* Sponge
* Small egg carton
* Cardboard tubes
* Small rolling pin
* Textured washcloth
* Rocks
* Handbells
* Crochet doily
* Small tin with a lid
Play baskets should not include anything easily breakable or small enough to fit inside a paper towel roll, as these are choking hazards, and all objects should be cleaned thoroughly before being given to a child.
**Why I love it:** Play baskets are fantastic for sensory development and helping young children ask questions and explore the world around them. This is an important part of developing a maker mindset!
It's easy to obtain suitable items for a play basket; you probably already have many interesting objects in your home or at your nearest second-hand store. Toddlers will use their play baskets differently than infants. These objects will grow with children as they begin to mimic adult life and tell stories through their play.
**Cost:** Variable
### Hello Ruby
![Hello Ruby book cover][10]
**Ages**: 58
**What it is:** _[Hello Ruby][11]: Adventures in Coding_ is an illustrated book by Linda Liukas that introduces children to programming concepts through a fun narrative about a girl who encounters problems and friends, each of which represents code. Liukas' other _Hello Ruby_ books are subtitled _Expedition to the Internet_ and _Journey Inside the Computer_, and _Adventures in Coding_ has been published in more than 20 languages.
**Why I love it:** The author accompanies the book with a number of free, fun, and unplugged activities that can be downloaded and printed out from the Hello Ruby website. These activities teach coding concepts and also touch on artistic expression, communication, and even time management.
**Cost:** List price for the hardcover book is US$ 17.99, but you may find it at a lower price through local or online booksellers.
### Girls Who Code: Learn to Code and Change the World
![Girls Who Code book cover][12]
**Ages**: 10 to adult
**What it is:** Written by Reshma Saujani, the founder of Girls Who Code, _[Girls Who Code: Learn to Code and Change the World][13]_ gives practical information about the tech world for young girls (and boys). It covers a wide variety of topics, including coding languages, use-cases, terminology and vocabulary, career options, and profiles and interviews with people in the tech industry.
**Why I love it:** This book tells the story of tech in ways even most websites meant for adults miss out on. Technology encompasses so many disciplines, and it's important for young people to understand they can use it to solve real-world problems and make a difference.
**Cost:** List price for the hardcover book is US$ 17.99 and US$ 10.99 for the paperback, but you may find it at a lower price through local or online booksellers.
I can see the brightness of curiosity in my six year old niece Shuchi's eyes when she explores a...
Scratch is a free educational programming language for kids, available in 50 different languages...
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/11/maker-gifts-kids
作者:[Jess Weichler][a]
选题:[lujun9972][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/cyanide-cupcake
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out)
[2]: https://opensource.com/sites/default/files/uploads/hummingbird.png (Hummingbird Robotics Kit)
[3]: https://www.birdbraintechnologies.com/hummingbirdbit/
[4]: https://opensource.com/sites/default/files/uploads/makeymakey2.jpg (Makey Makey Classic)
[5]: https://makeymakey.com/
[6]: https://opensource.com/sites/default/files/uploads/arduinouno.jpg (Arduino Uno)
[7]: https://www.arduino.cc/
[8]: https://opensource.com/sites/default/files/makerbox-makerkit.jpg (A maker kit assembled in a quick trip to the hardware store)
[9]: https://opensource.com/sites/default/files/makerbox-sensorykit.jpg (Heuristic play kit)
[10]: https://opensource.com/sites/default/files/uploads/helloruby2.jpg (Hello Ruby book cover)
[11]: https://www.helloruby.com/
[12]: https://opensource.com/sites/default/files/uploads/girlswhocodebook.jpg (Girls Who Code book cover)
[13]: https://girlswhocode.com/book/girls-code-learn-code-change-world/

View File

@ -0,0 +1,255 @@
23 款开源的声音视觉生产工具
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-photo-camera-blue.png?itok=AsIMZ9ga)
“开源”在云基础设施、网站托管、嵌入式设备和其他领域已经建立的相当完善。很少数人知道开源在生产专业级的声音视觉素材上也是一个不错的选择。
作为一名产品经理(有时候也是市场支持),我为终端用户提供很多内容:文档,文章,视频教学,甚至是展台物料,白纸,采访等等。我找到了很多可以帮我制作音频、视频,排版,截屏的开源软件。人们选择开源软件而不是专有软件的[原因][1]有很多,而我也为以下人群编制了一份开源音视频工具清单:
* 想要入坑 GNU/Linux但需要在原来的操作系统上慢慢开始使用跨平台软件
* 热爱开源,但对音视频开源软件所知甚少,不知道该如何选择
* 想要为创造力充电而探索新的工具,并且不想使用其他人使用过的方法工具
* 存在某些其他的原因使用开源音视频解决方案(如果是你,不妨在评论里分享一下)
幸运的是,存在着很多开源音视频软件的创造者,也存在着很多硬件来支持这些应用。本文清单里的所有软件都符合以下标准:
* 跨平台
* 开源(软件和驱动)
* 稳定
* 积极维护
* 良好的文档与技术支持
我将清单中的解决方案划分为图形,音频,视频和动画。注意,本文中提到的应用程序并不完全等同于一些有名的私有软件,它们需要花时间来学习,并且可能需要改变你的工作流程,但是学习新的工具能够让体验全新的创造方式。
### 图形
我制作过很多出版和网站使用的图形,包括 logo横幅视频标题模型。这里是一些我用过的开源应用也包括一起使用的硬件。
#### 软件
**1.[Inkscape][2]** (矢量图)
Inkscape 是一款不错的矢量图编辑器,用来制作 RGB 颜色空间下的 SVG 和 PDF 文件。(它可以制作 CMYK 图像,但不是主要用途)它是为 web 应用制作 SVG 格式的地图和图表的人的救命稻草。你不仅可以使用集成的 XML 编辑器打开文件,也可以用它查看对象的所有参数。但有一个缺点:它在 Mac 上的优化不是很好。有很多样例,可以看[Inkscape 画廊][3]。
**2.[GIMP][4]** (图片编辑器)
GIMP 是我最喜欢的图片编辑程序,它包括了色彩调整,裁剪和拉伸,并且(尤其是)对于网页使用的文件大小进行了优化(很多使用 Photoshop 的同事让我帮他们做这最后一步)。你也可以从头制作并绘制一张图片,但 GIMP 并不是我最喜欢用来做这件事的工具。在 [GIMP Artists on DevianArt][5] 上查看众多的样例。
**3.[Krita][6]** (数字绘画)
当你桌子上摆着一个漂亮的 Wacom 数位板你肯定想试试真正的数字绘画应用。Krita 就是你创作漂亮插画所需要的工具。在 [Krita 画廊][7] 里看看我说的东西吧。
**4.[Scribus][8]** (桌面印刷系统)
你可以使用 Scribus 来创建一个完整的文档,或者通过 Inkscape 或 Libre Office 将 PDF 从 RGB 转换到 CMYK 。有一个功能我非常喜欢:你可以试着模拟视觉障碍人士使用 Scribus 时的体验。当我发送 PDF 文件给商用打印机时全指望 Scribus。尽管出版社可能使用像 InDesign 这样的私有软件创建文档,但如果你用 Scribus 正确的完成一份文档,那么打印时就不会出现任何问题。免费建议:第一次发送文件给打印机时,不要告诉打印机创建该文档所使用的软件。你可以在 [Scribus 教程][9]中寻找创建文档的例子。
**5.[RawTherapee][10]** RAW 图像开发工具)
RawTherapee 是我所知道唯一跨平台可替代 Lightroom 的软件。你可以将相机调整到 RAW 模式,然后使用 RawTherapee 来修图。它提供了非常强大的引擎和对图片没有破坏的编辑器。例如,可以见 [Raw Therapee 截图][11]。
**6.[LibreOffice Draw][12]** (桌面印刷系统)
尽管你可能认为 LibraOffice Draw 不是一款专业的桌面印刷解决方案,但它仍然能够在很多情况下帮助你。例如,制作白皮书,图表,或其他人(尽管是那些不懂图形软件的人)以后可以修改的海报。它不仅方便使用,而且当创建有趣的文档时也是 Impress 或 PowerPoint 的绝佳替代软件。
#### 图形硬件
**绘图板**
[Wacom][13] 数位板(和配件)通常支持所有的操作系统。
**颜色校正**
颜色校正产品通常可用于所有操作系统,也包括了 GNU/Linux。Datacolor 生产的 [Spyder][14] 在所有平台上都有应用程序的支持。
**扫描仪和打印机**
图形艺术家需要输出(无论是打印还是数字存储)精确的颜色。但是真正跨平台的设备,以及所有平台都易于安装的驱动,并不像你想的那样普遍。你的最佳选择是兼容 TWAIN 的扫描仪和兼容 Postscript 的打印机。以我的经验Epson 和 Xerox 的专业级扫描仪和打印机更不容易出现驱动问题,并且它们通常也是开箱即用,拥有漂亮精确的颜色。
### 音频
有许多可供音乐家,视频制作者,游戏制作者,音乐出版商等等人群选择的开源音频软件。这里有一些我曾经用来进行内容创作与声音录制时所使用的软件。
#### 软件
**7. [Ardour][15] **(数字音频录制)
对录音与编辑来说,最专业级的工具选择当然是唾手可得的 Ardour。听起来很棒它的混音部分非常的完整灵活能够提供给你喜欢的插件并且易于回放、编辑、对比修改。我经常用它进行声音录制和视频混音。要找出一些使用 Ardour 录制好的音乐并不容易,因为音乐家们很少相信它们使用的软件。然而,你可以查看它的[截图][16]和一些特性来了解它的功能。
(如果你在寻求一种声音制作方面的“模拟感觉”,你可以试试 [Harrison Mixbus][17],它并不是一个开源项目,但是高度基于 Ardour拥有模拟显示的终端。我非常喜欢用它进行工作我的客户也喜欢用它制作的声音。Mixbus 也是跨平台的)
**8.[Audacity][18]** (声音编辑)
Audacity 属于“瑞士军刀”级的声音制作软件。它并不完美,但你几乎可以用它做所有的事情。加上非常易于使用,任何人都能在几分钟之内上手。像 Ardour 一样,很难找到一份归功于 Audacity 的作品,但你可以从这些[截图][19]中了解如何使用它。
**9.[LMMS][20]** (音乐制作)
LMMS设计的就像 FL Studio 的替代品,也许并不那么广泛,但它非常完整并易于使用。你可以使用自己最喜欢的插件,使用“钢琴键”编辑乐器,使用<ruby>步定序器<rt>step sequencer</rt></ruby>播放鼓点,混合音轨...几乎能做任何事情。在我没有时间给音乐家录音的时候我就使用它为视频创建声音片段。查看[最好的 LMMS][21] 榜单来看看一些例子。
**10.[Mixxx][22]** DJ,音乐混音)
如果你需要强大的混音和播放 DJ 软件Mixx 就可以满足你的需求。它与大多数 MIDI 控制器,唱片,专用声卡所兼容。你可以用它管理音乐库,添加音效,做一些有趣的事情。查看它的[功能][23]来了解它是如何工作的。
#### 音频接口硬件
尽管你可以使用任何一个计算机的声卡录制音频,但要录制的很好,就需要一个音频接口——一个录制高质量音频输入的专用的外部声卡。对于跨平台兼容性来说,大多数“兼容 USB”和“兼容 IOS”的音频接口设备应该都能录制 MIDI 或其他音频。下面是一些我用过的一些有名气的跨平台设备。
**[Behringer U-PHORIA UMC22][24]**
UMC22 是你可以考虑的最便宜的选择。但它的前置放大器噪音太大,<ruby>音腔<rt>box</rt></ruby>质量也比较低。
**[Presonus AudioBox USB][25]**
AudioBox USB 是第一个兼容 USB因此也跨平台 的录音系统。它非常的耐用,经常在二手市场也能见到。
**[Focusrite Scarlett][26]**
Scarlett 在我看来是目前最高质量的跨平台声卡。不同种类的设备可以涵盖 2-18 个输入/输出端口。你可以在二手市场找到它的最初版本,而最新的第二代具有更好的前置放大器与规格。[2i2][27] 型号是我经常使用的那一款。
**[Arturia AudioFuse][28]**
AudioFuse 几乎可以让你接入任何设备,从麦克风到黑胶唱片机再到各种数字输入设备。它具有优质的声音与良好的设计,也是我目前用的最多的一款设备。它是跨平台的,但目前配置软件还不能在 GUN/Linux 上使用。即使我把它从 Windows 电脑上断开它仍然保留着我的配置。但是讲真Arturia劳烦认真考虑做一个 Linux 的软件。
#### MIDI 控制器
MIDI 控制器是一种乐器——例如电子琴,鼓垫等等。可以让你控制音乐软件或者硬件。现有的大多数 USB MIDI 控制器都跨平台并兼容主流的录音编辑软件。基于网页的教程可以帮你对不同的软件进行配置。尽管找到有关 GNU/Linux 的配置信息可能比较困难,但它们仍然是可以使用的。我用过许多 Akai 和 M-Audio 设备,没有任何问题。在买乐器之前最好先试一下,至少去听一下它们的音质或体验一下按键触感。
#### 音频编解码器
音频编解码器压缩或解压数字音频,用尽可能小的文件大小获得最佳质量的声音。幸运的是,用于收听或流媒体播放的编解码器恰好是开源的:[FLAC][29]。[Ogg Vorbis][30] 是另一个值得了解的开源音频编解码器;在相同的比特率下比 MP3 好的多。如果你需要输出不同的音频格式,我建议通常存档最好质量的音频,然后再压缩成特定的版本。
### 视频
视频对于品牌的传播是影响巨大的。即使你不是一个视频专家,学习一些基础的东西也是非常明智的。
#### 软件
**11.[VLC][31]** (视频播放器与转换器)
最初是为流媒体而开发的VLC 现在因能够在所有设备上读取所有的视频格式被人们熟知。它非常的实用,例如,你可以使用它将视频转换成其他编解码格式或容器,也可以用来恢复破损的视频。
**12.[OpenShot][32]** (视频编辑)
OpenShot 是一个简单的软件,但它却可以制作出很好的效果,尤其是在短视频上。(在编辑或改善音质方面有一定的限制,但它也能够完成)我非常喜欢它的移动,拉伸,裁剪工具;用它创建视频的开头或结尾,导出之后使用更复杂的编辑器进行编辑,非常的完美。你可以在 OpenShot 的网站上看这些[例子][33](并获取更多信息)。
**13.[Shotcut][34]** (视频编辑)
我认为 Shotcut 是比 OpenShot 更完整一些的工具——它在你的操作系统上比起其他较为基础的编辑器更具有竞争力,并且它支持 4K 分辨率,具有专业的解码器。尝试一下,我相信你会爱上它的。你可以在这些[视频教程][35]里看一些范例。
**14.[Blender Velvets][36]** (视频编辑,合成,特效)
尽管这一章节不是本文的学习重点,但 Blender Velvets 是你能找到的最强大的解决方案之一。它是由一些视频创作者所制作的一系列扩展工具和脚本的合集,是通过 Blender 3D 制作软件转换成的 2D 视频编辑器。 尽管它的复杂度意味着不是我的首选视频编辑器,但你仍可以在 YouTube 和其他网站上找到它的教程,并且一旦你学习了它,你就能通过它做任何事情。观看这个[视频教程][37]来了解它的功能与运作方式。
**15.[Natron][38]** (合成)
我不使用 Natron但我听说它广受好评。它是 Adobe After Effects 的替代品,但运作方式并不同。想了解更多可以观看一些视频教程,比如这些 Natron 的 [YouTube 频道][39]。
**16.[OBS][40]** (实时编辑,录制,流媒体)
Open Broadcaster Software OBS是一个领先的在 YouTube 或 Twitch 上进行现场录制或现场直播电子竞技,电视游戏的解决方案。我经常使用它记录用户的屏幕,会议和聚会。获取更多信息,查看我曾经在 Opensource.com 上写的关于录制现场汇报的教程,[第一部分:选择你的设备][42]和[第二部分:软件安装][43]。
#### 视频硬件
结论先行:你需要一个强大的工作站以及快速的硬盘和更新后的软件和驱动。
**图形处理单元GPU**
一部分包含在清单里的软件比如 Blender 和 Shotcut 使用 OpenGL 和硬件加速,这些都高度依赖 GPU。我建议你使用可以负担起的最强大的 GPU。我所使用过的 AMD 和 Nvidia 都有着良好的体验,这取决于使用的平台。不要忘记安装最新的驱动。
**硬件驱动**
大体上来说,驱动做的越快越大,对视频越好。不要忘记在软件里配置好正确的路径。
**视频录制硬件**
* [Blackmagic Design][44]: Blackmagic 提供了非常好,专业级的视频录制和回放硬件。驱动支持 MacWindows和 GNU/Linux但不是所有的发行版
* [Epiphan][45]: 在 Epiphan 的专业级 USB 视频录制设备中有一款新型产品,它适用于 HDMI 和高分辨率的屏幕。然而,你也可以在二手市场找到旧的 VGA 设备,因为他们还在继续为 GNU/Linux 和 Windows 上提供专用的驱动程序。
#### 视频编解码
不幸的是,使用开源的编解码器仍然很困难。例如,许多相机使用专有的编解码器录制 H.264 的视频和 AC3 的音频,组成称为 AVCHD 的格式。因此,我们必须务实,尽可能利用现有资源。
好消息是内容产业正在步向开源的编解码器来避免一些费用,并使用开源标准。对于出版和流媒体,[谷歌][46]的 [WebM][46] 便是一款优秀的开源编解码器,并且大多数视频编辑器可以导入这种格式。同样地, [GoPro][47]的超高分辨率和 360° 视频编解码器 [Cineform][47] 现在也进行了开源。希望更多的设备和供应商将会在不久之后使用它。
### 2D 和 3D 动画
动画不是我的专业领域,因此我问了从事于动画内容生产的朋友一些建议并加入到清单中,他的工作包含儿童电影和连续剧。
#### 软件
**17. [Blender][48] ** 3D 模型和渲染)
Blender 是顶级的开源跨平台 3D 建模和渲染软件。你可以直接在 Blender 中完成整个项目的工作,或者使用它为电影或视频创建 3D 效果。你能够在网上找到许多视频教程因此即使它不是一个简单的软件但非常容易上手。Blender 是一个非常活跃的项目,经常还会制作一些微电影来展示他们的技术。你可以在 [Blender Open Movies][49] 上观看。
**18.[Synfig Studio][50]** 2D 动画)
第一次用 Synfig 时,它让我想起了那个不错的 Macromedia 老式 Flash 编辑器。在那之后,它已经发展成一个全功能的 2D 动画工作室。你可以使用它制作畅销故事,商业广告,演示,开场或结尾动画以及视频中的转场,或者甚至用它制作全动画的电影。见[ Synfig 作品集][51]。
**19.[TupiTube][52]** (定格 2D 动画)
使用 TupiTube 是一个学习基本 2D 动画的极好方法。你可以将一系列绘画或其他图片转换成一个视频或者创建一个 GIF 循环动画。它是一个相当简单的软件,但非常完整。查看 [TupiTude 的 YouTube][53] 频道获取一些教程和范例。
#### 硬件
动画制作使用与图形设计相同的硬件,因此查看第一小结中的硬件清单获取一些建议。
有一点需要注意:你要用一个强大的 GPU 来进行 3D 建模和渲染。选择可能有些限制,因为这取决于你使用的平台或电脑制造商,但是不要忘记安装最新的驱动。谨慎选择你的显卡:它们非常昂贵,并且在大型的 3D 项目中至关重要,尤其是在渲染步骤中。
### Linux 上的选择
如果你是 GUN/Linux 用户,那么我为您提供了更多不错的选择。它们并不是完全跨平台的,但部分拥有 Windows 版本,还有一些可以在 Mac 上使用 Macports 安装。
**20.[Kdenlive][54]** (视频编辑)
伴随着最新版本的发布几个月之前Kdenlive 成为了我最喜欢的视频编辑器,尤其是当我在 Linux 机器上处理一些长视频的时候。如果你经常使用流行的非线性视频编辑器Kdenlive全称是 <ruby>KDE 非线性视频编辑器<rt>KDE Non-Linear Video Editor</rt></ruby>)对你来说将非常简单。他拥有很棒的视频和音频特效,强大的细节处理能力。并且在 BSD 和 MacOS尽管它对准的是 GNU/Linux都能使用还有望移植到 Windows 上。
**21.[Darktable][55]** RAW 图像开发)
Darktable 是一款由摄影师制作的非常完整的 DxO PhotoLab 替代品。一些研究型项目使用它当做开发平台并测试一些图像处理算法。它是一个非常活跃的项目,我已经等不及的见到它的跨平台版本了。
**22.[MyPaint][56]** digital painting数字绘画
MyPaint 就像数字绘画领域的 light table。译注集成开发环境它在 Wacom 设备上表现良好,并且它的笔刷引擎尤其值得赞赏,因此 GIMP 开发人员正在密切的关注它。
**23.[Shutter][57]** (桌面截图)
当我写这篇教程的时候,我使用了许多截图来进行展示。我最喜欢的 GNU/Linux 截图工具就是 Shutter。事实上我都找不到在 Windows 或 Mac 上能与之抗衡的一些功能。有一点小遗憾:我很期待 Shutter 在将来能够增加新的功能来创建几秒动态的 GIF 截图。
我希望这些足以说服你开源软件是一种非常卓越且可行的音视频内容生产解决方案。如果你正在使用其他开源软件,或者对于使用跨平台软件和硬件进行音视频项目有好的建议,请在评论中分享你的观点。
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/2/open-source-audio-visual-production-tools
作者:[Antoine Thomas][a]
译者:[LuuMing](https://github.com/LuuMing)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/ttoine
[1]:https://opensource.com/resources/what-open-source
[2]:https://inkscape.org/
[3]:https://inkscape.org/en/gallery/
[4]:https://www.gimp.org/
[5]:https://gimp-artists.deviantart.com/gallery/
[6]:https://krita.org/
[7]:https://krita.org/en/features/gallery/
[8]:https://www.scribus.net/
[9]:https://www.scribus.net/category/made-with-scribus/
[10]:http://rawtherapee.com/
[11]:http://rawtherapee.com/blog/screenshots
[12]:https://www.libreoffice.org/discover/draw/
[13]:http://www.wacom.com/en-us
[14]:http://www.datacolor.com/photography-design/product-overview/#workflow_2
[15]:https://www.ardour.org/
[16]:http://ardour.org/features.html
[17]:http://harrisonconsoles.com/site/mixbus.html
[18]:http://www.audacityteam.org/
[19]:http://www.audacityteam.org/about/screenshots/
[20]:https://lmms.io/
[21]:https://lmms.io/showcase/
[22]:https://www.mixxx.org/
[23]:https://www.mixxx.org/features/
[24]:http://www.musictri.be/Categories/Behringer/Computer-Audio/Interfaces/UMC22/p/P0AUX
[25]:https://www.presonus.com/products/audiobox-usb
[26]:https://us.focusrite.com/scarlett-range
[27]:https://us.focusrite.com/usb-audio-interfaces/scarlett-2i2
[28]:https://www.arturia.com/products/audio/audiofuse/overview
[29]:https://en.wikipedia.org/wiki/FLAC
[30]:https://xiph.org/vorbis/
[31]:https://www.videolan.org/
[32]:https://www.openshot.org/
[33]:https://www.openshot.org/videos/
[34]:https://shotcut.com/
[35]:https://shotcut.org/tutorials/
[36]:http://blendervelvets.org/
[37]:http://blendervelvets.org/video-tutorial-new-functions-for-the-blender-velvets/
[38]:https://natron.fr/
[39]:https://www.youtube.com/playlist?list=PL2n8LbT_b5IeMwi3AIzqG4Rbg8y7d6Amk
[40]:https://obsproject.com/
[41]:https://opensource.com/article/17/7/obs-studio-pro-level-streaming
[42]:https://opensource.com/article/17/9/equipment-recording-presentations
[43]:https://opensource.com/article/17/9/equipment-setup-live-presentations
[44]:https://www.blackmagicdesign.com/
[45]:https://www.epiphan.com/
[46]:https://www.webmproject.org/
[47]:https://fr.gopro.com/news/gopro-open-sources-the-cineform-codec
[48]:https://www.blender.org/
[49]:https://www.blender.org/about/projects/
[50]:https://www.synfig.org/
[51]:https://www.synfig.org/#portfolio
[52]:https://maefloresta.com/
[53]:https://www.youtube.com/channel/UCBavSfmoZDnqZalr52QZRDw
[54]:https://kdenlive.org/
[55]:https://www.darktable.org/
[56]:http://mypaint.org/
[57]:http://shutter-project.org/

View File

@ -0,0 +1,163 @@
[#]: collector: "lujun9972"
[#]: translator: "lxbwolf"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: subject: "How to use loops in awk"
[#]: via: "https://opensource.com/article/19/11/loops-awk"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
在 awk 中怎么使用循环
======
来学习一下多次执行同一条命令的不同类型的循环。
![arrows cycle symbol for failing faster][1]
awk 脚本有三个主要部分BEGIN 和 END 函数都可选用户自己写的每次要执行的函数。某种程度上awk 的主体部分就是一个循环,因为函数中的命令对每一条记录都会执行一次。然而,有时你希望对于一条记录执行多次命令,那么你就需要用到循环。
有多种类型的循环,分别适合不同的场景。
### while 循环
一个 while 循环检测一个表达式,如果表达式为 *true* 就执行命令。当表达式变为 *false* 时,循环中断。
```
#!/bin/awk -f
BEGIN {
        # Print the squares from 1 to 10
    i=1;
    while (i &lt;= 10) {
        print "The square of ", i, " is ", i*i;
        i = i+1;
    }
exit;
}
```
在这个简单实例中, awk 打印了变量 *i* 中的整数值的平方。**while (i <= 10)** 语句告诉 awk 仅在 *i* 的值小于或等于 10 时才执行循环。在循环最后一次执行时(*i* 的值是 10循环终止。
### Do while 循环
do-while 循环在关键字 **do** 之后执行命令。在每次循环结束时检测一个表达式来决定是否终止循环。仅在表达式返回 true 时才会重复执行命令(即还没有到终止循环的条件)。如果表达式返回 false因为到了终止循环的条件所以循环被终止。
```
#!/usr/bin/awk -f
BEGIN {
        i=2;
        do {
                print "The square of ", i, " is ", i*i;
                i = i + 1
        }
        while (i &lt; 10)
exit;
}
```
### for 循环
awk 中有两种 **for**循环。
一种 **for** 循环初始化一个变量,检测一个表达式,执行变量递增,当表达式的结果为 true 时循环就会一直执行。
```
#!/bin/awk -f
BEGIN {
    for (i=1; i &lt;= 10; i++) {
        print "The square of ", i, " is ", i*i;
    }
exit;
}
```
另一种 **for** 循环设置一个有连续 index 的数组变量,对每一个索引执行一个命令集。换句话说,它用一个数组「收集」每一条命令执行后的结果。
本例实现了一个简易版的 Unix 命令 **uniq** 。通过把一系列字符串作为 key 加到数组 a 中,当相同的 key 再次出现时就增加 value 的值,可以得到某个字符串出现的次数(就像 **uniq****--count** 选项)。如果你打印该数组的所有 key将会得到出现过的所有字符串。
用 demo 文件 **colours.txt** (前一篇文章中的文件)来举例:
```
name       color  amount
apple      red    4
banana     yellow 6
raspberry  red    99
strawberry red    3
grape      purple 10
apple      green  8
plum       purple 2
kiwi       brown  4
potato     brown  9
pineapple  yellow 5
```
这是 awk 版的简易 **uniq -c**
```
#! /usr/bin/awk -f
NR != 1 {
    a[$2]++
}
END {
    for (key in a) {
                print a[key] " " key
    }
}
```
示例数据文件的第三列是第一列列出的条目的计数。你可以用一个数组和 **for** 循环来从 color 维度统计第三列的条目。
```
#! /usr/bin/awk -f
BEGIN {
    FS=" ";
    OFS="\t";
    print("color\tsum");
}
NR != 1 {
    a[$2]+=$3;
}
END {
    for (b in a) {
        print b, a[b]
    }
}
```
你可以看到,在处理文件之前也需要在 **前置** 函数(仅仅执行一次)中打印一列表头。
### 循环
在任何编程语言中循环都是很重要的一部分awk 也不例外。使用循环你可以控制 awk 脚本怎样去运行,它可以统计什么信息,还有它怎么去处理你的数据。我们下一篇文章会讨论 switch 语句,**continue** 和 **next**
* * *
你是否更想听这篇文章?本文已被收录进 [Hacker Public Radio](http://hackerpublicradio.org/eps.php?id=2330),一个来自黑客,面向黑客的社区技术博客。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/11/loops-awk
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[lxbwolf](https://github.com/lxbwolf)
校对:[校对者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/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_progress_cycle_momentum_arrow.png?itok=q-ZFa_Eh "arrows cycle symbol for failing faster"
[2]: http://hackerpublicradio.org/eps.php?id=2330