Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang 2020-12-02 09:06:35 +08:00
commit a017355060
10 changed files with 1030 additions and 312 deletions

View File

@ -1,16 +1,18 @@
[#]: collector: "lujun9972"
[#]: translator: "lxbwolf"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-12875-1.html"
[#]: subject: "Get started with Fossil, an alternative to Git"
[#]: via: "https://opensource.com/article/20/11/fossil"
[#]: author: "Klaatu https://opensource.com/users/klaatu"
开始学习 FossilGit 的一个替代品
了解一下 Fossil一个 Git 的替代品
======
Fossil 是一个集版本控制系统、bug 追踪、维基、论坛以及文档解决方案于一体的系统。
![Dinosaurs on land at sunset][1]
> Fossil 是一个集版本控制系统、bug 追踪、维基、论坛以及文档解决方案于一体的系统。
![](https://img.linux.net.cn/data/attachment/album/202012/01/173057hfhyzyw921zll219.jpg)
每个开发者都知道,追踪代码的修改是至关重要的。有时候你会处于好奇或者教育的目的需要展示你的项目开始和进化的历史。有时候你想让其他的开发者参与到你的项目中,因此你需要一种值得信赖的能合并不同代码分支的方法。更极端一点,有时候你为了解决一个问题而修改的代码导致已有的功能不能正常使用。
@ -18,13 +20,11 @@ Fossil 是一个集版本控制系统、bug 追踪、维基、论坛以及文档
### 安装 Fossil
Fossil 是一个独立的 C 程序,因此你可以从它的网站上[下载][4]后放在环境变量 [PATH][5] 中的任意位置。例如,假定 `/usr/local/bin` 已经在你的环境变量中(默认情况下是在的)
Fossil 是一个独立的 C 程序,因此你可以从它的网站上[下载][4]后放在环境变量 [PATH][5] 中的任意位置。例如,假定 `/usr/local/bin` 已经在你的环境变量中(默认情况下是在的):
```
$ wget <https://fossil-scm.org/home/uv/fossil-linux-x64-X.Y.tar.gz>
$ sudo tar xvf fossil-linux-x64-X.Y.tar.gz \
\--directory /usr/local/bin
$ wget https://fossil-scm.org/home/uv/fossil-linux-x64-X.Y.tar.gz
$ sudo tar xvf fossil-linux-x64-X.Y.tar.gz --directory /usr/local/bin
```
你也可以通过包管理器从软件仓库中找到 Fossil或者直接从源码编译。
@ -33,7 +33,6 @@ $ sudo tar xvf fossil-linux-x64-X.Y.tar.gz \
如果你已经有一个代码项目,想用 Fossil 来追踪,那么第一步就是创建一个 Fossil 仓库:
```
$ fossil init myproject.fossil
project-id: 010836ac6112fefb0b015702152d447c8c1d8604
@ -41,15 +40,14 @@ server-id:  54d837e9dc938ba1caa56d31b99c35a4c9627f44
admin-user: klaatu (initial password is "14b605")
```
创建 Fossil 仓库的过程中会返回三行信息:一个唯一的项目 ID、一个唯一的服务 ID 以及管理员 ID 和密码。项目 ID 和服务 ID 是版本数字。管理员资质表明你对这个仓库的所有权,当你把这个 Fossil 仓库作为服务器让其他用户来访问时可以使用管理员权限。
创建 Fossil 仓库的过程中会返回三行信息:一个唯一的项目 ID、一个唯一的服务 ID 以及管理员 ID 和密码。项目 ID 和服务器 ID 是版本数字。管理员凭证表明你对这个仓库的所有权,当你把 Fossil 作为服务器让其他用户来访问时可以使用管理员权限。
### Fossil 仓库工作流
在你使用 Fossil 仓库之前,你需要先为它的数据创建一个工作路径。你可以把这个过程类比为使用 Python 时创建一个虚拟环境或者解压一个只用来备份的 ZIP 文件。
在你使用 Fossil 仓库之前,你需要先为它的数据创建一个工作路径。你可以把这个过程类比为使用 Python 时创建一个虚拟环境或者解压一个只用来备份的 ZIP 文件。
创建一个工作目录并进入:
```
$ mkdir myprojectdir
$ cd myprojectdir
@ -57,29 +55,27 @@ $ cd myprojectdir
把你的 Fossil 打开到刚刚创建的目录:
```
$ fossil open ../myproject
project-name: &lt;unnamed&gt;
repository:   /home/klaatu/myprojectdir/../myproject
local-root:   /home/klaatu/myprojectdir/
config-db:    /home/klaatu/.fossil
project-name: <unnamed>
repository: /home/klaatu/myprojectdir/../myproject
local-root: /home/klaatu/myprojectdir/
config-db: /home/klaatu/.fossil
project-code: 010836ac6112fefb0b015702152d447c8c1d8604
checkout:     9e6cd96dd675544c58a246520ad58cdd460d1559 2020-11-09 04:09:35 UTC
tags:         trunk
comment:      initial empty check-in (user: klaatu)
check-ins:    1
checkout: 9e6cd96dd675544c58a246520ad58cdd460d1559 2020-11-09 04:09:35 UTC
tags: trunk
comment: initial empty check-in (user: klaatu)
check-ins: 1
```
你可能注意到了Fossil 在你的家目录下创建了一个名为 `.fossil` 的隐藏文件,用来追踪你的全局 Fossil 配置。这个配置不是只适用于你的一个项目的;这个文件只会在你第一次使用 Fossil 时生成。
#### 添加文件
使用 `add``commit` 子命令来向你的仓库添加文件。例如,创建一个简单的 README 文件,把它添加到仓库:
使用 `add``commit` 子命令来向你的仓库添加文件。例如,创建一个简单的 `README` 文件,把它添加到仓库:
```
$ echo "My first Fossil project" &gt; README
$ echo "My first Fossil project" > README
$ fossil add README
ADDED  README
$ fossil commit -m 'My first commit'
@ -90,7 +86,6 @@ New_Version: 2472a43acd11c93d08314e852dedfc6a476403695e44f47061607e4e90ad01aa
Fossil 仓库开始时默认使用的主分支名为 `trunk`。当你想修改代码而又不影响主干代码时,你可以从 trunk 分支切走。创建新分支需要使用 `branch` 子命令,这个命令需要两个参数:一个新分支的名字,一个新分支的基分支名字。在本例中,只有一个分支 `trunk`,因此尝试创建一个名为 `dev` 的新分支:
```
$ fossil branch --help
Usage: fossil branch new BRANCH-NAME BASIS ?OPTIONS?
@ -100,7 +95,6 @@ New branch: cb90e9c6f23a9c98e0c3656d7e18d320fa52e666700b12b5ebbc4674a0703695
你已经创建了一个新分支,但是你当前所在的分支仍然是 `trunk`
```
$ fossil branch current
trunk
@ -108,7 +102,6 @@ trunk
使用 `checkout` 命令切换到你的新分支 `dev`
```
$ fossil checkout dev
dev
@ -130,7 +123,6 @@ README
这个分支中没有你的新文件(或者你对其他文件的修改),而那些内容是合并的过程需要的信息:
```
$ fossil merge dev
 "fossil undo" is available to undo changes to the working checkout.
@ -142,7 +134,6 @@ myfile.lua  README
使用 `timeline` 选项来查看仓库的历史。这个命令列出了你的仓库的所有活动的详细信息,包括用来表示每次修改的哈希值、每次提交时填写的信息以及提交者:
```
$ fossil timeline
=== 2020-11-09 ===
@ -156,25 +147,21 @@ $ fossil timeline
![Fossil UI][6]
(Klaatu, [CC BY-SA 4.0][7])
### 公开你的 Fossil 仓库
因为 Fossil 有个内置的 web 界面,所以 Fossil 不像 GitLab 和 Gitea 那样需要主机服务。Fossil 就是它自己的主机服务,只要你把它放在一台机器上就行了。在你公开你的 Fossil 仓库之前,你还需要通过 web 用户界面UI来配置一些信息
使用 `ui` 子命令启动一个本地的实例:
```
$ pwd
/home/klaatu/myprojectdir/
$ fossil ui
```
`用户`和`设置`是安全相关的,`配置`是项目属性相关的包括一个合适的标题。web 界面不仅仅是一个方便的功能。 它是能在生产环境中使用并作为 Fossil 项目的宿主来使用的。它还有一些其他的高级选项,比如用户管理(或者叫自我管理)、在同一个服务器上与其他的 Fossil 仓库进行单点登录SSO
当配置完成后,关掉 web 界面并按下 **Ctrl+C** 来停止 UI 引擎。像提交代码一样提交你的 web 修改。
“Users” 和 “Settings” 是安全相关的“Configuration” 是项目属性相关的包括一个合适的标题。web 界面不仅仅是一个方便的功能。 它是能在生产环境中使用并作为 Fossil 项目的宿主机来使用的。它还有一些其他的高级选项,比如用户管理(或者叫自我管理)、在同一个服务器上与其他的 Fossil 仓库进行单点登录SSO
当配置完成后,关掉 web 界面并按下 `Ctrl+C` 来停止 UI 引擎。像提交代码一样提交你的 web 修改。
```
$ fossil commit -m 'web ui updates'
@ -187,9 +174,6 @@ New_Version: 11fe7f2855a3246c303df00ec725d0fca526fa0b83fa67c95db92283e8273c60
2. 如果你的服务器没有安装 Fossil就在你的服务器上安装 Fossil。在服务器上安装的过程跟在本地一样。
3. 在你的 `cgi-bin` 目录下(或它对应的目录,这取决于你的 HTTP 守护进程)创建一个名为 `repo_myproject.cgi` 的文件:
```
#!/usr/local/bin/fossil
repository: /home/klaatu/public_html/myproject.fossil
@ -197,9 +181,8 @@ repository: /home/klaatu/public_html/myproject.fossil
添加可执行权限:
```
`$ chmod +x repo_myproject.cgi`
$ chmod +x repo_myproject.cgi
```
你需要做的都已经做完了。现在可以通过互联网访问你的项目了。
@ -208,21 +191,19 @@ repository: /home/klaatu/public_html/myproject.fossil
你也可以通过命令行来进行交互:
```
`$ fossil clone https://klaatu@example.com/cgi-bin/repo_myproject.cgi`
$ fossil clone https://klaatu@example.com/cgi-bin/repo_myproject.cgi
```
在本地的克隆仓库中工作时,你需要使用 `push` 子命令把本地的修改推送到远程的仓库,使用 `pull` 子命令把远程的修改拉取到本地仓库:
```
`$ fossil push https://klaatu@example.com/cgi-bin/repo_myproject.cgi`
$ fossil push https://klaatu@example.com/cgi-bin/repo_myproject.cgi
```
### 使用Fossil 作为独立的主机
### 使用 Fossil 作为独立的托管
Fossil 大大提高了你的效率(也提高了你的合作者的效率),让你不再依赖主机副刷。本文只是简单的介绍了基本概念。你的代码项目还会用到很多有用的 Fossil 功能。尝试一下 Fossil。它不仅会改变你对版本控制的理解它会让你不再考虑其他的版本控制系统。
Fossil 将大量的权力交到了你的手中(以及你的合作者的手中),让你不再依赖托管服务。本文只是简单的介绍了基本概念。你的代码项目还会用到很多有用的 Fossil 功能。尝试一下 Fossil。它不仅会改变你对版本控制的理解它会让你不再考虑其他的版本控制系统。
--------------------------------------------------------------------------------
@ -231,7 +212,7 @@ via: https://opensource.com/article/20/11/fossil
作者:[Klaatu][a]
选题:[lujun9972][b]
译者:[lxbwolf](https://github.com/lxbwolf)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (chenmu-kk)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,181 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (alim0x)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Creating a Chat Bot with Recast.AI)
[#]: via: (https://opensourceforu.com/2019/11/creating-a-chat-bot-with-recast-ai/)
[#]: author: (Athira Lekshmi C.V https://opensourceforu.com/author/athira-lekshmi/)
Creating a Chat Bot with Recast.AI
======
[![][1]][2]
_According to a Gartner report from February 2018, “25 per cent of customer service and support operations will integrate virtual customer assistant (VCA) or chatbot technology across engagement channels by 2020, up from less than 2 per cent in 2017.” In the light of this, readers will find this tutorial on how the open source Recast. AI bot-creating platform works, helpful._
Chat bots, both voice based and others, have been in use for quite a while now. From chatbots that engage the user in a murder mystery game to bots which help in real estate deals and medical diagnosis, chatbots have traversed across domains.
There are many platforms which enable users to create and deploy bots. Recast.AI (now known as SAP Conversational AI after its acquisition by SAP) is a forerunner amongst these.
The cool interface, its collaborative nature and the analytics tools it provides, make it a popular choice.
As the Recast official site says, “It is an ultimate collaborative platform to build, train, deploy and monitor intelligent bots.”
![Figure 1: Setting the bot properties][3]
![Figure 2: Bot dashboard][4]
![Figure 3: Searching an intent][5]
**Building a basic bot in Recast**
Let us look at how to build a basic bot in Recast.
1. Create an account in _<https://cai.tools.sap>_. Signing up can be done either with an email ID or with a GitHub account.
2. Once you log in, you will land on the dashboard. Click on the + New Bot icon on the top right-hand side to create a new bot.
3. On the next screen, you will see that there is a set of predefined skills you can select. Select Greetings for the time being (Figure 1). This bot is already trained to understand basic greetings.
4. Provide a name for your bot. For now, since this is a very basic bot, you can have the bot crack some jokes, so let us name it Joke Bot and select the default language as English.
5. Select Non-personal data under the data policy since you wont be dealing with any sensitive information; then select the Public bot option and click on Create a bot.
So thats your bot created on the Recast platform.
![Figure 4: @joke intent][6]
![Figure 5: Predefined expressions][7]
**The five stages of developing a bot**
To use the words from the official Recast blog, there are five stages in a bots life.
* Training Teaching your bot what it needs to understand
* Building Creating your conversational flow with the Bot Builder tool
* Coding Connecting your bot with external APIs or a database
* Connecting Shipping your bot to one or several messaging platforms
* Monitoring Training your bot to make it sharper and get insights on its usage
**Training a bot through intents**
You will be able to see the options to either search, fork or create an intent in the dashboard.
“An intent is a box of expressions that mean the same thing but which are constructed in different ways. Intents are the heart of your bots understanding. Each one of your intents represents an idea your bot is able to understand.” (from the _Recast.AI_ website)
As decided earlier, you need the bot to be able to crack jokes. So the base line is that the bot should be able to understand that the user is asking it to tell a joke; it shouldnt be that even when the user just says, “Hi,” the bot responds with a joke that would not be good.
So group the utterances that the user might make, like:
```
Tell me a joke.
Tell me a funny fact.
Can you crack a joke?
Whats funny today?
```
…………………
Before going on to create the intent from scratch, let us explore the Search/fork option. Type _Joke_ in the search field (Figure 3). This gives a list of intents created by users of Recast around the globe, which is public, and this is why Recast is said to be collaborative in nature. So theres no need to create all intents from scratch, one can build upon intents already created. This brings down the effort needed to train the bot with common intents.
* Select the first intent in the list and fork it into the bot.
* Click on the Fork button. The intent is now added to the bot (Figure 4).
* Click on the intent @joke, and a list of expressions which already exist in the intent will be displayed (Figure 5).
* Add a few more expressions to it (Figure 6).
![Figure 6: Suggested expressions][8]
![Figure 7: Suggested expressions][9]
Once a few expressions are added, the bot gives suggestions like shown in Figure 7. Select a few and add them to the intent (Figure 7).
You can also tag your own custom entities to detect keywords, depending on your bots context.
**Skills**
A skill is a block of conversation that has a clear purpose and that your bot can execute to achieve a goal. It can be as simple as the ability to greet someone, but it can also be more complex, like giving movie suggestions based on information provided by the user.
It need not be just a one query-answer set, but rather, skills running through multiple exchanges. For example, consider a bot which helps you learn about currency exchange rates. It starts by asking the source currency, then the target currency, before giving the exact response. Skills can be combined to create complex conversational flows.
Heres how you create a skill for the joke bot:
* Go to the _Build_ tab. Click on the + icon to create a skill.
* Name the skill _Joke_ (Figure 8)
* Once created, click on the skill. You will see four tabs. _Read me, Triggers, Requirements and Actions_.
* Navigate to the Requirements tab. You should store the information only if the intent joke is present. So, add a requirement as shown in Figure 9.
![Figure 8: Skills dashboard][10]
![Figure 9: Adding a trigger][11]
Since this is a simple use case, you neednt consider any specific requirements in the Requirement tab but consider a case for which a response needs to be triggered only if certain keywords or entities are present in such a case you will need requirements.
Requirements are either intents or entities that your skill needs to retrieve before executing actions. Requirements are pieces of information that are important in the conversation and that your bot can use; for example, the users name or a location. Once a requirement is completed, the associated value is stored in the bots memory for the entire conversation.
Now let us move to the Action tab to set the responses (see Figure 10).
Click on Add _new message group_. Then select _Send message_ and add a text message, which can be any joke in this case. Also, since you dont want your bot to crack the same joke each time, you can add multiple messages which will be randomly picked each time.
![Figure 10: Adding actions][12]
![Figure 11: Adding text messages][13]
![Figure 12: Setting up webchat][14]
**Channel integrations**
Well, the success of a bot also depends upon how easily it is accessible. Recast has built-in integrations with many messaging channels such as Skype for Business, Kik Messenger, Telegram, Line, Facebook Messenger, Slack, Alexa, etc. In addition to that, Recast also provides SDKs to develop custom channels.
Also, there is a ready-to-use Web chat provided by Recast (in the Connect tab). You can customise the colour schemes, headers, bot pictures, etc. It provides you with a script tag to be injected into the page. Your interface is now up (Figure 12).
The Web chat code base is open sourced, which makes it easier for developers to play around with the look and feel, the standard response types and much more.
The dashboard provides step-by-step procedures on how to deploy the bot on various channels. The joke bot was deployed in Telegram and in Web chat, as shown in Figure 13.
![Figure 13: Webchat deployed][15]
![Figure 14: Bot deployed in Telegram][16]
![Figure 15: Multi-language bot][17]
**And there is more**
Recast supports multiple languages, Select one language as the base while creating the bot, but then you also have the option to add as many languages as you want.
The example considered here is a simple static joke bot, but actual use cases will need interaction with various systems. Recast has a Web hook feature which allows users to connect with various systems to get responses. Also, there is detailed API documentation to help leverage each independent feature of the platform.
As for analytics, Recast has a monitoring dashboard which helps you understand the accuracy of the bot and train it further.
![Avatar][18]
[Athira Lekshmi C.V][19]
The author is an open-source enthusiast.
[![][20]][21]
--------------------------------------------------------------------------------
via: https://opensourceforu.com/2019/11/creating-a-chat-bot-with-recast-ai/
作者:[Athira Lekshmi C.V][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://opensourceforu.com/author/athira-lekshmi/
[b]: https://github.com/lujun9972
[1]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/04/Build-ChatBoat.jpg?resize=696%2C442&ssl=1 (Build ChatBoat)
[2]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/04/Build-ChatBoat.jpg?fit=900%2C572&ssl=1
[3]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-1-Setting-the-bot-properties.jpg?resize=350%2C201&ssl=1
[4]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-2-Setting-the-bot-properties.jpg?resize=350%2C217&ssl=1
[5]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-3-Searching-an-intent.jpg?resize=350%2C271&ssl=1
[6]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-4-@joke-intent.jpg?resize=350%2C214&ssl=1
[7]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-5-Predefined-expressions-350x227.jpg?resize=350%2C227&ssl=1
[8]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-6-Suggested-expressions-350x197.jpg?resize=350%2C197&ssl=1
[9]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-7-Suggested-expressions-350x248.jpg?resize=350%2C248&ssl=1
[10]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-8-Skills-dashboard.jpg?resize=350%2C187&ssl=1
[11]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-9-Adding-a-trigger.jpg?resize=350%2C197&ssl=1
[12]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-10-Adding-actions.jpg?resize=350%2C175&ssl=1
[13]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-11-Adding-text-messages.jpg?resize=350%2C255&ssl=1
[14]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-12-Setting-up-webchat.jpg?resize=350%2C326&ssl=1
[15]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-13-Webchat-deployed.jpg?resize=350%2C425&ssl=1
[16]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-14-Bot-deployed-in-Telegram.jpg?resize=350%2C269&ssl=1
[17]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-15-Multi-language-bot.jpg?resize=350%2C419&ssl=1
[18]: https://secure.gravatar.com/avatar/d24503a2a0bb8bd9eefe502587d67323?s=100&r=g
[19]: https://opensourceforu.com/author/athira-lekshmi/
[20]: https://opensourceforu.com/wp-content/uploads/2019/11/assoc.png
[21]: https://feedburner.google.com/fb/a/mailverify?uri=LinuxForYou&loc=en_US

View File

@ -1,80 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Go Full Dark Mode With LibreOffice)
[#]: via: (https://itsfoss.com/libreoffice-dark-mode/)
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
How to Go Full Dark Mode With LibreOffice
======
[LibreOffice][1] is a free and open-source cross-platform office productivity software. If youre not making the most of it, the [LibreOffice Tips][2] article is a must-read.
Dark theme is getting popular even among non-programmers. It is less stressing on the eyes specially for extended use of the screen. Some people believe that it makes the texts looks crisp and clear and that helps improve their productivity.
Some Linux distributions like [Ubuntu come with dark mode][3] these days giving your systems a darker tint. When you turn on the dark mode, some applications will automatically switch to dark mode.
LibreOffice also does that except the main area where you write:
![LibreOffice semi dark mode matching with the system theme][4]
You can change that. If you want to go complete dark mode with LibreOffice, you just have to change a few settings. Let me show you how to do that.
### How to enable complete dark mode in LibreOffice
As I mentioned earlier, you need to enable a system-wide dark mode first. This will ensure that the window color (or the title bar) blends well with the in-app dark color.
Next, open _**any**_ LibreOffice tool from the suite such as **Writer**. Then from the menu, click **Tools -&gt; Options** **-&gt;** **Application Colors** and select **Document background &amp; Application** background as **Black** or **Automatic** (whichever works for you).
![][5]
In case the icons are not in dark colour, you can change them from menu (as shown in the image below), **Tools -&gt; Options** **-&gt;** **View** and my personal choice on MX Linux, is the [Yaru][6] icon style from Ubuntu (if you have a dark version of the icon pack, select that).
![][7]
Of course, you can also try some other [icon themes][8] available for Linux distros.
The end result should look like this:
![][9]
#### Additional tip for LibreOffice flatpak package
If youre using the [Flatpak package][10] of LibreOffice suite, the header area (or the menu area) of LibreOffice may look white. In that case, you can try navigating to **Tools-&gt; Options-&gt; Personalization** and then select the “**Grey theme**” as shown in the screenshot below.
![][11]
It isnt completely black but it should make things look better. Hope that helps you switch to a dark theme LibreOffice experience!
#### Conclusion
Dark themes have slowly started to dominate our desktops, giving a modern taste and reducing the eye strain, especially in low light conditions.
LibreOffice gives you the freedom to switch your working environment to a fully dark theme or to keep light themed elements. In fact, you get a decent amount of customization options to tweak what you prefer. Have you switched to a dark theme on LibreOffice? Which color combination is your preferred? Let us know in the comments below!
--------------------------------------------------------------------------------
via: https://itsfoss.com/libreoffice-dark-mode/
作者:[Dimitrios Savvopoulos][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://itsfoss.com/author/dimitrios/
[b]: https://github.com/lujun9972
[1]: https://www.libreoffice.org
[2]: https://itsfoss.com/libreoffice-tips/
[3]: https://itsfoss.com/dark-mode-ubuntu/
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/libreOffice-dark-mode.png?resize=799%2C450&ssl=1
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/1-libreoffice-application-colours.png?resize=800%2C551&ssl=1
[6]: https://extensions.libreoffice.org/en/extensions/show/yaru-icon-theme
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/2-libreoffice-iconstyle-1.png?resize=800%2C531&ssl=1
[8]: https://itsfoss.com/best-icon-themes-ubuntu-16-04/
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/3-libreoffice-dark.png?resize=800%2C612&ssl=1
[10]: https://itsfoss.com/what-is-flatpak/
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/libre-office-personalization.png?resize=800%2C636&ssl=1

View File

@ -0,0 +1,281 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (8 Git aliases that make me more efficient)
[#]: via: (https://opensource.com/article/20/11/git-aliases)
[#]: author: (Ricardo Gerardi https://opensource.com/users/rgerardi)
8 Git aliases that make me more efficient
======
Use aliases to create shortcuts for your most-used or complex Git
commands.
![Terminal command prompt on orange background][1]
The excellent article _[7 Git tricks that changed my life][2]_ inspired me to write about another Git feature that's had a major impact on my experience using Git on the command line: aliases.
Defining Git aliases to serve as substitutes for commands provides two major benefits:
* It simplifies long commands that have many options, making them shorter and easier to remember.
* It shortens frequently used commands so that you can work more efficiently.
### How to define and use aliases
To define a Git alias, use the `git config` command with the alias and the command you want to substitute. For example, to create the alias `p` for `git push`:
```
$ git config --global alias.p 'push'
```
You can use an alias by providing it as an argument to `git`, just like any other command:
```
$ git p
```
To see all your aliases, list your configuration with `git config`:
```
$ git config --global -l
user.name=ricardo
user.email=[ricardo@example.com][3]
alias.p=push
```
You can also define aliases with your favorite shell, such as Bash or Zsh. However, defining aliases using Git offers several features that you don't get using the shell. First, it allows you to use aliases across different shells with no additional configuration. It also integrates with Git's autocorrect feature, so Git can suggest aliases as alternatives when you mistype a command. Finally, Git saves your aliases in the user configuration file, allowing you to transfer them to other machines by copying a single file.
Regardless of the method you use, defining aliases improves your overall experience with Git. For more information about defining Git aliases, take a look at the [Git Book][4].
### 8 useful Git aliases
Now that you know how to create and use an alias, take a look at some useful ones.
#### 1\. Git status
Git command line users often use the `status` command to see changed or untracked files. By default, this command provides verbose output with many lines, which you may not want or need. You can use a single alias to address both of these components: Define the alias `st` to shorten the command with the option `-sb` to output a less verbose status with branch information:
```
$ git config --global alias.st 'status -sb'
```
If you use this alias on a clean branch, your output looks like this:
```
$  git st
## master
```
Using it on a branch with changed and untracked files produces this output:
```
$ git st
## master
 M test2
?? test3
```
#### 2\. Git log --oneline
Create an alias to display your commits as single lines for more compact output:
```
$ git config --global alias.ll 'log --oneline'
```
Using this alias provides a short list of all commits:
```
$ git ll
33559c5 (HEAD -&gt; master) Another commit
17646c1 test1
```
#### 3\. Git last commit
This shows details about the most recent commit you made. This extends an example in the Git Book's chapter on [Aliases][4]:
```
$ git config --global alias.last 'log -1 HEAD --stat'
```
Use it to see the last commit:
```
$ git last
commit f3dddcbaabb928f84f45131ea5be88dcf0692783 (HEAD -&gt; branch1)
Author: ricardo &lt;[ricardo@example.com][3]&gt;
Date:   Tue Nov 3 00:19:52 2020 +0000
    Commit to branch1
 test2 | 1 +
 test3 | 0
 2 files changed, 1 insertion(+)
```
#### 4\. Git commit
You use `git commit` a lot when you're making changes to a Git repository. Make the `git commit -m` command more efficient with the `cm` alias:
```
$ git config --global alias.cm 'commit -m'
```
Because Git aliases expand commands, you can provide additional parameters during their execution:
```
$ git cm "A nice commit message"
[branch1 0baa729] A nice commit message
 1 file changed, 2 insertions(+)
```
#### 5\. Git remote
The `git remote -v` command lists all configured remote repositories. Shorten it with the alias `rv`:
```
$ git config --global alias.rv 'remote -v'
```
#### 6\. Git diff
The `git diff` command displays differences between files in different commits or between a commit and the working tree. Simplify it with the `d` alias:
```
$ git config --global alias.d 'diff'
```
The standard `git diff` command works fine for small changes. But for more complex ones, an external tool such as `vimdiff` makes it more useful. Create the alias `dv` to display diffs using `vimdiff` and use the `-y` parameter to skip the confirmation prompt:
```
$ git config --global alias.dv 'difftool -t vimdiff -y'
```
Use this alias to display `file1` differences between two commits:
```
$ git dv 33559c5 ca1494d file1
```
![vim-diff results][5]
(Ricardo Gerardi, [CC BY-SA 4.0][6])
#### 7\. Git config list
The `gl` alias makes it easier to list all user configurations:
```
$ git config --global alias.gl 'config --global -l'
```
Now you can see all defined aliases (and other configuration options):
```
$ git gl
user.name=ricardo
user.email=[ricardo@example.com][3]
alias.p=push
alias.st=status -sb
alias.ll=log --oneline
alias.last=log -1 HEAD --stat
alias.cm=commit -m
alias.rv=remote -v
alias.d=diff
alias.dv=difftool -t vimdiff -y
alias.gl=config --global -l
alias.se=!git rev-list --all | xargs git grep -F
```
#### 8\. Git search commit
Git alias allows you to define more complex aliases, such as executing external shell commands, by prefixing them with the `!` character. You can use this to execute custom scripts or more complex commands, including shell pipes.
For example, define the `se` alias to search within your commits:
```
$ git config --global alias.se '!git rev-list --all | xargs git grep -F'
```
Use this alias to search for specific strings in your commits:
```
$ git se test2
0baa729c1d683201d0500b0e2f9c408df8f9a366:file1:test2
ca1494dd06633f08519ec43b57e25c30b1c78b32:file1:test2
```
### Autocorrect your aliases
A cool benefit of using Git aliases is its native integration with the autocorrect feature. If you make a mistake, by default Git suggests commands that are similar to what you typed, including aliases. For example, if you type `ts` instead of `st` for `status`, Git will suggest the correct alias:
```
$ git ts
git: 'ts' is not a git command. See 'git --help'.
The most similar command is
        st
```
If you have autocorrect enabled, Git will automatically execute the correct command:
```
$ git config --global help.autocorrect 20
$ git ts
WARNING: You called a Git command named 'ts', which does not exist.
Continuing in 2.0 seconds, assuming that you meant 'st'.
## branch1
?? test4
```
### Optimize Git commands
Git alias is a useful feature that improves your efficiency by optimizing the execution of common and repetitive commands. Git allows you to define as many aliases as you want, and some users define many. I prefer to define aliases for just my most used commands—defining too many makes it harder to memorize them and may require me to look them up to use them.
For more about aliases, including other useful ones, see the [Git Wiki's Aliases page][7].
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/11/git-aliases
作者:[Ricardo Gerardi][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/rgerardi
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)
[2]: https://opensource.com/article/20/10/advanced-git-tips
[3]: mailto:ricardo@example.com
[4]: https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases
[5]: https://opensource.com/sites/default/files/uploads/vimdiff.png (vim-diff results)
[6]: https://creativecommons.org/licenses/by-sa/4.0/
[7]: https://git.wiki.kernel.org/index.php/Aliases

View File

@ -0,0 +1,182 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Getting started with Stratis up and running)
[#]: via: (https://fedoramagazine.org/getting-started-with-stratis-up-and-running/)
[#]: author: (Gordon Keegan https://fedoramagazine.org/author/gmkeegan/)
Getting started with Stratis up and running
======
![][1]
[Photo][2] by [Jeremy Lapak][3] on [Unsplash][4]
When adding storage to a Linux server, system administrators often use commands like _pvcreate_, _vgcreate_, _lvcreate_, and _mkfs_ to integrate the new storage into the system. [Stratis][5] is a command-line tool designed to make managing storage much simpler. It creates, modifies, and destroys pools of storage. It also allocates and deallocates filesystems from the storage pools.
Instead of an entirely in-kernel approach like ZFS or Btrfs, Stratis uses a hybrid approach with components in both user space and kernel land. It builds on existing block device managers like device mapper and existing filesystems like XFS. Monitoring and control is performed by a user space daemon.
Stratis tries to avoid some ZFS characteristics like restrictions on adding new hard drives or replacing existing drives with bigger ones. One of its main design goals is to achieve a positive command-line experience.
### Install Stratis
Begin by installing the required packages. Several Python-related dependencies will be automatically pulled in. The _stratisd_ package provides the _stratisd_ daemon which creates, manages, and monitors local storage pools. The _stratis-cli_ package provides the _stratis_ command along with several Python libraries.
```
# yum install -y stratisd stratis-cli
```
Next, enable the _stratisd_ service.
```
# systemctl enable --now stratisd
```
Note that the “enable now” syntax shown above both permanently enables and immediately starts the service.
After determining what disks/block devices are present and available, the three basic steps to using Stratis are:
1. Create a pool of the desired disks.
2. Create a filesystem in the pool.
3. Mount the filesystem.
In the following example, four virtual disks are available in a virtual machine. Be sure not to use the root/system disk (/dev/vda in this example)!
```
# sfdisk -s
/dev/vda: 31457280
/dev/vdb: 5242880
/dev/vdc: 5242880
/dev/vdd: 5242880
/dev/vde: 5242880
total: 52428800 blocks
```
### Create a storage pool using Stratis
```
# stratis pool create testpool /dev/vdb /dev/vdc
# stratis pool list
Name Total Physical Size Total Physical Used
testpool 10 GiB 56 MiB
```
After creating the pool, check the status of its block devices:
```
# stratis blockdev list
Pool Name Device Node Physical Size State Tier
testpool /dev/vdb 5 GiB In-use Data
testpool /dev/vdc 5 GiB In-use Data
```
### Create a filesystem using Stratis
Next, create a filesystem. As mentioned earlier, Stratis uses the existing DM (device mapper) and XFS filesystem technologies to create thinly-provisioned filesystems. By building on these existing technologies, large filesystems can be created and it is possible to add physical storage as storage needs grow.
```
# stratis fs create testpool testfs
# stratis fs list
Pool Name Name Used Created Device UUID
testpool testfs 546 MiB Apr 18 2020 09:15 /stratis/testpool/testfs 095fb4891a5743d0a589217071ff71dc
```
Note that “fs” in the example above can optionally be written out as “filesystem”.
### Mount the filesystem
Next, create a mount point and mount the filesystem.
```
# mkdir /testdir
# mount /stratis/testpool/testfs /testdir
# df -h | egrep 'stratis|Filesystem'
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/stratis-1-3e8e[truncated]71dc 1.0T 7.2G 1017G 1% /testdir
```
The actual space used by a filesystem is shown using the _stratis fs list_ command demonstrated previously. Notice how the _testdir_ filesystem has a virtual size of **1.0T**. If the data in a filesystem approaches its virtual size, and there is available space in the storage pool, Stratis will automatically grow the filesystem. Note that beginning with Fedora 34, the form of device path will be _/dev/stratis/&lt;pool-name&gt;/&lt;filesystem-name&gt;_.
### Add the filesystem to fstab
To configure automatic mounting of the filesystem at boot time, run following commands:
```
# UUID=`lsblk -n -o uuid /stratis/testpool/testfs`
# echo "UUID=${UUID} /testdir xfs defaults 0 0" >> /etc/fstab
```
After updating fstab, verify that the entry is correct by unmounting and mounting the filesystem:
```
# umount /testdir
# mount /testdir
# df -h | egrep 'stratis|Filesystem'
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/stratis-1-3e8e[truncated]71dc 1.0T 7.2G 1017G 1% /testdir
```
### Adding cache devices with Stratis
Suppose _/dev/vdd_ is an available SSD (solid state disk). To configure it as a cache device and check its status, use the following commands:
```
# stratis pool add-cache testpool /dev/vdd
# stratis blockdev
Pool Name Device Node Physical Size State Tier
testpool /dev/vdb 5 GiB In-use Data
testpool /dev/vdc 5 GiB In-use Data
testpool /dev/vdd 5 GiB In-use Cache
```
### Growing the storage pool
Suppose the _testfs_ filesystem is close to using all the storage capacity of _testpool_. You could add an additional disk/block device to the pool with commands similar to the following:
```
# stratis pool add-data testpool /dev/vde
# stratis blockdev
Pool Name Device Node Physical Size State Tier
testpool /dev/vdb 5 GiB In-use Data
testpool /dev/vdc 5 GiB In-use Data
testpool /dev/vdd 5 GiB In-use Cache
testpool /dev/vde 5 GiB In-use Data
```
After adding the device, verify that the pool shows the added capacity:
```
# stratis pool
Name Total Physical Size Total Physical Used
testpool 15 GiB 606 MiB
```
### Conclusion
Stratis is a tool designed to make managing storage much simpler. Creating a filesystem with enterprise functionalities like thin-provisioning, snapshots, volume management, and caching can be accomplished quickly and easily with just a few basic commands.
See also [Getting Started with Stratis Encryption][6].
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/getting-started-with-stratis-up-and-running/
作者:[Gordon Keegan][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://fedoramagazine.org/author/gmkeegan/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2020/11/stratis-up-and-running-816x345.jpg
[2]: https://unsplash.com/photos/CVvFVQ_-oUg
[3]: https://unsplash.com/@jeremy_justin?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[4]: https://unsplash.com/s/photos/runner?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[5]: https://stratis-storage.github.io/
[6]: https://fedoramagazine.org/getting-started-with-stratis-encryption/

View File

@ -0,0 +1,157 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Journal five minutes a day with Jupyter)
[#]: via: (https://opensource.com/article/20/11/daily-journal-jupyter)
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
Journal five minutes a day with Jupyter
======
Put some automation behind your daily writing with Jupyter and Python.
![Ceramic mug of tea or coffee with flowers and a book in front of a window][1]
Some people follow the tradition of creating New Year's resolutions. A year is a long time, though, so I plan with a seasonal theme or trajectory. Each quarter, I sit down and look at the upcoming three-month season and decide what I'll work on during that time.
For my latest theme, I decided I wanted to write a daily journal. I like having clear commitments, so I committed to writing for five minutes each day. I also like having observable commitments, even if it is just for me, so I put my entries in Git.
I decided I wanted some automation around my journaling and turned to my favorite automation tool: [Jupyter][2]. One of Jupyter's interesting features is [ipywidgets][3], a set of interactive HTML widgets for Jupyter Notebooks, JupyterLab, and the IPython kernel.
If you want to follow along with the code in this article, note that making your Jupyter lab instance support widgets can be a bit frustrating. Follow [these instructions][4] to set things up.
### Import ipywidgets modules
First, you need to import a bunch of things, such as ipywidgets and [Twisted][5]. The Twisted module helps create an asynchronous time counter:
```
import twisted.internet.asyncioreactor
twisted.internet.asyncioreactor.install()
from twisted.internet import reactor, task
import ipywidgets, datetime, subprocess, functools, os
```
### Set up timed entries
Implementing a time counter with Twisted takes advantage of `task.LoopingCall`. However, the only way to end a looping call is with an exception. A countdown clock will always stop, so you need a custom exception that indicates "all is well; the counter is done":
```
class DoneError(Exception):
    pass
```
Now that you've written the exception, you can write the timer. The first step is to create an `ipywidgets.Label` with a text label widget. The loop uses `divmod` to figure out minutes and seconds and then sets the label's text value:
```
def time_out_counter(reactor):
    label = ipywidgets.Label("Time left: 5:00")
    current_seconds = datetime.timedelta(minutes=5).total_seconds()
    def decrement(count):
        nonlocal current_seconds
        current_seconds -= count
        time_left = datetime.timedelta(seconds=max(current_seconds, 0))
        minutes, left = divmod(time_left, minute)
        seconds = int(left.total_seconds())
        label.value = f"Time left: {minutes}:{seconds:02}"
        if current_seconds &lt; 0:
            raise DoneError("finished")
    minute = datetime.timedelta(minutes=1)
    call = task.LoopingCall.withCount(decrement)
    call.reactor = reactor
    d = call.start(1)
    d.addErrback(lambda f: f.trap(DoneError))
    return d, label
```
### Save text from a Jupyter widget
The next step is to write something that saves the text you type into your journal to a file and commits it to Git. Also, since you will be journaling for five minutes, you want a widget that gives you room to write (scrolling is always possible, but it's nice to see a bit more text at a time).
This uses the widgets `Textarea`, which is a text field where you can write, and `Output` to give feedback. This is important since `git push` can take time or fail, depending on the network. If a backup fails, it's important to alert the user with feedback:
```
def editor(fname):
    textarea = ipywidgets.Textarea(continuous_update=False)
    textarea.rows = 20
    output = ipywidgets.Output()
    runner = functools.partial(subprocess.run, capture_output=True, text=True, check=True)
    def save(_ignored):
        with output:
            with open(fname, "w") as fpout:
                fpout.write(textarea.value)
            print("Sending...", end='')
            try:
                runner(["git", "add", fname])
                runner(["git", "commit", "-m", f"updated {fname}"])
                runner(["git", "push"])
            except subprocess.CalledProcessError as exc:
                print("Could not send")
                print(exc.stdout)
                print(exc.stderr)
            else:
                 print("Done")
    textarea.observe(save, names="value")
    return textarea, output, save
```
The `continuous_update=False` is so that not every character is saved and sent to Git. Instead, it saves whenever you lose focus. The function also returns the `save` function, so it can be called explicitly.
### Create a layout
Finally, you can put all of these together using `ipywidgets.VBox`. This is something that contains a few widgets and displays them vertically. There are a few more ways to arrange widgets, but this is simple and good enough:
```
def journal():
    date = str(datetime.date.today())
    title = f"Log: Startdate {date}"
    filename = os.path.join(f"{date}.txt")
    d, clock = time_out_counter(reactor)
    textarea, output, save = editor(filename)
    box = ipywidgets.VBox([
        ipywidgets.Label(title),
        textarea,
        clock,
        output
    ])
    d.addCallback(save)
    return box
```
Phew! You've defined a function for journaling, so it's time to try it out.
```
`journal()`
```
![Jupyter journal][6]
(Moshe Zadka, [CC BY-SA 4.0][7])
You have five minutes—start writing!
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/11/daily-journal-jupyter
作者:[Moshe Zadka][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/moshez
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tea-cup-mug-flowers-book-window.jpg?itok=JqThhl51 (Ceramic mug of tea or coffee with flowers and a book in front of a window)
[2]: https://jupyter.org/
[3]: https://ipywidgets.readthedocs.io/en/latest/
[4]: https://ipywidgets.readthedocs.io/en/latest/user_install.html
[5]: https://twistedmatrix.com/trac/
[6]: https://opensource.com/sites/default/files/uploads/journaling_output_13_0.png (Jupyter journal)
[7]: https://creativecommons.org/licenses/by-sa/4.0/

View File

@ -0,0 +1,119 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Zotero: An Open Source App to Help You Collect & Share Research)
[#]: via: (https://itsfoss.com/zotero/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Zotero: An Open Source App to Help You Collect & Share Research
======
_**Brief: Zotero is an impressive free and open-source app that lets you collect, organize, cite, and share research. You can also instantly create references and bibliographies for your documents with Zotero.**_
Usually, you can [use any note taking app on Linux][1] to collect and share your ideas. But, here, I want to share something tailored specifically to help you collect, organize, and share your research, i.e. [Zotero][2].
### Zotero: Collect, Organize, &amp; Share Research
![][3]
Zotero is a completely open-source project that you can find on [GitHub][4]. It aims to help you easily collect, organize, add notes, and share your research.
And, all of that without being a cloud-based service, it is completely offline. So, your research notes belong to you. Of course, unless you want to sync it for collaboration purpose, for which you may have to refer the [documentation][5].
To give you a head start, you can either opt for a [WebDAV storage][6] or just create a Zotero account to sync and share your research easily.
For instance, I created a Zotero account with the username **ankush9**, you can find my research collections (that I added to my publication) at <https://www.zotero.org/ankush9>
![][7]
This makes it easy to share your organized research and you can choose what to share to your publication.
Let me highlight the key features that you get with Zotero to help you decide if you need to try it out.
### Features of Zotero
![][8]
* Ability to add information right from the web in a click using a browser extension
* Add notes for each information
* Supports adding tags
* Supports adding voice recording
* Add video recording as attachment
* Add software as attachment
* Store an email as attachment
* Store podcast as an attachment
* Add Blog Posts
* Add a link to file
* Create bibliography from item
* Offline snapshot storage (you can access the web pages you saved without needing an Internet connection)
* Ability to duplicate items
* Organize items in a library
* Offers a trash bin to delete your items and easily restore them if needed
* Synchronization support
* Ability to export data
* LibreOffice add-on available for integration
* Easily share your research using your Zotero profile link
* Cross-platform support
If you just want to create quick bibliography, you can try their other tool, [ZoteroBib][9].
**Recommended Read:**
![][10]
#### [9 Best LaTeX Editors For Linux][11]
Once you get over the learning curve, there is nothing like LaTex. Here are the best LaTex editors for Linux and other systems.
### Installing Zotero on Linux
![][12]
It is available for Windows, macOS, and Linux. For Linux, if you are using an Ubuntu-based distribution (or Ubuntu itself), you will get a deb file (maintained by a third-party) to download and install it.
[Installing a deb file][13] is easy and it worked just fine on Pop OS 20.04. If you are using any other Linux distribution, you can [extract the tarball][14] and get it installed.
You can follow the [official installation instructions][15] to proceed with the suitable method.
[Zotero][2]
### Concluding Thoughts
You get plenty of features to organize, share, cite, and collect resources for your search. With the support for audio, video, text, and link, it should be fit for almost everything.
Of course, I would recommend this to a power user to make the most out of it. And, if you are someone who has previously use tree-view (mind map view) note taking tools, you know what to look for.
What do you think about Zotero? If its not for you, what would you suggest as a better alternative to this? Let me know your thoughts in the comments below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/zotero/
作者:[Ankush Das][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://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/note-taking-apps-linux/
[2]: https://www.zotero.org/
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/zotero-app.png?resize=800%2C481&ssl=1
[4]: https://github.com/zotero/zotero
[5]: https://www.zotero.org/support/
[6]: https://en.wikipedia.org/wiki/WebDAV
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/zotero-online-publication.jpg?resize=800%2C600&ssl=1
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/zotero-extension.jpg?resize=800%2C414&ssl=1
[9]: https://zbib.org/
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/11/latex-featured.jpg?fit=800%2C450&ssl=1
[11]: https://itsfoss.com/latex-editors-linux/
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/zotero-preferences.png?resize=800%2C489&ssl=1
[13]: https://itsfoss.com/install-deb-files-ubuntu/
[14]: https://en.wikipedia.org/wiki/Tarball
[15]: https://www.zotero.org/support/installation

View File

@ -0,0 +1,179 @@
[#]: collector: (lujun9972)
[#]: translator: (alim0x)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Creating a Chat Bot with Recast.AI)
[#]: via: (https://opensourceforu.com/2019/11/creating-a-chat-bot-with-recast-ai/)
[#]: author: (Athira Lekshmi C.V https://opensourceforu.com/author/athira-lekshmi/)
用 Recast.AI 创建一个聊天机器人
======
[![][1]][2]
_据 Gartner 2018 年 2 月的报告,“到 2020 年25% 的客户服务和支持业务将在参与渠道中整合虚拟客户助理VCA或聊天机器人技术而 2017 年只有不到 2%。”鉴于此,读者会发现本教程对理解开源的 Recast.AI 机器人创建平台的工作原理很有帮助。_
聊天机器人,包括基于语音的以及其他技术的,已经实际使用了有一阵子了。从让用户参与谋杀解密游戏,到帮助完成房地产交易和医疗诊断,聊天机器人已经跨越了多个领域。
有许多平台可以让用户创建和部署机器人。Recast.AI在被 SAP 收购之后现在是 SAP Conversational AI是其中的先行者。
酷炫的界面、协作性以及它所提供的分析工具,让它成为流行的选择。
正如 Recast 官方网站说的,“它是一个创建、训练、部署和监控智能机器人的终极协作平台。”
![图 1: 设置机器人属性][3]
![图 2: 机器人面板][4]
![图 3: 搜索一个意图][5]
**创建一个基础的机器人**
让我们来看看如何在 Recast 创建一个基础的机器人。
1. 在 _<https://cai.tools.sap>_ 创建一个账户。注册可以使用电子邮箱或者 Github 账户。
2. 在你登录之后,你会进入仪表板。点击右上角 + 新建机器人图标新建一个机器人。
3. 在下一个界面你会看到一系列可选的预定义技能。暂时选择问候图1。这个机器人已经经过训练来理解基本的问候。
4. 给机器人提供一个名字。目前来说,你可以让机器人讲一些笑话,所以我们将它命名为 Joke Bot选择英语作为默认语言。
5. 因为你不会处理任何敏感信息,所以在数据策略下选择非个人数据。然后选择公共机器人选项并点击创建一个机器人。
所以这就是你在 Recast 平台创建的机器人。
![Figure 4: @joke 意图][6]
![Figure 5: 预定义表达][7]
**开发一个机器人的五个阶段**
用 Recast 官方博客的话说,在机器人的生命中有五个阶段。
* 训练——教授机器人需要理解的内容
* 构建——使用机器人构建工具创建你的对话流
* 编写代码——将机器人连接到外部 API 或数据库
* 连接——将机器人发布到一个或多个消息平台
* 监控——训练机器人让它更敏锐,并且了解其使用情况
**通过意图训练机器人**
你可以在仪表板上看到搜索、分叉或创建一个意图的选项。“意图是一系列含义相同但构造不同的表达。意图是你的机器人理解能力的核心。每个意图代表了机器人可以理解的一种想法。”(摘自 _Recast.AI_ 网站)
就像先前定的你需要一个讲笑话的机器人。所以底线是这个机器人可以理解用户在要求它讲笑话它不应该在用户仅仅说了“Hi”的情况下回复一个笑话——这可不妙。把用户可能说的话进行分组比如
```
Tell me a joke.(给我讲个笑话。)
Tell me a funny fact.(告诉我一个有趣的事实。)
Can you crack a joke?(你可以讲个笑话吗?)
Whats funny today?(今天有什么有趣的?)
```
…………………
在继续从头开始创建意图之前,让我们来看看搜索/分叉选项。在搜索框输入 _Joke_(图 3。系统给出了全球的 Recast 用户创建的公开的意图清单,这就是为什么说 Recast 天然就是协作性质的。所以其实没有必要从头开始创建所有的意图,可以在已经创建的基础上进行构建。这就降低了训练具有常见意图的机器人所需的投入。
* 选择列表中的第一个意图并将其分叉到机器人上。
* 点击分叉Fork按钮。这个意图就添加到了机器人中图 4
* 点击意图 @joke,会显示出这个意图中已经存在的表达列表(图 5
* 向其添加更多的表达(图 6
![图 6: 建议的表达][8]
![图 7: 建议的表达][9]
添加了一些表达之后,机器人会给出一些建议,像图 7 展示的那样。选择几个将它们添加到意图中(图 7。你还可以根据机器人的上下文标记你自己的自定义实体来检测关键词。
**技能**
技能是一块有明确目的的对话,机器人可以据此运行并达到目标。它可以像打招呼那么简单,也可以更复杂,比如基于用户提供的信息提供电影建议。
技能需要的不能只是一对问答,它需要多次交互。比如考虑一个帮你学习汇率的机器人。它一开始会问原货币,然后是目标货币,最后给出准确回应。结合技能可以创建复杂的对话流。
下面是如何给笑话机器人创建技能:
* 去到 _构建Build_ 页。点击 + 图标创建技能。
* 给技能命名 _Joke_(图 8
* 创建之后点击这个技能。你会看到四个标签。_Read meTriggers触发器Requirements需求和 Actions动作。_
* 切换到 Requirements 页面。只有在笑话意图存在的时候,你才应该存储信息。所以,像图 9 那样添加一个 requirement需求
![图 8: 技能面板][10]
![图 9: 添加一个触发器][11]
由于这个简单的使用范例,你不需要在需求选项卡中考虑任何特定的需求,但可以考虑只有当某些关键字或实体出现时才需要触发响应的情况——在这种情况下你需要“需求”。
需求是某个技能执行动作之前需要检索的意图或实体。需求是对话中机器人可以使用的重要信息。例如用户的姓名或位置。一旦一个需求完成,相关的值就会存储在机器人的内存中,供整个对话使用。
现在让我们转到动作页面设置回应(参见图 10
点击添加 _新消息组_。然后选择 _发送新消息_ 并添加一条文本消息,在这个例子中可以是任何笑话。当然,你肯定不想让你的机器人每次都说一样的笑话,你可以添加多条消息,每次从中随机选择一条。
![图 10: 添加动作][12]
![图 11: 添加文本消息][13]
![图 12: 设置网络聊天][14]
**频道集成**
一个成功的机器人还依赖于它的易得性。Recast 有不少的内置消息频道集成,如 Skype for Business、Kik Messenger、Telegram、Line、Facebook Messenger、Slack、Alexa 等等。除此之外Recast 还提供了 SDK 用于开发自定义的频道。
此外Recast 还提供一个可立即使用的网页聊天(在连接页面中)。你可以自定义颜色主题,标题,机器人头像等。它给你提供了一个可以添加到页面的脚本标签。你的界面现在就可以使用了(图 12
网页聊天的代码是开源的,开发者可以更方便地定制外观,标准回应类型等等。面板提供了如何将机器人部署到各种频道的逐步过程说明。这个笑话机器人部署在 Telegram 和网页聊天上,就像图 13 展示的那样。
![图 13: 网页聊天部署][15]
![图 14: Telegram 中开发的机器人][16]
![图 15: 多语言机器人][17]
**还有更多**
Recast 支持多语言,创建机器人的时候选择一个语言作为基础,但之后你有选项可以添加更多你想要的语言。
这里的例子是一个简单的静态笑话机器人实际使用中可能需要更多的和不同系统的交互。Recast 有 Web 钩子功能,用户可以连接到不同的系统来获取回应。同时它还有详细的 API 文档来帮助使用平台的每个独立功能。
至于分析Recast 有一个监控面板,帮助你了解机器人的准确度以及更加深入地训练机器人。
![Avatar][18]
[Athira Lekshmi C.V][19]
作者是一名开源爱好者。
[![][20]][21]
--------------------------------------------------------------------------------
via: https://opensourceforu.com/2019/11/creating-a-chat-bot-with-recast-ai/
作者:[Athira Lekshmi C.V][a]
选题:[lujun9972][b]
译者:[alim0x]](https://github.com/alim0x)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensourceforu.com/author/athira-lekshmi/
[b]: https://github.com/lujun9972
[1]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/04/Build-ChatBoat.jpg?resize=696%2C442&ssl=1 (Build ChatBoat)
[2]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/04/Build-ChatBoat.jpg?fit=900%2C572&ssl=1
[3]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-1-Setting-the-bot-properties.jpg
[4]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-2-Setting-the-bot-properties.jpg
[5]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-3-Searching-an-intent.jpg
[6]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-4-@joke-intent.jpg
[7]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-5-Predefined-expressions.jpg
[8]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-6-Suggested-expressions.jpg
[9]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-7-Suggested-expressions.jpg
[10]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-8-Skills-dashboard.jpg
[11]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-9-Adding-a-trigger.jpg
[12]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-10-Adding-actions.jpg
[13]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-11-Adding-text-messages.jpg
[14]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-12-Setting-up-webchat.jpg
[15]: https://i0.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-13-Webchat-deployed.jpg
[16]: https://i2.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-14-Bot-deployed-in-Telegram.jpg
[17]: https://i1.wp.com/opensourceforu.com/wp-content/uploads/2019/11/Figure-15-Multi-language-bot.jpg
[18]: https://secure.gravatar.com/avatar/d24503a2a0bb8bd9eefe502587d67323?s=100&r=g
[19]: https://opensourceforu.com/author/athira-lekshmi/
[20]: https://opensourceforu.com/wp-content/uploads/2019/11/assoc.png
[21]: https://feedburner.google.com/fb/a/mailverify?uri=LinuxForYou&loc=en_US

View File

@ -0,0 +1,80 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Go Full Dark Mode With LibreOffice)
[#]: via: (https://itsfoss.com/libreoffice-dark-mode/)
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
如何使用 LibreOffice 进入黑暗模式
======
[LibreOffice][1] 是一款免费的开源跨平台办公生产力软件。如果你没有充分利用它,那么必须看下 [LibreOffice 小技巧][2]。
黑暗主题甚至在非编程人员中也越来越受欢迎。它减轻了眼睛的压力,特别适合长时间使用屏幕。有人认为,这使文本看起来清晰明了,有助于提高生产率。
如今,某些 Linux 发行版例如 [Ubuntu 带有黑暗模式][3],使你的系统具有更暗的色彩。当你打开黑暗模式时,某些应用将自动切换到黑暗模式。
LibreOffice 也会这样,但你编辑的主区域除外:
![LibreOffice semi dark mode matching with the system theme][4]
你可以更改它。如果要让 LibreOffice 进入完全黑暗模式,只需更改一些设置。让我告诉你如何做。
### 如何在 LibreOffice 中完全启用黑暗模式
如前所述,你需要先启用系统范围的黑暗模式。这样可以确保窗口颜色(或标题栏)与应用内深色完全融合。
接下来打开套件中的_**任意**_ LibreOffice 工具,例如 ** Writer **。然后从菜单中,依次点击 **Tools -&gt; Options -gt; Application Colors**,然后选择 **Document background 和 Application background****Black****Automatic**(任意适合你的方式)。
![][5]
如果图标不是深色,那么可以从菜单(如下图所示)中更改它们,** Tools -&gt; Options -&gt; View** ,我在 MX Linux 上的个人选择是 Ubuntu 的 [Yaru][6] 图标样式(如果你使用的图标包为黑暗版本,请选择它) 。
![][7]
当然,你也可以尝试其他 Linux 发行版的 [icon 主题][8]。
最终结果应如下所示:
![][9]
#### LibreOffice flatpak 软件包的其他技巧
如果你使用的是 LibreOffice 套件的 [Flatpak 软件包][10],那么 LibreOffice 的标题区域(或菜单区域)可能看起来是白色的。在这种情况下,你可以尝试进入 **Tools-&gt; Options-&gt; Personalization**,然后选择 “**灰色主题**”,如下截图所示。
![][11]
它并不完全是黑色的,但应该可以使外观看起来更好。希望可以帮助你切换到黑暗主题的 LibreOffice 体验!
#### 总结
黑暗主题逐渐开始在我们的台式机中占主导地位,它具有现代品味并减少了眼睛疲劳,尤其是在弱光条件下。
LibreOffice 使你可以自由地将工作环境切换为黑暗主题或保留浅色主题元素。实际上,你将有大量的自定义选项来调整你喜欢的内容。你是否已在 LibreOffice 上切换为黑暗主题?你首选哪种颜色组合?在下面的评论中让我们知道!
--------------------------------------------------------------------------------
via: https://itsfoss.com/libreoffice-dark-mode/
作者:[Dimitrios Savvopoulos][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/dimitrios/
[b]: https://github.com/lujun9972
[1]: https://www.libreoffice.org
[2]: https://itsfoss.com/libreoffice-tips/
[3]: https://itsfoss.com/dark-mode-ubuntu/
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/libreOffice-dark-mode.png?resize=799%2C450&ssl=1
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/1-libreoffice-application-colours.png?resize=800%2C551&ssl=1
[6]: https://extensions.libreoffice.org/en/extensions/show/yaru-icon-theme
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/2-libreoffice-iconstyle-1.png?resize=800%2C531&ssl=1
[8]: https://itsfoss.com/best-icon-themes-ubuntu-16-04/
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/3-libreoffice-dark.png?resize=800%2C612&ssl=1
[10]: https://itsfoss.com/what-is-flatpak/
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/libre-office-personalization.png?resize=800%2C636&ssl=1