-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Misc changes before 2.0.0 release (#19)
* add back static-dir flag * staticDir * Implement --write-template * Add general keyboard shortcuts
- Loading branch information
Showing
5 changed files
with
130 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import {dedent, htmlEntities} from './utils'; | ||
|
||
/** | ||
* Write out a sample template file for a given input CSV. | ||
*/ | ||
export function makeTemplate(columnNames: string[]) { | ||
const inputs = columnNames.map(column => column + ': ${' + column + '}'); | ||
return dedent` | ||
${inputs.join('<br>\n ')} | ||
<!-- | ||
Use named form elements to generate output as desired. | ||
Use data-key="x" to set a keyboard shortcut for buttons. | ||
--> | ||
<input type="text" size="80" name="notes" placeholder="Notes go here"> | ||
<input type="submit" name="result" data-key="a" value="Class A"> | ||
<input type="submit" name="result" data-key="b" value="Class B">`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters