跳转到主要内容

Java .properties文件的命令行操作

项目描述

Project Status: Active - The project has reached a stable, usable state and is being actively developed. CI Status https://codecov.io/gh/jwodder/javaproperties-cli/branch/master/graph/badge.svg https://img.shields.io/pypi/pyversions/javaproperties-cli.svg MIT License

GitHub | PyPI | 文档 | 问题 | 变更日志

javaproperties-cli 是一个围绕 javaproperties 包的包装器(从中分离出来),提供用于基本命令行操作 .properties 文件的程序,包括获取、设置、删除值以及转换为JSON。

安装

javaproperties-cli 需要 Python 3.6 或更高版本。只需使用 Python 3 的 pip 安装 javaproperties-cli 及其依赖项即可

python3 -m pip install javaproperties-cli

快速入门

javaproperties get    <file> <key> ...

输出给定 .properties 文件中指定键的值

javaproperties select <file> <key> ...

输出给定 .properties 文件中给定键的键值对

javaproperties set    <file> <key> <value>

<file> 中的 <key> 设置为 <value> 并输出结果

javaproperties delete <file> <key> ...

输出删除给定键后的给定 .properties 文件

javaproperties format [<file>]

重新格式化给定 .properties 文件,删除注释和多余的空白,并按键排序

json2properties [<infile> [<outfile>]]

将 JSON 对象转换为 .properties 文件

properties2json [<infile> [<outfile>]]

.properties 文件转换为 JSON 对象

项目详情


下载文件

下载您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码发行版

javaproperties-cli-0.8.0.tar.gz (18.4 kB 查看散列值)

上传时间 源代码

构建发行版

javaproperties_cli-0.8.0-py3-none-any.whl (11.2 kB 查看散列值)

上传时间 Python 3

由以下机构支持

AWSAWS 云计算和安全赞助商 DatadogDatadog 监控 FastlyFastly CDN GoogleGoogle 下载分析 MicrosoftMicrosoft PSF赞助商 PingdomPingdom 监控 SentrySentry 错误日志 StatusPageStatusPage 状态页面