mirror of
https://github.com/LCTT/TranslateProject.git
synced 2026-08-23 04:03:29 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11799-1.html)
|
||||
[#]: subject: (How to Add Border Around Text in GIMP)
|
||||
[#]: via: (https://itsfoss.com/gimp-text-outline/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
@@ -10,7 +10,9 @@
|
||||
在 GIMP 中如何在文本周围添加边框
|
||||
======
|
||||
|
||||
这个简单的教程阐明了在 [GIMP][1] 中显示文本的轮廓的步骤。文本轮廓帮助你在其它颜色下高亮显示文本。
|
||||

|
||||
|
||||
这个简单的教程介绍了在 [GIMP][1] 中显示文本的轮廓的步骤。文本轮廓可以帮助你在其它颜色下高亮显示该文本。
|
||||
|
||||
![Outlined Text created in GIMP][2]
|
||||
|
||||
@@ -20,25 +22,23 @@
|
||||
|
||||
整个过程可以用这些简单的步骤描述:
|
||||
|
||||
* 创建文本,并复制它的轮廓路径
|
||||
* 添加一层新的透明层,并添加轮廓路径到透明层中
|
||||
* 更改轮廓的大小,给它添加一种不同的颜色
|
||||
|
||||
|
||||
* 创建文本,并复制它的轮廓路径
|
||||
* 添加一层新的透明层,并添加轮廓路径到透明层中
|
||||
* 更改轮廓的大小,给它添加一种不同的颜色
|
||||
|
||||
这就是全部的东西。不用担心,我将使用适当地截图详细的展示每个步骤。按照这个教程,你应该能够为文本添加轮廓,即使你在此之前从未使用过 GIMP 。
|
||||
|
||||
仅需要确保你已经 [在 Linux 上安装 GIMP][3] 或者你正在使用的任何操作。
|
||||
仅需要确保你已经 [在 Linux 上安装 GIMP][3],或者也可以使用的其它任何操作系统。
|
||||
|
||||
这篇教程在 GIMP 2.10 版本下演示。
|
||||
|
||||
#### 步骤 1: 创建你的主要文本,并复制它的轮廓
|
||||
|
||||
打开 GIMP ,并通过转到 菜单 -> 文件 -> 新建 来创建一个新的文件。你应该可以使用 Ctrl+N 键盘快捷键。
|
||||
打开 GIMP ,并通过转到 “菜单 -> 文件 -> 新建” 来创建一个新的文件。你应该可以使用 `Ctrl+N` 键盘快捷键。
|
||||
|
||||
![Create New File][4]
|
||||
|
||||
你可以在这里选择画布的大小。你也可以选择要白色背景或一种透明背景。它在 高级选项 -> 颜色 配置文件下。
|
||||
你可以在这里选择画布的大小。你也可以选择要白色背景或一种透明背景。它在 “高级选项 -> 颜色” 配置文件下。
|
||||
|
||||
我选择默认的白色背景。它在以后能够更改。
|
||||
|
||||
@@ -46,35 +46,35 @@
|
||||
|
||||
![Adding text in GIMP][5]
|
||||
|
||||
写你想的文本。你可以根据你的选择以更改文本的字体,大小和对齐方式。我保持这篇文章的文本的默认左对齐。
|
||||
写你想要的文本。你可以根据你的选择以更改文本的字体、大小和对齐方式。我保持这篇文章的文本的默认左对齐。
|
||||
|
||||
我故意为文本选择一种浅色,以便难于阅读。在这篇教程中我将添加一个深色轮廓到这个浅色的文本。
|
||||
|
||||
![Text added in GIMP][6]
|
||||
|
||||
当你写完文本后,右键文本框并选择 **文本的路径** 。
|
||||
当你写完文本后,右键文本框并选择 “文本的路径” 。
|
||||
|
||||
![Right click on the text box and select ‘Path from Text’][7]
|
||||
|
||||
#### 步骤 2: 添加一个带有文本轮廓的透明层
|
||||
|
||||
现在,转到顶部菜单,转到 层 ,并添加一个新层。
|
||||
现在,转到顶部菜单,转到“层”,并添加一个新层。
|
||||
|
||||
![Use Shift+Ctrl+N to add a new layer][8]
|
||||
|
||||
确保添加新层为透明的。你可以给它一个合适的名称,像 ‘文本大纲’。单击确定来添加这个透明层。
|
||||
确保添加新层为透明的。你可以给它一个合适的名称,像“文本大纲”。单击确定来添加这个透明层。
|
||||
|
||||
![Add a transparent layer][9]
|
||||
|
||||
再次转到菜单,这次转到 **选择** ,并单击 **来自路径** 。你将看到你的文本应该被高亮显示。
|
||||
再次转到菜单,这次转到 “选择” ,并单击 “来自路径” 。你将看到你的文本应该被高亮显示。
|
||||
|
||||
![Go to Select and choose From Path][10]
|
||||
|
||||
总的来说,你只创建一个透明层,它有像你的原文一样相同的文本(但是透明)。现在你需要做的是在这个层上增加文本的大小。
|
||||
总的来说,你只创建了一个透明层,它有像你的原文一样相同的文本(但是透明)。现在你需要做的是在这个层上增加文本的大小。
|
||||
|
||||
#### 步骤· 3: 通过增加它的大小和更改它的颜色来添加文本轮廓
|
||||
#### 步骤 3: 通过增加它的大小和更改它的颜色来添加文本轮廓
|
||||
|
||||
为此,再次在菜单中转到 选择 ,这次选择 增加。这将允许增大透明层上的文本的大小。
|
||||
为此,再次在菜单中转到 “选择” ,这次选择 “增加”。这将允许增大透明层上的文本的大小。
|
||||
|
||||
![Grow the selection on the additional layer][11]
|
||||
|
||||
@@ -84,13 +84,13 @@
|
||||
|
||||
你选择需要做是使用一种你选择的颜色来填充这个扩大的选择区。因为我的原文是浅色,在这里我将为轮廓使用背景色。
|
||||
|
||||
如果尚未选择的话,先 **选择你的主图像层** 。这些层在右侧栏中可视。然后转到工具箱并选择油漆桶工具。为你的轮廓选择想要的颜色。
|
||||
如果尚未选择的话,先选择你的主图像层。这些层在右侧栏中可视。然后转到工具箱并选择油漆桶工具。为你的轮廓选择想要的颜色。
|
||||
|
||||
选择使用该工具来填充黑色到你的选择区。记住。你填充文本外部的轮廓,而不是文本本身。
|
||||
|
||||
![Fill the outline of the text with a different color][13]
|
||||
|
||||
在这里你完成了很多。使用 Ctrl+Shift+A 来取消你当前的选择区。
|
||||
在这里你完成了很多。使用 `Ctrl+Shift+A` 来取消你当前的选择区。
|
||||
|
||||
![Outline added to the text][14]
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
如果你对结果感到满意,保存文件未 PNG 文件(来保留透明背景),或你喜欢的任何文件格式。
|
||||
|
||||
**你使它工作了吗?**
|
||||
### 你使它工作了吗?
|
||||
|
||||
就这样。这就是你在 GIMP 中为添加一个文本轮廓而需要做的全部工作。
|
||||
|
||||
@@ -115,7 +115,7 @@ via: https://itsfoss.com/gimp-text-outline/
|
||||
作者:[Abhishek Prakash][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/) 荣誉推出
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11800-1.html)
|
||||
[#]: subject: (setV: A Bash function to maintain Python virtual environments)
|
||||
[#]: via: (https://opensource.com/article/20/1/setv-bash-function)
|
||||
[#]: author: (Sachin Patil https://opensource.com/users/psachin)
|
||||
@@ -10,11 +10,11 @@
|
||||
setV:一个管理 Python 虚拟环境的 Bash 函数
|
||||
======
|
||||
|
||||
> 了解一下 setV,它是轻量级的 Python 虚拟环境管理器,是 virtualenvwrapper 的替代产品。
|
||||
> 了解一下 setV,它是一个轻量级的 Python 虚拟环境管理器,是 virtualenvwrapper 的替代产品。
|
||||
|
||||
![Coding on a computer][1]
|
||||

|
||||
|
||||
这一年多来,[setV] [2] 悄悄隐藏在我的 [bash_scripts][3] 项目中,但现在是时候该公开了。setV 是一个 Bash 函数,我可以用它代替 [virtualenvwrapper][4]。它提供了使你能够执行以下操作的基本功能:
|
||||
这一年多来,我的 [bash_scripts][3] 项目中悄悄隐藏这 [setV][2],但现在是时候该公开了。setV 是一个 Bash 函数,我可以用它代替 [virtualenvwrapper][4]。它提供了使你能够执行以下操作的基本功能:
|
||||
|
||||
* 默认使用 Python 3
|
||||
* 创建一个新的虚拟环境
|
||||
@@ -37,7 +37,7 @@ curl https://gitlab.com/psachin/setV/raw/master/install.sh
|
||||
sh ./install.sh
|
||||
```
|
||||
|
||||
当安装 setV 时,安装脚本会询问你要嵌入到 `~/.bashrc` 还是 `~/.bash_profile`,根据你的喜好选择一个。
|
||||
当安装 setV 时,安装脚本会要求你引入(`source`)一下 `~/.bashrc` 或 `~/.bash_profile` 的配置,根据你的喜好选择一个。
|
||||
|
||||
### 用法
|
||||
|
||||
@@ -281,7 +281,7 @@ via: https://opensource.com/article/20/1/setv-bash-function
|
||||
作者:[Sachin Patil][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Open source fights cancer, Tesla adopts Coreboot, Uber and Lyft release open source machine learning)
|
||||
[#]: via: (https://opensource.com/article/20/1/news-january-19)
|
||||
[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
|
||||
|
||||
Open source fights cancer, Tesla adopts Coreboot, Uber and Lyft release open source machine learning
|
||||
======
|
||||
Catch up on the biggest open source headlines from the past two weeks.
|
||||
![Weekly news roundup with TV][1]
|
||||
|
||||
In this edition of our open source news roundup, we take a look machine learning tools from Uber and Lyft, open source software to fight cancer, saving students money with open textbooks, and more!
|
||||
|
||||
### Uber and Lyft release machine learning tools
|
||||
|
||||
It's hard to a growing company these days that doesn't take advantage of machine learning to streamline its business and make sense of the data it amasses. Ridesharing companies, which gather massive amounts of data, have enthusiastically embraced the promise of machine learning. Two of the biggest players in the ridesharing sector have made some of their machine learning code open source.
|
||||
|
||||
Uber recently [released the source code][2] for its Manifold tool for debugging machine learning models. According to Uber software engineer Lezhi Li, Manifold will "benefit the machine learning (ML) community by providing interpretability and debuggability for ML workflows." If you're interested, you can browse Manifold's source code [on GitHub][3].
|
||||
|
||||
Lyft has also upped its open source stakes by releasing Flyte. Flyte, whose source code is [available on GitHub][4], manages machine learning pipelines and "is an essential backbone to (Lyft's) operations." Lyft has been using it to train AI models and process data "across pricing, logistics, mapping, and autonomous projects."
|
||||
|
||||
### Software to detect cancer cells
|
||||
|
||||
In a study recently published in _Nature Biotechnology_, a team of medical researchers from around the world announced [new open source software][5] that "could make it easier to create personalised cancer treatment plans."
|
||||
|
||||
The software assesses "the proportion of cancerous cells in a tumour sample" and can help clinicians "judge the accuracy of computer predictions and establish benchmarks" across tumor samples. Maxime Tarabichi, one of the lead authors of [the study][6], said that the software "provides a foundation which will hopefully become a much-needed, unbiased, gold-standard benchmarking tool for assessing models that aim to characterise a tumour’s genetic diversity."
|
||||
|
||||
### University of Regina saves students over $1 million with open textbooks
|
||||
|
||||
If rising tuition costs weren't enough to send university student spiralling into debt, the high prices of textbooks can deepen the crater in their bank accounts. To help ease that financial pain, many universities turn to open textbooks. One of those schools is the University of Regina. By offering open text books, the university [expects to save a huge amount for students][7] over the next five years.
|
||||
|
||||
The expected savings are in the region of $1.5 million (CAD), or around $1.1 million USD (at the time of writing). The textbooks, according to a report by radio station CKOM, are "provided free for (students) and they can be printed off or used as e-books." Students aren't getting inferior-quality textbooks, though. Nilgun Onder of the University of Regina said that the "textbooks and other open education resources the university published are all peer-reviewed resources. In other words, they are reliable and credible."
|
||||
|
||||
### Tesla adopts Coreboot
|
||||
|
||||
Much of the software driving (no pun intended) the electric vehicles made by Tesla Motors is open source. So it's not surprising to learn that the company has [adopted Coreboot][8] "as part of their electric vehicle computer systems."
|
||||
|
||||
Coreboot was developed as a replacement for proprietary BIOS and is used to boot hardware and the Linux kernel. The code, which is in [Tesla's GitHub repository][9], "is from Tesla Motors and Samsung," according to Phoronix. Samsung, in case you're wondering, makes the chip on which Tesla's self-driving software runs.
|
||||
|
||||
#### In other news
|
||||
|
||||
* [Arduino launches new modular platform for IoT development][10]
|
||||
* [SUSE and Karunya Institute of Technology and Sciences collaborate to enhance cloud and open source learning][11]
|
||||
* [How open-source code could help us survive natural disasters][12]
|
||||
* [The hottest thing in robotics is an open source project you've never heard of][13]
|
||||
|
||||
|
||||
|
||||
_Thanks, as always, to Opensource.com staff members and moderators for their help this week. Make sure to check out [our event calendar][14], to see what's happening next week in open source._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/1/news-january-19
|
||||
|
||||
作者:[Scott Nesbitt][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/scottnesbitt
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/weekly_news_roundup_tv.png?itok=B6PM4S1i (Weekly news roundup with TV)
|
||||
[2]: https://venturebeat.com/2020/01/07/uber-open-sources-manifold-a-visual-tool-for-debugging-ai-models/
|
||||
[3]: https://github.com/uber/manifold
|
||||
[4]: https://github.com/lyft/flyte
|
||||
[5]: https://www.cbronline.com/industry/healthcare/open-source-cancer-cells/
|
||||
[6]: https://www.nature.com/articles/s41587-019-0364-z
|
||||
[7]: https://www.ckom.com/2020/01/07/open-source-program-to-save-u-of-r-students-1-5m/
|
||||
[8]: https://www.phoronix.com/scan.php?page=news_item&px=Tesla-Uses-Coreboot
|
||||
[9]: https://github.com/teslamotors/coreboot
|
||||
[10]: https://techcrunch.com/2020/01/07/arduino-launches-a-new-modular-platform-for-iot-development/
|
||||
[11]: https://www.crn.in/news/suse-and-karunya-institute-of-technology-and-sciences-collaborate-to-enhance-cloud-and-open-source-learning/
|
||||
[12]: https://qz.com/1784867/open-source-data-could-help-save-lives-during-natural-disasters/
|
||||
[13]: https://www.techrepublic.com/article/the-hottest-thing-in-robotics-is-an-open-source-project-youve-never-heard-of/
|
||||
[14]: https://opensource.com/resources/conferences-and-events-monthly
|
||||
@@ -1,67 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Morisun029)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (4 ways to volunteer this holiday season)
|
||||
[#]: via: (https://opensource.com/article/19/12/ways-volunteer)
|
||||
[#]: author: (John Jones https://opensource.com/users/johnjones4)
|
||||
|
||||
4 ways to volunteer this holiday season
|
||||
======
|
||||
Looking to spread some holiday cheer? Donate your talents to open source
|
||||
organizations that help communities in need.
|
||||
![Gift box opens with colors coming out][1]
|
||||
|
||||
Social impact happens when leaders deploy individuals and resources to make positive change, but many social efforts are lacking technology resources that are up to the task of serving these change-makers. However, there are organizations helping to accelerate tech for good by connecting developers who want to make a change with communities and nonprofits who desperately need better technology. These organizations often serve specific audiences and recruit specific kinds of technologists, but they all share a common thread: open source.
|
||||
|
||||
As developers, we all seek to participate in the open source community for a variety of reasons. Some participate for professional development, some participate so that they may collaborate with a vast, impressive network of technologists, and others participate because they know their contributions are necessary for the success of a project. Why not also volunteer your talents as a developer to an effort that needs them, and contribute to open source all at the same time? The organizations below are prime examples of how you can do that.
|
||||
|
||||
### Code for America
|
||||
|
||||
Code for America is an example of how government can still be by the people and for the people in the digital age. Through its Brigade Network, the organization has cultivated a national alliance of volunteer programmers, data scientists, concerned citizens, and designers organized in cities all over the United States. These local affiliates host regular meet-ups which are open to the community to both pitch new projects to the group and collaborate on ongoing efforts. To match volunteers with projects, the brigades’ websites often list the specific skills needed for a project such as data analysis, content creation, and JavaScript. While the brigades focus on local issues, shared experiences like natural disasters can foster collaboration. For example, a multi-brigade effort from the New Orleans, Houston, and Tampa Bay teams developed a hurricane response website that can be quickly adapted to different cities when disaster strikes.
|
||||
|
||||
To get involved, visit Code for America’s [website][2] for a list of its over 70 brigades, and a path for individuals to start their own if there is not one already in their community.
|
||||
|
||||
### Code for Change
|
||||
|
||||
Code for Change shows that social impact can start even in high school. A group of high school coders in Indianapolis started their own club to give back to local organizations by creating open source software solutions to issues in their community. Code for Change encourages local organizations to reach out with a project idea, and the student group steps in to develop a completely free and open source solution. The group has developed projects such as "Sapphire," which optimized volunteer management systems for a local refugee organization, and a Civil Rights Commission complaint form that makes it easier for citizens to voice their concerns online.
|
||||
|
||||
For more information on how to create a Code for Change chapter in your own community, [visit their website][3].
|
||||
|
||||
### Python for Good/Ruby for Good
|
||||
|
||||
Python for Good and Ruby for Good are twin annual events in Portland, Oregon and Fairfax, Virginia, that bring people together to develop and program solutions for those respective communities. Over a weekend, individuals get together to hear pitches from local nonprofits and tackle their issues by building open source solutions. In 2017, Ruby For Good participants created "Justice for Juniors," which mentors and tutors current and formerly incarcerated youths to integrate them back into the community. Participants have also created "Diaperbase," an inventory management system that has been used by diaper banks all over the United States. One of the main objectives of these events is to bring organizations and people from seemingly different industries and mindsets to come together for a common good. Companies can sponsor the events, nonprofits can submit project ideas, and people of all skill levels can register to attend the event and contribute. Through their bicoastal efforts, Ruby for Good and Python for Good are living up to their motto of "making the world gooder."
|
||||
|
||||
[Ruby for Good][4] is held in the summer and hosted on George Mason’s campus in Fairfax, Virginia.
|
||||
|
||||
### Social Coder
|
||||
|
||||
UK-based Ed Guiness created Social Coder to bring together volunteers and charities to create and use open source projects for nonprofits across six continents. Social Coder actively recruits a network of skilled IT volunteers from all over the world and matches them to charities and nonprofits registered through Social Coder. Projects can range from simple website updates to entire mobile app development.
|
||||
|
||||
For example, PHASE Worldwide, a small non-governmental association supporting efforts in Nepal, got access to key support and expertise leveraging open source technology because of Social Coder.
|
||||
|
||||
While a bulk of the charities already partnered with Social Coder are based in the UK, organizations in other countries are welcome. Through their website, individuals can register to work on social software projects and connect with organizations and charities seeking their help.
|
||||
|
||||
Individuals interested in volunteering with Social Coder can sign up [here][5].
|
||||
|
||||
The four-day-long siege of a Nairobi mall ended Tuesday with a death toll of more than 60 people –...
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/12/ways-volunteer
|
||||
|
||||
作者:[John Jones][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/johnjones4
|
||||
[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://brigade.codeforamerica.org/
|
||||
[3]: http://codeforchange.herokuapp.com/
|
||||
[4]: https://rubyforgood.org/
|
||||
[5]: https://socialcoder.org/Home/Programmer
|
||||
@@ -1,108 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Organize and sync your calendar with khal and vdirsyncer)
|
||||
[#]: via: (https://opensource.com/article/20/1/open-source-calendar)
|
||||
[#]: author: (Kevin Sonney https://opensource.com/users/ksonney)
|
||||
|
||||
Organize and sync your calendar with khal and vdirsyncer
|
||||
======
|
||||
Keeping and sharing a calendar can be a pain. Learn how to make it
|
||||
easier in the fifth article in our series on 20 ways to be more
|
||||
productive with open source in 2020.
|
||||
![Calendar close up snapshot][1]
|
||||
|
||||
Last year, I brought you 19 days of new (to you) productivity tools for 2019. This year, I'm taking a different approach: building an environment that will allow you to be more productive in the new year, using tools you may or may not already be using.
|
||||
|
||||
### Keep track of your schedule with khal and vdirsyncer
|
||||
|
||||
Calendars are a _pain_ to deal with, and finding good tooling is always hard. But I've made some progress since last year when I listed calendaring as [one of my "fails."][2]
|
||||
|
||||
The most difficult thing about calendars today is that now they almost always need to be shared online in some way. The two most popular online calendars are Google Calendar and Microsoft Outlook/Exchange. Both are used heavily in corporate environments, which means my calendar has to support one or both options.
|
||||
|
||||
![khal calendar][3]
|
||||
|
||||
[Khal][4] is a console-based calendar that reads and writes VCalendar files. It's fairly easy to configure, but it does not support syncing with other applications.
|
||||
|
||||
Fortunately, khal works with [vdirsyncer][5], a nifty command-line program that can synchronize online calendars (and contacts, which I'll talk about in a separate article) to your local drive. And yes, this includes uploading new events, too.
|
||||
|
||||
![vdirsyncer][6]
|
||||
|
||||
Vdirsyncer is a Python 3 program, and it can be installed via your package manager or pip. It can synchronize CalDAV, VCalendar/iCalendar, Google Calendar, and local files in a directory. Since I use Google Calendar, I'll use that as an example, although it is not the easiest thing to set up.
|
||||
|
||||
Setting vdirsyncer up for Google is [well-documented][7], so I won't go into the nuts and bolts here. The important thing is to make sure your sync pairs are set up in a way that sets Google Calendar as the "winner" for conflict resolution. That is, if there are two updates to the same event, it needs to know which one takes precedence. Do so with something like this:
|
||||
|
||||
|
||||
```
|
||||
[general]
|
||||
status_path = "~/.calendars/status"
|
||||
|
||||
[pair personal_sync]
|
||||
a = "personal"
|
||||
b = "personallocal"
|
||||
collections = ["from a", "from b"]
|
||||
conflict_resolution = "a wins"
|
||||
metadata = ["color"]
|
||||
|
||||
[storage personal]
|
||||
type = "google_calendar"
|
||||
token_file = "~/.vdirsyncer/google_calendar_token"
|
||||
client_id = "google_client_id"
|
||||
client_secret = "google_client_secret"
|
||||
|
||||
[storage personallocal]
|
||||
type = "filesystem"
|
||||
path = "~/.calendars/Personal"
|
||||
fileext = ".ics"
|
||||
```
|
||||
|
||||
After the first sync of vdirsyncer, you will end up with a series of directories in the storage path. Each will contain several files, one for each entry in the calendar. The next step is to get them into khal. Start by running **khal configure** to do the initial setup.
|
||||
|
||||
![Configuring khal][8]
|
||||
|
||||
Now, running **khal interactive** will bring up the display shown at the beginning of this article. Typing **n** will bring up the New Event dialog. One small thing to note here: the calendars are named to match the directories that vdirsyncer creates, but you can change the khal config file to give them clearer names. Adding colors to entries based on which calendar they're on will also help you identify which is which on the list:
|
||||
|
||||
|
||||
```
|
||||
[calendars]
|
||||
[[personal]]
|
||||
path = ~/.calendars/Personal/kevin@sonney.com/
|
||||
color = light magenta
|
||||
[[holidays]]
|
||||
path = ~/.calendars/Personal/cln2stbjc4hmgrrcd5i62ua0ctp6utbg5pr2sor1dhimsp31e8n6errfctm6abj3dtmg@virtual/
|
||||
color = light blue
|
||||
[[birthdays]]
|
||||
path = ~/.calendars/Personal/c5i68sj5edpm4rrfdchm6rreehgm6t3j81jn4rrle0n7cbj3c5m6arj4c5p2sprfdtjmop9ecdnmq@virtual/
|
||||
color = brown
|
||||
```
|
||||
|
||||
Now when you run **khal interactive**, each calendar will be colored to distinguish it from the others, and when you add a new entry, it will have a more descriptive name.
|
||||
|
||||
![Adding a new calendar entry][9]
|
||||
|
||||
The setup is a little tricky, but once it's done, khal with vdirsyncer gives you an easy way to manage calendar events and keep them in sync with your online services.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/1/open-source-calendar
|
||||
|
||||
作者:[Kevin Sonney][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/ksonney
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/calendar.jpg?itok=jEKbhvDT (Calendar close up snapshot)
|
||||
[2]: https://opensource.com/article/19/1/productivity-tool-wish-list
|
||||
[3]: https://opensource.com/sites/default/files/uploads/productivity_5-1.png (khal calendar)
|
||||
[4]: https://khal.readthedocs.io/en/v0.9.2/index.html
|
||||
[5]: https://github.com/pimutils/vdirsyncer
|
||||
[6]: https://opensource.com/sites/default/files/uploads/productivity_5-2.png (vdirsyncer)
|
||||
[7]: https://vdirsyncer.pimutils.org/en/stable/config.html#google
|
||||
[8]: https://opensource.com/sites/default/files/uploads/productivity_5-3.png (Configuring khal)
|
||||
[9]: https://opensource.com/sites/default/files/uploads/productivity_5-4.png (Adding a new calendar entry)
|
||||
@@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (One open source chat tool to rule them all)
|
||||
[#]: via: (https://opensource.com/article/20/1/open-source-chat-tool)
|
||||
[#]: author: (Kevin Sonney https://opensource.com/users/ksonney)
|
||||
|
||||
One open source chat tool to rule them all
|
||||
======
|
||||
BitlBee brings multiple chat applications into a single interface. Find
|
||||
out how to set up and use BitlBee in the ninth in our series on 20 ways
|
||||
to be more productive with open source in 2020.
|
||||
![Person using a laptop][1]
|
||||
|
||||
Last year, I brought you 19 days of new (to you) productivity tools for 2019. This year, I'm taking a different approach: building an environment that will allow you to be more productive in the new year, using tools you may or may not already be using.
|
||||
|
||||
### Bring all your chats into one interface with BitlBee
|
||||
|
||||
Instant messaging and chat have become a staple of the online world. And if you are like me, you probably have about five or six different apps running to talk to your friends, co-workers, and others. It really is a pain to keep up with it all. Thankfully, you can use one app (OK, two apps) to consolidate a lot of those chats into a single point.
|
||||
|
||||
![BitlBee on XChat][2]
|
||||
|
||||
[BitlBee][3] is an application that you run as a service that can bridge a standard IRC client with a whole bunch of messaging services. And since it is essentially an IRC server, you have a wealth of clients to choose from.
|
||||
|
||||
BitlBee is included with almost all Linux distributions. Installing on Ubuntu (my Linux desktop of choice) goes something like this:
|
||||
|
||||
|
||||
```
|
||||
`sudo apt install bitlbee-libpurple`
|
||||
```
|
||||
|
||||
On other distributions, the name of the package may be slightly different, but a search for _bitlbee_ should reveal your options.
|
||||
|
||||
You'll notice I use the libpurple version of BitlBee. This version allows me to use all the protocols available in the [libpurple][4] instant messaging library, which was originally developed for [Pidgin][5].
|
||||
|
||||
Once the package is installed, the service should start automatically. Now, using an IRC client ([XChat][6] in these pictures), I can connect to the service on port 6667 (the standard IRC port).
|
||||
|
||||
![Initial BitlBee connection][7]
|
||||
|
||||
You will be automatically connected to the control channel **&bitlbee**. This channel is unique to you—every person gets their own on multi-user systems. This is where you can configure the services.
|
||||
|
||||
The full documentation is available at any time by typing **help** in the control channel. Explore here, then register an account on the server with the **register** command.
|
||||
|
||||
|
||||
```
|
||||
`register <mypassword>`
|
||||
```
|
||||
|
||||
Now, any configuration changes you make on the server—IM accounts, settings, etc.—will be saved when you type **save**. Whenever you connect, use **identify <mypassword>** to connect to your account and load all those settings.
|
||||
|
||||
![purple settings][8]
|
||||
|
||||
The command **help purple** will show you all the available protocols that libpurple provides. For example, I've installed the [**telegram-purple**][9] package, which adds the ability to connect to Telegram. I can add an account by using my phone number with the **account add** command.
|
||||
|
||||
|
||||
```
|
||||
`account add telegram +15555555`
|
||||
```
|
||||
|
||||
BitlBee will show that it has added the account. You can list your accounts with **account list**. Since I only have one account, I can log into it with **account 0 on**, and it will go through the Telegram login process, list all my friends and chats, and I am good to go.
|
||||
|
||||
But what about Slack, one of the most common chat systems out there? Well, you can install the [**slack-libpurple**][10] plugin, and do the same for Slack. If you aren't comfortable compiling and installing things, this may not be for you.
|
||||
|
||||
Follow the instructions on the plugin page, and after you have installed it, restart the BitlBee service. Now when you run **help purple**, Slack should be listed. Adding a Slack account happens the same as with all the other protocols.
|
||||
|
||||
|
||||
```
|
||||
account add slack [ksonney@myslack.slack.com][11]
|
||||
account 1 set password my_legcay_API_token
|
||||
account 1 on
|
||||
```
|
||||
|
||||
And what do you know? You're connected to Slack, and you can add the Slack channels you're interested in with the **chat add** command. For example:
|
||||
|
||||
|
||||
```
|
||||
`chat add 1 happyparty`
|
||||
```
|
||||
|
||||
adds the Slack channel happyparty as the local channel #happyparty. You can use the standard IRC **/join** command to access the channel now. Pretty cool.
|
||||
|
||||
BitlBee and an IRC client help me keep (most of) my chats and instant messages in a single place and reduces my distractions because I no longer have to find and switch to whichever app just pinged me.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/1/open-source-chat-tool
|
||||
|
||||
作者:[Kevin Sonney][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/ksonney
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
|
||||
[2]: https://opensource.com/sites/default/files/uploads/productivity_9-1.png (BitlBee on XChat)
|
||||
[3]: https://www.bitlbee.org/
|
||||
[4]: https://developer.pidgin.im/wiki/WhatIsLibpurple
|
||||
[5]: http://pidgin.im/
|
||||
[6]: http://xchat.org/
|
||||
[7]: https://opensource.com/sites/default/files/uploads/productivity_9-2.png (Initial BitlBee connection)
|
||||
[8]: https://opensource.com/sites/default/files/uploads/productivity_9-3.png (purple settings)
|
||||
[9]: https://github.com/majn/telegram-purple
|
||||
[10]: https://github.com/dylex/slack-libpurple
|
||||
[11]: mailto:ksonney@myslack.slack.com
|
||||
@@ -0,0 +1,86 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (What's your favorite Linux terminal trick?)
|
||||
[#]: via: (https://opensource.com/article/20/1/linux-terminal-trick)
|
||||
[#]: author: (Opensource.com https://opensource.com/users/admin)
|
||||
|
||||
What's your favorite Linux terminal trick?
|
||||
======
|
||||
Take our poll or tell us about your favorite terminal trick. Is it a
|
||||
nifty productivity shortcut or a fun Easter egg?
|
||||
![Terminal command prompt on orange background][1]
|
||||
|
||||
The beginning of a new year is always a great time to evaluate new ways to become more efficient. Many people try out new productivity tools or figure out how to optimize their most mundane processes. One area to assess is the terminal. Especially in the world of open source, there are tons of ways to make life at the terminal more efficient (and fun!) with shortcuts and commands.
|
||||
|
||||
|
||||
|
||||
We asked our writers about their favorite terminal trick. They shared their time-saving tips and even a fun terminal Easter egg. Will you adopt one of these keyboard shortcuts or command line hacks? Do you have a favorite you'd like to share? Tell us about it by taking our poll or leaving a comment.
|
||||
|
||||
|
||||
|
||||
"I couldn't choose a favorite; I use all three of these daily:
|
||||
|
||||
* **Ctrl + L** to clear screen (instead of typing "clear").
|
||||
* **sudo !!** to run previous command with sudo privileges.
|
||||
* **grep -Ev '^#|^$' <file>** will display file content without comments or empty lines."
|
||||
|
||||
|
||||
|
||||
—Mars Toktonaliev
|
||||
|
||||
|
||||
|
||||
"For me, if I'm in a terminal text editor and I want to make it go away so I can quickly do something else, I background it with **Ctrl + Z**, do whatever I need to do, and then bring it back with **fg**. I will also sometimes do the same thing with **top** or **htop.** I can background it, and bring it back anytime I want to check current performance. I don't see backgrounding and foregrounding done in the wild very often, and it can really enhance multitasking on the terminal."
|
||||
|
||||
—Jay LaCroix
|
||||
|
||||
|
||||
|
||||
"Because I tend to do much of the same things at the terminal on a given day, two things are constants in my day:
|
||||
|
||||
* **Ctrl + R** to reverse search my Bash history for a command that I have already run and wish to do so again
|
||||
* Caret substitution is the best as I often do things like **sudo dnf** **search <package name>** then if I find a suitable package that way I then do **^search^install** to rerun the command replacing the search with install.
|
||||
|
||||
|
||||
|
||||
Sure these things are basic but so time-saving for me."
|
||||
|
||||
—Steve Morris
|
||||
|
||||
|
||||
|
||||
"My cool terminal trick isn't something I do in the terminal, but _which terminal_ I use. Sometimes I just want the feeling of using an Apple II, or an old amber-on-black terminal. That's when I fire up Cool Retro Term. Screenshots are on the [website][2]."
|
||||
|
||||
—Jim Hall
|
||||
|
||||
|
||||
|
||||
"Probably **ssh -X** to run graphical programs on other machines. Copy/pasting (on some terminal emulators, like gnome-terminal) C-S c and C-S v. I'm not sure if this counts (as it goes graphical in the interesting part, but starts with **ssh**). Most recently I had a need to log in to another machine but have my kids be able to follow along on the bigger screen from my laptop. This [link][3] showed me something I'd never before seen: mirroring the active session from another computer screen on my laptop over the local network (x11vnc -desktop) and being able to control it from both machines at the same time."
|
||||
|
||||
—Kyle R. Conway
|
||||
|
||||
|
||||
|
||||
"You can install **Install 'sl' $ sudo apt install sl** or **$ sudo dnf install sl**, and when the command **sl** is entered at the Bash prompt a text-based steam locomotive moves across the display."
|
||||
|
||||
—Don Watkins
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/1/linux-terminal-trick
|
||||
|
||||
作者:[Opensource.com][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/admin
|
||||
[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://github.com/Swordfish90/cool-retro-term
|
||||
[3]: https://elinux.org/Screen_Casting_on_a_Raspberry_Pi
|
||||
@@ -0,0 +1,71 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Morisun029)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (4 ways to volunteer this holiday season)
|
||||
[#]: via: (https://opensource.com/article/19/12/ways-volunteer)
|
||||
[#]: author: (John Jones https://opensource.com/users/johnjones4)
|
||||
|
||||
假期志愿服务的4种方式
|
||||
======
|
||||
想要洒播些节日的快乐吗?为开源组织做贡献,帮助有需要的社区。
|
||||
![Gift box opens with colors coming out][1]
|
||||
|
||||
|
||||
当领导者们配置人员和资源以做出积极改变时,就会产生社会影响。但是,许多社会努力都缺乏能够为这些改变者提供服务的技术资源。然而,有些组织通过将想要做出改变的开发人员与迫切需要更好技术的社区和非营利组织联系起来,来促进技术进步。这些组织通常为特定的受众提供服务,并招募特定种类的技术人员,它们有一个共同点:开源。
|
||||
|
||||
作为开发人员,我们出于各种原因试图加入开源社区。有些是为了专业发展,有些是为了能够与广阔的网络上令人印象深刻的技术人员合作,还有其他人则是因为他们清楚自己的贡献对于项目的成功的必要性。为什么不将你作为开发人员的才华投入到需要它的地方,而同时又为开源组织做贡献呢?以下组织是实现此目标的一些主要事例。
|
||||
|
||||
|
||||
|
||||
### Code for America
|
||||
|
||||
Code for America 是在数字时代,政府如何依靠人民为人民服务的一个例子。通过其Brigade Network,该组织在美国各个城市中组织了一个由志愿程序员,数据科学家,相关公民和设计师组成的全国联盟。这些本地分支机构定期举行聚会,向社区开放。这样既可以向小组推出新项目,又可以协调正在进行的工作。为了使志愿者与项目相匹配,各网站经常列出项目所需的特定技能,例如数据分析,内容创建和JavaScript。同时,Brigade网站也会关注当地问题,分享自然灾害等共同经验,这些都可以促进成员之间的合作。例如,新奥尔良,休斯敦和坦帕湾团队合作开发了一个飓风响应网站,当灾难发生时,该网站可以快速响应不同的城市灾难情况。
|
||||
|
||||
想要加入该组织,请访问 [网站][2] 获取70 多个 Brigade 的清单,以及个人加入组织的指南。
|
||||
|
||||
### Code for Change
|
||||
|
||||
Code for Change 显示了即使在高中时期,也可以为社会做贡献。印第安纳波利斯的一群高中编码员成立了自己的俱乐部,他们通过创建针对社区问题的开源软件解决方案来回馈当地组织。 Code for Change 鼓励当地组织提出项目构想,学生团体加入并开发完全免费和开源的解决方案。该小组已经开发了诸如“蓝宝石”之类的项目,该项目优化了当地难民组织的志愿者管理系统,并建立了民权委员会的投诉表格,方便公民就他们所关心的问题在网上发表意见。
|
||||
|
||||
有关如何在你自己的社区中创建 Code for Change,[访问他们的网站][3].
|
||||
|
||||
### Python for Good/Ruby for Good
|
||||
|
||||
Python for Good and Ruby for Good 是在俄勒冈州波特兰市和弗吉尼亚州费尔法克斯市举办的双年展活动,该活动将人们聚集在一起,为各自的社区开发和制定解决方案。
|
||||
|
||||
在周末,人们聚在一起聆听当地非营利组织的建议,并通过构建开源解决方案来解决他们的问题。 2017年,Ruby For Good参与者创建了“ Justice for Juniors”,该计划指导当前和以前被监禁的年轻人,并将他们重新融入社区。参与者还创建了“ Diaperbase”,这是一种库存管理系统,已被美国各地的尿布银行使用。这些活动的主要目标之一是将看似不同的行业和思维方式的组织和个人聚集在一起,以谋求共同利益。公司可以赞助活动,非营利组织可以提交项目构想,各种技能的人都可以注册参加活动并做出贡献。通过两岸(美国大西洋和太平洋东西海岸)的努力,Ruby for Good 和Python for Good 一直恪守“使世界变得更好”的座右铭。
|
||||
|
||||
[Ruby for Good][4] 在夏天举行,举办地点在弗吉尼亚州费尔法克斯的乔治•梅森(George Mason)大学。
|
||||
|
||||
### Social Coder
|
||||
|
||||
英国的Ed Guiness创建了Social Coder,将志愿者和慈善机构召集在一起,为六大洲的非营利组织创建和使用开源项目。 Social Coder积极招募来自世界各地的熟练IT志愿者,并将其与通过Social Coder注册的慈善机构和非营利组织进行匹配。项目范围从简单的网站更新到整个移动应用程序的开发。
|
||||
|
||||
例如,PHASE Worldwide 是一个在尼泊尔支持工作的小型非政府组织,因为Social Coder,它获得了利用开源技术的关键支持和专业知识。
|
||||
|
||||
有许多慈善机构已经与英国的Social Coder进行了合作,也欢迎其它国家的组织加入。通过他们的网站,个人可以注册为社会软件项目工作,找到寻求帮助的组织和慈善机构。
|
||||
|
||||
|
||||
对 Social Coder 的志愿服务感兴趣的个人可以 [在此][5]注册.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/12/ways-volunteer
|
||||
|
||||
作者:[John Jones][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[Morisun029](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/johnjones4
|
||||
[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://brigade.codeforamerica.org/
|
||||
[3]: http://codeforchange.herokuapp.com/
|
||||
[4]: https://rubyforgood.org/
|
||||
[5]: https://socialcoder.org/Home/Programmer
|
||||
@@ -0,0 +1,105 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Organize and sync your calendar with khal and vdirsyncer)
|
||||
[#]: via: (https://opensource.com/article/20/1/open-source-calendar)
|
||||
[#]: author: (Kevin Sonney https://opensource.com/users/ksonney)
|
||||
|
||||
使用 khal 和 vdirsyncer 组织和同步你的日历
|
||||
======
|
||||
保存和共享日历可能会有点麻烦。在我们的 20 个使用开源提升生产力的系列的第五篇文章中了解如何让它更简单。
|
||||
![Calendar close up snapshot][1]
|
||||
|
||||
去年,我在 19 天里给你介绍了 19 个新(对你而言)的生产力工具。今年,我换了一种方式:使用你在使用或者还没使用的工具,构建一个使你可以在新一年更加高效的环境。
|
||||
|
||||
### 使用 khal 和 vdirsyncer 跟踪你的日程
|
||||
|
||||
处理日历很_麻烦_,要找到好的工具总是很困难的。但是自从我去年将日历列为[我的“失败“之一][2]以来,我已经取得了一些进步。
|
||||
|
||||
目前使用日历最困难的是一直需要以某种方式在线共享。两种最受欢迎的在线日历是 Google Calendar 和 Microsoft Outlook/Exchange。两者都在公司环境中大量使用,这意味着我的日历必须支持其中之一或者两个。
|
||||
|
||||
![khal calendar][3]
|
||||
|
||||
[Khal][4] 是基于控制台的日历,可以读取和写入 VCalendar 文件。它配置相当容易,但是不支持与其他应用同步。
|
||||
|
||||
幸运的是,khal 能与 [vdirsyncer][5] 一起使用,它是一个漂亮的命令行程序,可以将在线日历(和联系人,我将在另一篇文章中讨论)同步到本地磁盘。是的,它还可以上传新事件。
|
||||
|
||||
![vdirsyncer][6]
|
||||
|
||||
Vdirsyncer 是个 Python 3 程序,可以通过软件包管理器或 pip 安装。它可以同步 CalDAV、VCalendar/iCalendar、Google Calendar 和目录中的本地文件。由于我使用 Google Calendar,尽管这不是最简单的设置,我也将以它为例。
|
||||
|
||||
在 vdirsyncer 中设置 Google Calendar 是[有文档参考的][7],所以这里我不再赘述。重要的是确保同步对设置将 Google Calendar 设置为冲突解决的”赢家“。也就是说,如果同一事件有两个更新,那么需要知道哪个更新优先。类似这样做:
|
||||
|
||||
|
||||
```
|
||||
[general]
|
||||
status_path = "~/.calendars/status"
|
||||
|
||||
[pair personal_sync]
|
||||
a = "personal"
|
||||
b = "personallocal"
|
||||
collections = ["from a", "from b"]
|
||||
conflict_resolution = "a wins"
|
||||
metadata = ["color"]
|
||||
|
||||
[storage personal]
|
||||
type = "google_calendar"
|
||||
token_file = "~/.vdirsyncer/google_calendar_token"
|
||||
client_id = "google_client_id"
|
||||
client_secret = "google_client_secret"
|
||||
|
||||
[storage personallocal]
|
||||
type = "filesystem"
|
||||
path = "~/.calendars/Personal"
|
||||
fileext = ".ics"
|
||||
```
|
||||
|
||||
在第一次 vdirsyncer 同步之后,你将在存储路径中看到一系列目录。每个文件夹都将包含多个文件,日历中的每个事件都是一个文件。下一步是导入 khal。首先运行 **khal configure** 进行初始设置。
|
||||
|
||||
![Configuring khal][8]
|
||||
|
||||
现在,运行 **khal interactive** 将显示本文开头的界面。输入 **n** 将打开“新事件”对话框。这里要注意的一件事:日历的名称与 vdirsyncer 创建的目录匹配,但是你可以更改 khal 配置文件来指定更清晰的名称。根据条目所在的日历向条目添加颜色还可以帮助你确定日历内容:
|
||||
|
||||
|
||||
```
|
||||
[calendars]
|
||||
[[personal]]
|
||||
path = ~/.calendars/Personal/kevin@sonney.com/
|
||||
color = light magenta
|
||||
[[holidays]]
|
||||
path = ~/.calendars/Personal/cln2stbjc4hmgrrcd5i62ua0ctp6utbg5pr2sor1dhimsp31e8n6errfctm6abj3dtmg@virtual/
|
||||
color = light blue
|
||||
[[birthdays]]
|
||||
path = ~/.calendars/Personal/c5i68sj5edpm4rrfdchm6rreehgm6t3j81jn4rrle0n7cbj3c5m6arj4c5p2sprfdtjmop9ecdnmq@virtual/
|
||||
color = brown
|
||||
```
|
||||
|
||||
现在,当你运行 **khal interactive** 时,每个日历将被着色以区别于其他日历,并且当你添加新条目时,它将有更具描述性的名称。
|
||||
|
||||
![Adding a new calendar entry][9]
|
||||
|
||||
设置有些麻烦,但是完成后,khal 和 vdirsyncer 可以一起为你提供一种简便的方法来管理日历事件并使它们与你的在线服务保持同步。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/1/open-source-calendar
|
||||
|
||||
作者:[Kevin Sonney][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://opensource.com/users/ksonney
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/calendar.jpg?itok=jEKbhvDT (Calendar close up snapshot)
|
||||
[2]: https://opensource.com/article/19/1/productivity-tool-wish-list
|
||||
[3]: https://opensource.com/sites/default/files/uploads/productivity_5-1.png (khal calendar)
|
||||
[4]: https://khal.readthedocs.io/en/v0.9.2/index.html
|
||||
[5]: https://github.com/pimutils/vdirsyncer
|
||||
[6]: https://opensource.com/sites/default/files/uploads/productivity_5-2.png (vdirsyncer)
|
||||
[7]: https://vdirsyncer.pimutils.org/en/stable/config.html#google
|
||||
[8]: https://opensource.com/sites/default/files/uploads/productivity_5-3.png (Configuring khal)
|
||||
Reference in New Issue
Block a user