Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c444a621b1 | ||
|
|
bb262495b1 |
51
demo.tape
Normal file
51
demo.tape
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# VHS documentation
|
||||||
|
#
|
||||||
|
# Output:
|
||||||
|
# Output <path>.gif Create a GIF output at the given <path>
|
||||||
|
# Output <path>.mp4 Create an MP4 output at the given <path>
|
||||||
|
# Output <path>.webm Create a WebM output at the given <path>
|
||||||
|
#
|
||||||
|
# Settings:
|
||||||
|
# Set FontSize <number> Set the font size of the terminal
|
||||||
|
# Set FontFamily <string> Set the font family of the terminal
|
||||||
|
# Set Height <number> Set the height of the terminal
|
||||||
|
# Set Width <number> Set the width of the terminal
|
||||||
|
# Set LetterSpacing <float> Set the font letter spacing (tracking)
|
||||||
|
# Set LineHeight <float> Set the font line height
|
||||||
|
# Set Theme <string> Set the theme of the terminal (JSON)
|
||||||
|
# Set Padding <number> Set the padding of the terminal
|
||||||
|
# Set Framerate <number> Set the framerate of the recording
|
||||||
|
# Set PlaybackSpeed <float> Set the playback speed of the recording
|
||||||
|
#
|
||||||
|
# Sleep:
|
||||||
|
# Sleep <time> Sleep for a set amount of <time> in seconds
|
||||||
|
#
|
||||||
|
# Type:
|
||||||
|
# Type[@<time>] "<characters>" Type <characters> into the terminal with a
|
||||||
|
# <time> delay between each character
|
||||||
|
#
|
||||||
|
# Keys:
|
||||||
|
# Backspace[@<time>] [number] Press the Backspace key
|
||||||
|
# Down[@<time>] [number] Press the Down key
|
||||||
|
# Enter[@<time>] [number] Press the Enter key
|
||||||
|
# Space[@<time>] [number] Press the Space key
|
||||||
|
# Tab[@<time>] [number] Press the Tab key
|
||||||
|
# Left[@<time>] [number] Press the Left Arrow key
|
||||||
|
# Right[@<time>] [number] Press the Right Arrow key
|
||||||
|
# Up[@<time>] [number] Press the Up Arrow key
|
||||||
|
# Down[@<time>] [number] Press the Down Arrow key
|
||||||
|
# Ctrl+<key> Press the Control key + <key> (e.g. Ctrl+C)
|
||||||
|
#
|
||||||
|
# Display:
|
||||||
|
# Hide Hide the subsequent commands from the output
|
||||||
|
# Show Show the subsequent commands in the output
|
||||||
|
|
||||||
|
Output demo.gif
|
||||||
|
|
||||||
|
Set FontSize 32
|
||||||
|
Set Width 1200
|
||||||
|
Set Height 600
|
||||||
|
|
||||||
|
Type "serra --version" Sleep 500ms Enter
|
||||||
|
|
||||||
|
Sleep 5s
|
||||||
@ -9,6 +9,7 @@ import (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
addCmd.Flags().Int64VarP(&count, "count", "c", 1, "Amount of cards to add")
|
addCmd.Flags().Int64VarP(&count, "count", "c", 1, "Amount of cards to add")
|
||||||
|
addCmd.Flags().BoolVarP(&unique, "unique", "u", false, "Only add card if not existent yet")
|
||||||
rootCmd.AddCommand(addCmd)
|
rootCmd.AddCommand(addCmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,6 +40,12 @@ var addCmd = &cobra.Command{
|
|||||||
|
|
||||||
// If duplicate key, increase count of card
|
// If duplicate key, increase count of card
|
||||||
if mongo.IsDuplicateKeyError(err) {
|
if mongo.IsDuplicateKeyError(err) {
|
||||||
|
|
||||||
|
if unique {
|
||||||
|
LogMessage(fmt.Sprintf("Not adding \"%s\" to Collection because it already exists.", c.Name), "red")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
modify_count_of_card(coll, c, count)
|
modify_count_of_card(coll, c, count)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ var limit float64
|
|||||||
var name string
|
var name string
|
||||||
var since string
|
var since string
|
||||||
var rarity, set, sort string
|
var rarity, set, sort string
|
||||||
|
var unique bool
|
||||||
|
|
||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Version: Version,
|
Version: Version,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user