8000 `lib\str\format.ttl` の有効活用 · Issue #18 · guskma/teracotta · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lib\str\format.ttl の有効活用 #18

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

Open
guskma opened this issue Nov 13, 2019 · 1 comment
Open

lib\str\format.ttl の有効活用 #18

guskma opened this issue Nov 13, 2019 · 1 comment

Comments

@guskma
Copy link
Owner
guskma commented Nov 13, 2019

#15 で追加した lib\str\format.ttl を何に使おうか全くアイデアなしだったんだけど、例えばログファイルのフォーマットとかを config.ini の中で

[log]
logfilepath=log\{type}
logfilename={sysname}_{scenario}_{now}.txt

とか書いておいて、 format.ttl に渡して整形してやったらインベントリの列を一つ減らせそうだなぁ。とふと気づいた。

ログの格納以外にも案外使いみちがありそうなので、アイデアをここにまとめながら機能追加していく。

@guskma
Copy link
Owner Author
guskma commented Nov 13, 2019

ログファイルを作成する上で例えば switch_cisco-ios_20191113_01.txt みたいな連番ファイルを作成したい時にゼロ埋めをしたくなることが出てきそうなので、 format.ttl を拡張してオプションを付けられるようにしたい。

例: {i:03} …ゼロ埋めで3桁フォーマット( 1001 となる)

色々有効活用できそう

例えば

{ifname: 20F} | {ipaddress: 15F} | {subnetmask: 15F} | {description}

とした場合

GigabitEthernet0/1   | 192.168.0.1     | 255.255.255.0   | ## To WAN ##

みたいな表が作れそう

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

1 participant
0