You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/user/customize_reports.rst
+54-80
Original file line number
Diff line number
Diff line change
@@ -16,81 +16,60 @@ Tailor the user interface elements of your exported PDF reports. You have the fl
16
16
.. seealso::
17
17
Configuring the date format is done at runtime by using the ``--date-format`` option. See :ref:`date format <date-format>` for more information.
18
18
19
-
.. _property_list_file:
20
19
21
-
Setup
22
-
=====
20
+
Customizable User Interface Elements
21
+
------------------------------------
23
22
24
-
When you first launch Patcher, a :ref:`setup assistant <setup>` will automatically create the necessary ``com.liquidzoo.patcher.plist`` file in the user's Library Application Support directory, located at ``$HOME/Library/Application Support/Patcher``. Once setup is completed successfully, the ``first_run_done`` key in the property list file will automatically be set to ``True``:
23
+
Patcher allow syou to personalize the appearance of your reports using settings stored in the project's property list file. For full details on modifying the property list, see :ref:`Property List Configuration <property_list_file>`.
24
+
25
+
Editing the Header & Footer Text
26
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
+
28
+
The header and footer text displayed in exported reports can be adjusted. These settings are stored in the ``com.liquidzoo.patcher.plist`` file under the ``UserInterfaceSettings`` dictionary.
25
29
26
30
.. code-block:: xml
27
31
28
32
<?xml version="1.0" encoding="UTF-8"?>
29
33
<!DOCTYPEplist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
30
34
<plistversion="1.0">
31
35
<dict>
32
-
<key>Setup</key>
36
+
<key>UserInterfaceSettings</key>
33
37
<dict>
34
-
<key>first_run_done</key>
35
-
<true/>
38
+
<key>header_text</key>
39
+
<string>AnyOrg Patch Report</string>
40
+
<key>footer_text</key>
41
+
<string>Made with <3 from IT</string>
36
42
</dict>
37
43
</dict>
38
44
</plist>
39
45
40
-
.. admonition:: Warning
41
-
:class: warning
42
-
43
-
**Do not modify** the ``first_run_done`` key in the ``Setup`` dictionary directly. Altering this key may cause Patcher to re-run the setup process. If you need to reset the initial setup state, use the ``--reset`` command instead. For more information, see :ref:`resetting Patcher <resetting_patcher>`.
44
-
45
-
.. _modify_plist:
46
-
47
-
Modifying the Property List File
48
-
================================
49
-
50
-
The property list file contains the settings that control the appearance of the PDF reports. You can edit these values using ``/usr/libexec/PlistBuddy`` or a code editor of your choice (VSCode, BBEdit, CodeRunner, etc.).
51
-
52
-
.. admonition:: Opening Property Lists in Xcode
53
-
:class: tip
54
-
55
-
If the plist file appears as a binary file when opened in VSCode or other editors, you can open it in **Xcode** instead. Xcode is available as a free download from the Mac App Store and fully supports editing plist files. This will prevent issues with binary formatting that some editors may encounter.
56
-
57
-
Using ``jappleseed`` as an example, the path to the property list file would be:
Why not use ``defaults`` to edit the property list file? Unfortunately, the ``defaults`` binary in macOS lacks the ability to update keys nested within dictionaries. ``PlistBuddy`` is much better equipped to handle property lists with nested elements.
66
-
67
-
To modify the header and footer text using PlistBuddy, use the following commands:
You can specify a custom font to match your organization's branding. The font settings, including font name and paths to font files are stored in the property list.
90
51
91
52
.. important::
92
53
The default font used in testing is `Google's Assistant Font <https://fonts.google.com/specimen/Assistant>`_. While you can specify a different font to match your organization's branding, be aware that doing so may cause formatting or alignment issues in the exported PDF reports. It is recommended to test the PDF export functionality thoroughly after changing the font to ensure the new font does not adversely affect the document's appearance.
93
54
55
+
.. code-block:: xml
56
+
57
+
<?xml version="1.0" encoding="UTF-8"?>
58
+
<!DOCTYPEplist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
Patcher now allows you to include a company logo in your exported PDF reports. This can be helpful for ensuring unified branding for reports.
81
+
Patcher allows you to include a company logo in your exported PDF reports. This can be helpful for ensuring unified branding for reports.
103
82
104
83
Supported Logo Requirements
105
84
^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -135,17 +114,17 @@ Via ``reset``:
135
114
$ Enter the path to the logo file: /path/to/logo.png
136
115
137
116
4. Patcher will validate the image file. If valid, it will copy the logo to the ``Application Support`` directory: ``$HOME/Library/Application Support/Patcher/logo.png``
138
-
5. The logo path is then saved to the ``com.liquidzoo.patcher.plist`` file under the ``UI`` dictionary:
117
+
5. The logo path is then saved to the ``com.liquidzoo.patcher.plist`` file under the ``UserInterface`` dictionary:
Open the property list file in Xcode or use ``PlistBuddy`` to modify the property list file. (See :ref:`Modifying the Property List File <modify_plist>` above). For demonstration purposes, ``PlistBuddy`` will be used.
127
+
Open the property list file in Xcode or use ``PlistBuddy`` to modify the property list file. (See :ref:`Modifying the Property List File <modify_plist>`). For demonstration purposes, ``PlistBuddy`` will be used.
149
128
150
129
.. tip::
151
130
Absolute paths can be copied easily in macOS: Hold down the Option (⌥) symbol on the keyboard, right-click the logo file and select **Copy <filename> as Pathname**
@@ -155,40 +134,35 @@ Open the property list file in Xcode or use ``PlistBuddy`` to modify the propert
3. While it is not **required** to copy the logo file to Patcher's Application Support directory, it ensures the proper permissions are enabled to read the logo file.
161
140
162
-
Full Example Configuration
163
-
==========================
141
+
Example UI Settings Configuration
142
+
=================================
164
143
165
-
Here is an example configuration with custom header, footer text, and a specified font:
144
+
Here is an example configuration of **only** the ``UserInterfaceSettings`` dictionary with custom header, footer text, specified font, and custom logo:
166
145
167
146
.. code-block:: xml
168
147
169
148
<?xml version="1.0" encoding="UTF-8"?>
170
149
<!DOCTYPEplist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
0 commit comments