Since you do need to reformat each text block type differently to produce the correct HTML output, a state machine seems like a natural solution.
由于需要以不同方式重新格式化每个文本块以生成正确的HTML输出,状态机似乎就是自然的解决方案。
This will be used to select the news summary information to output, and then output the appropriate block of text to be spoken.
这用来选择要输出的新闻摘要信息,然后输出适当的要进行朗读的文本块。
Using the subshell, you can collectively redirect their standard and error output for the entire block instead of for each individual command.
通过使用子外壳,可以对整个块(而不是单个命令)的标准和错误输出进行集体重定向。
应用推荐