wordpress 搬家 子页面无法访问天津seo推广
YAML
YAML(YAML Ain’t Markup Language)是一种人类可读的数据序列化格式,常用于配置文件、数据交换和存储结构化数据。YAML 的设计目标是简洁、易读,并且能够表示复杂的数据结构。
YAML 文件的基本语法
-  
基本结构:
- YAML 使用缩进来表示层级关系,通常使用空格(而不是制表符)进行缩进。
 - 每个层级的缩进通常为两个空格。
 
 -  
键值对:
- 使用冒号(
:)分隔键和值。 
name: John Doe age: 30 - 使用冒号(
 -  
列表:
- 使用短横线(
-)表示列表项。 
fruits:- apple- banana- orange - 使用短横线(
 -  
字典:
- 字典可以嵌套,表示复杂的数据结构。
 
person:name: John Doeage: 30address:street: 123 Main Stcity: Anytown -  
注释:
- 使用井号(
#)表示注释,注释内容会被忽略。 
# 这是一个注释 name: John Doe # 这是另一个注释 - 使用井号(
 -  
多行字符串:
- 使用 
|表示保留换行的多行字符串。 
description: |This is a multi-line string.It preserves line breaks.- 使用 
>表示折叠的多行字符串,换行会被转换为空格。 
description: >This is a folded multi-line string.It will be a single line. - 使用 
 -  
布尔值和空值:
- 布尔值可以用 
true、false表示。 - 空值可以用 
null或~表示。 
is_active: true middle_name: null last_name: ~ - 布尔值可以用 
 
示例 YAML 文件
以下是一个包含多种数据结构的示例 YAML 文件:
version: 1.0
services:web:image: nginxports:- "80:80"database:image: postgresenvironment:POSTGRES_USER: userPOSTGRES_PASSWORD: password
 
YAML 文件因其简洁和可读性,广泛应用于配置文件(如 Docker Compose、Kubernetes 配置等)和数据交换场景。\
repos语法
repositories:为所有repos文件默认的开头- 每个需要下载的仓库的描述:
target path for local save;
type:git/Subversion/…
url:storage pull website
version:branch/tag/commit id 
use vcs to simplify project management pipeline
vcs=封装过的git,简化了拉取和导出的流程
wget https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos
mkdir src
vcs import src < ros2.repos
vcs validate --input ros2.repos
 
Results:
...
Found git repository 'https://github.com/ros2/tinyxml2_vendor.git' with branch 'rolling'
=== ros2/tlsf (git) ===
Found git repository 'https://github.com/ros2/tlsf.git' with branch 'rolling'
=== ros2/unique_identifier_msgs (git) ===
Found git repository 'https://github.com/ros2/unique_identifier_msgs.git' with branch 'rolling'
=== ros2/urdf (git) ===
Found git repository 'https://github.com/ros2/urdf.git' with branch 'rolling'
=== ros2/yaml_cpp_vendor (git) ===
Found git repository 'https://github.com/ros2/yaml_cpp_vendor.git' with branch 'rolling'
 
查看状态vcs status
.........................................................................................................
=== src/ament/ament_cmake (git) ===
位于分支 rolling
您的分支与上游分支 'origin/rolling' 一致。无文件要提交,干净的工作区
=== src/ament/ament_index (git) ===
位于分支 rolling
您的分支与上游分支 'origin/rolling' 一致。
 
colcon
查阅
- 查看软件包的信息
 
colcon info --base-paths src/ros2/rcl/rcl_lifecycle
 

- 只列举包名
 
 colcon list -n --base-paths src/ros2/rcl
 

colcon list -t --base-paths src/ros2/rcl
 

