From e20e0e56b7c613244e17c7c58e5e544a0542bec1 Mon Sep 17 00:00:00 2001 From: Rohan Talip Date: Fri, 1 Mar 2019 01:30:54 -0800 Subject: [PATCH] Made some grammar and block indentation changes --- README.rst | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README.rst b/README.rst index 6039f1b..04978d2 100644 --- a/README.rst +++ b/README.rst @@ -2,35 +2,35 @@ xUnique ======= *xUnique*, is a pure Python script to regenerate ``project.pbxproj``, -a.k.a the Xcode project file, and make it unique and same on any +a.k.a the Xcode project file, and make it unique and the same on any machine. As you may know, the UUID generated by Xcode (a.k.a `rfc4122 `__) in the file is not -unique for the same added file( or other entries like groups,build -phases,etc.) on different machines, which makes it a developer's +unique for the same added file (or other entries like groups, build +phases, etc.) on different machines, which makes it a developer's nightmare to merge and resolve conflicts in ``project.pbxproj``. -*xUnique* convert all the 96bits ``UUID``\ (24 alphanumeric chars) to -MD5 hex digest(32 hex chars), and Xcode do recognize these MD5 digests. +*xUnique* converts all the 96bits ``UUID`` (24 alphanumeric chars) to +MD5 hex digest (32 hex chars); Xcode recognizes these MD5 digests. What it does & How it works --------------------------- -#. convert ``project.pbxproj`` to JSON format +#. Convert ``project.pbxproj`` to JSON format #. Iterate all ``objects`` in JSON and give every UUID an absolute path, and create a new UUID using MD5 hex digest of the path - - All elements in this json object is actually connected as a tree + - All elements in this JSON object are actually connected as a tree. - We give a path attribute to every node of the tree using its - unique attribute; this path is the absolute path to the root node, - - Apply MD5 hex digest to the path for the node + unique attribute; this path is the absolute path to the root node. + - Apply MD5 hex digest to the path for the node. #. Replace all old UUIDs with the MD5 hex digest and also remove unused - UUIDs that are not in the current node tree and UUIDs in wrong format -#. Sort the project file inlcuding ``children``, ``files``, + UUIDs that are not in the current node tree and any UUIDs with the wrong format. +#. Sort the project file including ``children``, ``files``, ``PBXFileReference`` and ``PBXBuildFile`` list and remove all - duplicated entries in these lists + duplicated entries in these lists. - see ``sort_pbxproj`` method in xUnique.py if you want to know the implementation; @@ -161,11 +161,11 @@ Use options in xUnique: $ xunique [options] "path_to/YourProject.xcodeproj/or_project.pbxproj" --v print verbose output, and generate ``debug_result.json`` file for debug. --u uniquify project file, that is, replace UUID to MD5 digest. --s sort project file including ``children``, ``files``, ``PBXFileReference`` and ``PBXBuildFile`` list and remove all duplicated entries in these lists. Supports both original and uniquified project file. --p sort ``PBXFileReference`` and ``PBXBuildFile`` sections in project file ordered by file names. Only works with ``-s``. Before v4.0.0, this was hard-coded in ``-s`` option and cannot be turned off. Starting from v4.0.0, without this option along with ``-s``, xUnique will sort these two types by MD5 digests, the same as Xcode does. --c When project file was modified, xUnique quit with non-zero status. Without this option, the status code would be zero if so. This option is usually used in Git hook to submit xUnique result combined with your original new commit. + -v print verbose output, and generate ``debug_result.json`` file for debug. + -u uniquify project file, that is, replace UUID to MD5 digest. + -s sort project file including ``children``, ``files``, ``PBXFileReference`` and ``PBXBuildFile`` list and remove all duplicated entries in these lists. Supports both original and uniquified project file. + -p sort ``PBXFileReference`` and ``PBXBuildFile`` sections in project file ordered by file names. Only works with ``-s``. Before v4.0.0, this was hard-coded in ``-s`` option and cannot be turned off. Starting from v4.0.0, without this option along with ``-s``, xUnique will sort these two types by MD5 digests, the same as Xcode does. + -c When project file was modified, xUnique quit with non-zero status. Without this option, the status code would be zero if so. This option is usually used in Git hook to submit xUnique result combined with your original new commit. **Note**: If neither ``-u`` nor ``-s`` exists, ``-u -s`` will be appended to existing option list.