|
Home
About
Requirements
How to Build and Run
How to Create Your Own Flash Cards
How to Add a New Language
How to Use
Gallery
Troubleshooting
Download
Site hosted by:

|
How to Create Your Own Flash
Cards
Kardz probably won't be of much use to you with just the
example set of flash cards. You'll want to eventually
create your own sets for your own personalized study.
- First, type a data input file. Make sure you
type and save the file using UTF-8 Unicode encoding.
Windows XP comes with IME (Input Method Editors) that allow
Unicode input; you may have to install them from the Windows
XP installation CD if you can't find it on your computer. The general format
of the data input file is:
# file comment
!<category description>
######## card comment
<character entry>
<answer entry>
######## card comment
<character entry>
<answer entry>
...
The different entries are separated by blank
lines, so be careful where you place them. If you need
a blank line in the actual character/answer entry itself,
use a line with a single space character (' ') in the entry.
Comment lines are signified with a pound character ('#') at
the beginning of a line. They can only appear at the
beginning of the file, after a category divider, or after an
answer entry. I recommend making full use of
commenting to help identify parts of the input file. Category divider lines should start with
an exclamation point ('!'), and at least one is required at
the start of the file. Character and answer entries
may span multiple lines. See the sample cards' data
input files in the util directory.
The
DataGen utility cannot distinguish between a category divider,
character entry, or answer entry, so as a general rule, keep in mind that each character entry should be followed by
its answer entry, and category dividers should only appear
after an answer entry.
Avoid using half-width characters to avoid extra work when
trying to align characters in the bitmap-editing program in
Step 6.

- Open a Command Prompt (Start -> Run -> "cmd").
cd into the
util directory that you extracted from
the downloaded zip file.
- Compile DataGen.java using the command:
javac
DataGen.java. The Path
environment variable needs to be correctly set to include the Java
bin directory (right-click My Computer -> Properties ->
Advanced tab -> Environment Variables; make sure "C:\Program
Files\Java\jdk1.5.0_06\bin\", or wherever your Java
bin directory is located, is included in the System Path
variable).
- Run DataGen using the command:
java
DataGen dataFile.txt, where dataFile.txt
is the data file you typed from Step 1. If there are
no errors in the file, you will be prompted for the language
name, language code, your name (optional), the pixel
dimensions of 1 character in the PNG file, and the eventual
location of the PNG file. The language information is
used for the About screen, Java package, and state-saving.
The language code can be anything, but it would be nice to
follow the standard language codes. Your name is used
to give you credit in the About screen and the generated Data.java file. The pixel dimensions are required so
Kardz knows how to map characters to the PNG file.
You should decide how big you want the character to be on
your screen before running DataGen. All characters will have the dimensions
specified here. Finally, Kardz needs to know where the actual PNG file
is located. You need to specify the full path to the
file, so if you plan on saving the PNG file as JPN_chars.png
in the C:\WTK22\apps\Kardz\res\ncy\kardz directory, you should specify
/ncy/kardz/JPN_chars.png
as the PNG path.

- Three files will be generated:
reference.txt,
copy.txt, Data.java. Copy Data.java to
the appropriate directory in C:\WTK22\apps\kardz\src
(e.g. copy the Data.java file for a Japanese
card set to C:\WTK22\apps\Kardz\src\ncy\kardz\kardzJPN\).
- Open a bitmap-editing program. A program
that supports a grid view or guidelines is recommended.
You can use one of the supplied .psd (Photoshop)
templates in the
templates folder if you want a
preset grid of 17x18 characters.

- Characters should be in row-major order. The first
3 characters must be: blank, up arrow, down arrow.
Kardz uses these characters for erasing and for scroll
arrows. I keep these 3 characters on a separate locked layer
in Photoshop to keep things organized.
You should copy and paste the characters from
copy.txt
to the position following the down arrow. Adjust the
text's font size, leading, tracking, baseline shift, etc. until all the
characters fit in their own grid cell. Once that's
done, it's a good
idea to reduce the canvas size, just big
enough to include all the characters' grid cells, to reduce file size.

- Save the file in an optimized format (as small as
possible). For example, Photoshop has the "File ->
Save for Web" option. Save as a 2-color PNG-8 file.
Make sure you save it in the directory you specified in the
DataGen program (e.g.
C:\WTK22\apps\Kardz\res\ncy\kardz).
- That's it! Re-Build and you've got your own
cards.
Back to top
|