Skip to content

Commit 7cf0693

Browse files
committed
updated readme and help texts
1 parent bde5a16 commit 7cf0693

File tree

2 files changed

+28
-17
lines changed

2 files changed

+28
-17
lines changed

README.md

+14-3
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,24 @@ You can also add the `--value` option to show just the value in the output (migh
5858

5959
## plist2profile
6060

61-
This tool is a modern re-interpretation of [Tim Sutton's mcxToProfile](https://github.com/timsutton/mcxToProfile).
61+
This tool is a re-interpretation in Swift of [Tim Sutton's mcxToProfile](https://github.com/timsutton/mcxToProfile).
6262

6363
It will convert a normal flat plist file into a custom mobileconfig/configuration profile that can be used for manual installation or with an MDM server.
6464

65-
In the simplest form, you use it like this:
65+
In the simplest form, use it like this:
6666

6767
```
68-
% plist2profile --plist settings.plist --identifier com.example.settings
68+
% plist2profile --identifier example.settings com.example.settings.plist
6969
```
7070

71+
This will generate a file named `example.settings.mobileconfig` in the current working directory which manages the preference keys in the `com.example.settings.plist` in the `com.example.settings` preference domain. You can add multiple plist files.
72+
73+
The preference domain for the settings is determined from the file name of each plist file given (removing the `plist` file extension).
74+
75+
You can add a display and organization name that will be used in the respective fields using the `--displayname` and `--organization` options.
76+
77+
By default, the profile is created with a `System` scope. you can change it to `User` with the `--user` flag.
78+
79+
There are two ways to assemble custom preference profile, the 'traditional' mcx format and a more modern format, which [Bob Gendler described in this post](https://boberito.medium.com/config-profile-and-manage-all-the-things-just-about-cafea8627d4b). This tool creates the modern format by default, but can also create the traditional format when you set the `--mcx` key.
80+
81+

Sources/plist2profile/Plist2Profile.swift

+14-14
Original file line numberDiff line numberDiff line change
@@ -17,51 +17,51 @@ struct Plist2Profile: ParsableCommand {
1717
version: "0.1"
1818
)
1919

20-
// MARK: arguments,options, flags
20+
// MARK: arguments, options, flags
2121
@Option(
2222
name: .shortAndLong,
2323
help: ArgumentHelp(
24-
"the identifier for the profile",
24+
"The identifier for the profile.",
2525
valueName: "identifier"
2626
)
2727
)
2828
var identifier: String
2929

3030
@Argument(
3131
help: ArgumentHelp(
32-
"Path to a plist to be added as a profile payload. Can be specified multiple times.",
32+
"Path to a plist file to be added as a profile payload. Can be given more than once.",
3333
valueName: "plist"
3434
)
3535
)
3636
var plistPaths: [String]
3737

38+
@Option(
39+
name: [.customShort("d"), .customLong("displayname")],
40+
help: "Display name for the profile. (default: 'plist2profile: <identifier>')"
41+
)
42+
var displayName = ""
43+
3844
@Option(
3945
name: [.customShort("g"), .customLong("organization")],
40-
help: "Cosmetic name for the organization deploying the profile."
46+
help: "Organization field for the profile."
4147
)
4248
var organization = ""
4349

4450
@Option(
4551
name: [.customShort("o"), .customLong("output")],
46-
help: "Output path for profile. Defaults to 'identifier.mobileconfig' in the current working directory."
52+
help: "Output path for profile. (default: '<identifier>.mobileconfig')"
4753
)
4854
var outputPath = ""
4955

50-
@Option(
51-
name: [.customShort("d"), .customLong("displayname")],
52-
help: "Display name for profile. Defaults to 'plist2profile: <first domain>'."
53-
)
54-
var displayName = ""
55-
5656
@Flag(
5757
name: .customLong("user"),
58-
help: "sets the scope for the profile to 'User' (otherwise scope is 'System')"
58+
help: "Sets the scope for the profile to 'User'. (default is 'System')"
5959
)
6060
var userScope = false
6161

6262
@Flag(
6363
name: .customLong("mcx"),
64-
help: "creates the profile in macx format (default: modern)"
64+
help: "Creates the profile in the traditional mcx format. (default: modern)"
6565
)
6666
var mcx = false
6767

@@ -111,7 +111,7 @@ struct Plist2Profile: ParsableCommand {
111111

112112
// if output is empty, generate file name
113113
if outputPath.isEmpty {
114-
outputPath = identifier.appending(".mobileConfig")
114+
outputPath = identifier.appending(".mobileconfig")
115115
}
116116

117117
if userScope {

0 commit comments

Comments
 (0)