summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2019-04-28 01:42:16 +0200
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-04-28 01:42:16 +0200
commit53c51f1d16b40fdd3e68a6afc5844917d3d58640 (patch)
treeb17a8b084e538b66a6ccb4893e9c7fa75217c519 /docs
parentc3be0520c4c6d4799670ab3639a3de561b4c6c1d (diff)
downloadqmk_firmware-53c51f1d16b40fdd3e68a6afc5844917d3d58640.tar.gz
qmk_firmware-53c51f1d16b40fdd3e68a6afc5844917d3d58640.tar.xz
A better new_project.sh (#5191)
* A better new_project.sh * Fix docstrings * Use single quotes for anything not shown to user * Missed this docstring * Simplify get_git_username() Thanks @vomindoraan * chmod +x * Add docstring for print_error() * Break up git username call into multiple lines * Use with statement here * Conform to PEP 8 even more * Turn it back into a shell script * chmod +x again * Update docs to reflect new keyboard generator usage * Tweak wording slightly * Trim trailing whitespace * Don't actually need to escape the newlines here * As I suspected, you can pass shift a number * Prepend ./ to match the other code block * Minor syntax tweaks * The username token has changed * Replace name in the readme too * Make some reasonable assumptions about the presence of Git
Diffstat (limited to 'docs')
-rw-r--r--docs/hand_wire.md12
-rw-r--r--docs/hardware_avr.md28
-rw-r--r--docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md24
3 files changed, 44 insertions, 20 deletions
diff --git a/docs/hand_wire.md b/docs/hand_wire.md
index d2cba770e..25db9341b 100644
--- a/docs/hand_wire.md
+++ b/docs/hand_wire.md
@@ -198,15 +198,17 @@ From here, you should have a working keyboard once you program a firmware. Befor
To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free).
-The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder:
+The first thing we're going to do is create a new keyboard. In your terminal, run this command, which will ask you some questions and generate a basic keyboard project:
```
- util/new_project.sh <project_name>
+./util/new_keyboard.sh
```
You'll want to navigate to the `keyboards/<project_name>/` folder by typing, like the print-out from the script specifies:
- cd keyboards/<project_name>
+```
+cd keyboards/<project_name>
+```
### `config.h`
@@ -326,7 +328,7 @@ Carefully flip your keyboard over, open up a new text document, and try typing -
2. Check the solder joints on the diode - if the diode is loose, part of your row may register, while the other may not.
3. Check the solder joints on the columns - if your column wiring is loose, part or all of the column may not work.
4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides.
-5. Check the <project_name>.h file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable.
+5. Check the `<project_name>.h` file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable.
6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly.
If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end.
@@ -335,4 +337,4 @@ If you've done all of these things, keep in mind that sometimes you might have h
Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
-There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different project (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
+There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different keyboards (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md
index acf7088a3..7c28ab6db 100644
--- a/docs/hardware_avr.md
+++ b/docs/hardware_avr.md
@@ -6,14 +6,26 @@ If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_
## Adding Your AVR Keyboard to QMK
-QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started run the `util/new_project.sh` script:
-
-```bash
-$ util/new_project.sh my_awesome_keyboard
-######################################################
-# /keyboards/my_awesome_keyboard project created. To start
-# working on things, cd into keyboards/my_awesome_keyboard
-######################################################
+QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started, run the `util/new_keyboard.sh` script:
+
+```
+$ ./util/new_keyboard.sh
+Generating a new QMK keyboard directory
+
+Keyboard Name: mycoolkb
+Keyboard Type [avr]:
+Your Name [John Smith]:
+
+Copying base template files... done
+Copying avr template files... done
+Renaming keyboard files... done
+Replacing %KEYBOARD% with mycoolkb... done
+Replacing %YOUR_NAME% with John Smith... done
+
+Created a new keyboard called mycoolkb.
+
+To start working on things, cd into keyboards/mycoolkb,
+or open the directory in your favourite text editor.
```
This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard.
diff --git a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
index d8e084f46..979eafbc8 100644
--- a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
+++ b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
@@ -1,14 +1,24 @@
-Setting up your ARM based PCB is a little more involved than an Atmel MCU, but is easy enough. Start by using `util/new_project.sh <keyboard>` to create a new project:
+Setting up your ARM based PCB is a little more involved than an Atmel MCU, but is easy enough. Start by running `util/new_keyboard.sh`:
```
-$ util/new_project.sh simontester
-######################################################
-# /keyboards/simontester project created. To start
-# working on things, cd into keyboards/simontester
-######################################################
-```
+$ ./util/new_keyboard.sh
+Generating a new QMK keyboard directory
+
+Keyboard Name: mycoolkb
+Keyboard Type [avr]:
+Your Name [John Smith]:
+Copying base template files... done
+Copying avr template files... done
+Renaming keyboard files... done
+Replacing %KEYBOARD% with mycoolkb... done
+Replacing %YOUR_NAME% with John Smith... done
+Created a new keyboard called mycoolkb.
+
+To start working on things, cd into keyboards/mycoolkb,
+or open the directory in your favourite text editor.
+```
# END OF NEW ARM DOC, OLD ATMEL DOC FOLLOWS