51

GitHub - cats-oss/AcknowledgementsPlist: AcknowledgementsPlist manages the licen...

 5 years ago
source link: https://github.com/cats-oss/AcknowledgementsPlist
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

What's AcknowledgementsPlist

AcknowledgementsPlist that combines licenses of Carthage, CocoaPods, and Manual Plist into Bundle and Plist.
I implement it so that it will be completed locally!

Swift Cocoapods Build Status License

plist.png bundle_1.png bundle_2.png

Requirements

  • Xcode 10
  • Swift 4.2

How to install

CocoaPods

pod 'AcknowledgementsPlist'

Executable binary from releases

Please use executable binary freely in each project!

How to use AcknowledgementsPlist

See Sample, for more details.
It is recommended to make it like make-acknowledgements-plist.sh.
I think that you can execute it after Pods or Carthage is updated.

Usage

./AcknowledgementsPlist [PROJECT_ROOT_PATH] [OUTPUT_PATH] [OPTIONS]

e.g. ./AcknowledgementsPlist . ./Sample-Acknowledgements.plist --manual-plist-path ./ManualAcknowledgements.plist

[PROJECT_ROOT_PATH]

  • Required?
  • Please specify the project root path as seen from the directory to be executed!

[OUTPUT_PATH]

  • Required?
  • Please specify the file name of ./~/foo.plist and the bundle file name of ./~/bar.bundle that starting from project root!

[OPTIONS]

--pods-path

  • You can specify a Pods file path. The default is to search automatically.

--carthage-checkouts-path

  • You can specify a Checkouts file path. The default is to search automatically.

--manual-plist-path

  • You can add and include licenses manually to plist.
  • The configuration of plist.↓
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>PreferenceSpecifiers</key>
    <array>
        <dict>
            <key>FooterText</key>
            <string>Legal Text</string>
            <key>Title</key>
            <string>Library Name</string>
        </dict>
        <dict>
            <key>FooterText</key>
            <string>Legal Text</string>
            <key>Title</key>
            <string>Library Name</string>
        </dict>
    </array>
</dict>
</plist>

Make Plist

  1. Check if Pods and b Carthage/Checkouts exist.
    If Carthage/Checkouts does not exist, execute the command of carthage checkout.

  2. Determine the location of the AcknowledgementsPlist and the output location of Plist.
    e.g. ./AcknowledgementsPlist . ./Sample/Resources/Sample-Acknowledgements.plist

Make Bundle

  1. Please do 1. of Make Plist.

  2. Make bundle and change Root.plist to the following configuration.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>PreferenceSpecifiers</key>
        <array>
            <dict>
                <key>Type</key>
                <string>PSChildPaneSpecifier</string>
                <key>Title</key>
                <string>Licenses</string>
                <key>File</key>
                <string>AcknowledgementLinks</string>
            </dict>
        </array>
        <key>StringsTable</key>
        <string>Root</string>
    </dict>
</plist>
  1. Determine the location of the AcknowledgementsPlist and the output location of Bundle.
    e.g. ./AcknowledgementsPlist . ./Sample/Resources/Settings.bundle

LICENSE

Under the MIT license. See LICENSE file for details.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK