Skip to content

Commit

Permalink
scribe-org#405 add file header template directions to contributing + …
Browse files Browse the repository at this point in the history
…formatting
  • Loading branch information
andrewtavis authored and SaurabhJamadagni committed Apr 18, 2024
1 parent ff70ecd commit 37899db
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 29 deletions.
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ The Xcode debugger often doesn't work as expected for Scribe as the keyboards th
- When you get a window telling you to "choose an app to run", don't choose Scribe as you might expect, but instead scroll down and select Xcode Previews
- Occasionally you'll be met with just a black screen on startup, in which case you can press Home (or ⇧-⌘-H) and then go directly to Scribe or an app for keyboard testing

### Adding the file header template to Xcode

As [GPL v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html) licensed technology, Scribe is expected to include a license header in all files within the codebase. A template for this has been provided in the `ScribeTemplates` directory. You can have this header automatically added to the top of files by executing the following commands to add it to your Xcode templates:

```bash
mkdir ~/Library/Developer/Xcode/Templates
ln -s PATH_TO_LOCAL_SCRIBE_DIRECTORY/Scribe-iOS/ScribeTemplates ~/Library/Developer/Xcode/Templates/
```

<a id="issues-projects"></a>

# Issues and projects [``](#contents)
Expand Down
21 changes: 10 additions & 11 deletions ScribeTemplates/ScribeHeader.xctemplate/TemplateInfo.plist
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?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>Identifier</key>
<string>com.example.templates.mytemplate</string>
<key>Kind</key>
<string>Xcode.IDEKit.TextSubstitutionFileTemplateKind</string>
<key>Ancestors</key>
<array>
<string>com.apple.dt.unit-test-class</string>
</array>
</dict>
<dict>
<key>Identifier</key>
<string>com.example.templates.mytemplate</string>
<key>Kind</key>
<string>Xcode.IDEKit.TextSubstitutionFileTemplateKind</string>
<key>Ancestors</key>
<array>
<string>com.apple.dt.unit-test-class</string>
</array>
</dict>
</plist>

36 changes: 18 additions & 18 deletions ScribeTemplates/ScribeHeader.xctemplate/___FILEBASENAME___.swift
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/**
* [Describe what you want to do with your file here]
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* DESCRIPTION_OF_THE_PURPOSE_OF_THE_FILE
*
* Copyright (C) 2023 Scribe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

0 comments on commit 37899db

Please sign in to comment.