Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望新增${now} 或者 ${time}的解析 #581

Open
kermitliu1 opened this issue Jun 20, 2023 · 3 comments
Open

希望新增${now} 或者 ${time}的解析 #581

kermitliu1 opened this issue Jun 20, 2023 · 3 comments

Comments

@kermitliu1
Copy link

目前 fileheader.customMade 的配置中,只解析了${now_year}。能否新增${now} 或者 {time}来替换为当前时间呢?因为在大多数自定义key中的value会使用时间。eg:下图为自定义模板生成的头注释,其中${now}无法没被解析替换。其实可以在changeTplValue 多解析个占位符。

"fileheader.customMade": {
"custom_string_obkoro1": "this_is_name ${now}",
"custom_string_obkoro1_copyright": "Copyright (c) ${now_year} by Txxx, All Rights Reserved. "
}
//
// this_is_name ${now}
// Copyright (c) 2023 by Txxx, All Rights Reserved.
//
@firerainky
Copy link

我也想要这个,找了一圈没找到,很不方便

@fingercoder
Copy link

求求了,作者有空加上吧,小星星点上了

@lihaogm
Copy link

lihaogm commented Feb 27, 2024

希望加一个 ${create_year} 来表示文件创建的年份,因为有的版权是某一年到某一年的形式。

/*
 * Copyright (c) xxx Technologies Co., Ltd. 2022-2024. All rights reserved.
 */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants