Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ajstarks/decksh
/ functions
Functions
228 in github.com/ajstarks/decksh
⨍
Functions
228
◇
Types & classes
14
↓ 156 callers
Function
eval
eval evaluates an id string
parse.go:16
↓ 33 callers
Function
unquote
unquote removes quotes from a string
generate.go:728
↓ 29 callers
Function
ftoa
ftoa returns the string value of a floating point value
assign.go:13
↓ 24 callers
Function
vmap
vmap maps one interval to another
assign.go:331
↓ 21 callers
Function
validNumber
validNumber checks that a string starts with a digit or sign or decimal point
generate.go:46
↓ 10 callers
Function
printlevel
printlevel prints the leading spaces for the specified level
cmd/dshfmt/main.go:158
↓ 9 callers
Function
makegeometry
makegeometry fills in the geometry from arguments
geo.go:89
↓ 9 callers
Function
xmlesc
xmlesc escapes XML
generate.go:41
↓ 8 callers
Function
opval
opval returns the value of a binary operation
assign.go:89
↓ 8 callers
Function
polar
polar converts polar to Cartesian coordinates, compensating for canvas aspect ratio
generate.go:1359
↓ 7 callers
Function
fontColorOp
fontColorOp generates markup for font, color, and opacity
generate.go:87
↓ 7 callers
Function
mapData
mapData maps raw lat/long coordinates to canvas coordinates
geo.go:97
↓ 7 callers
Function
printargs
printargs prints arguments from the specified point to the last
cmd/dshfmt/main.go:165
↓ 7 callers
Function
qesc
qesc remove quotes from a string, and XML escape it
generate.go:123
↓ 6 callers
Function
keyparse
keyparse parses keywords and executes
parse.go:431
↓ 5 callers
Function
filequote
filequote gets a name from a quoted string
parse.go:52
↓ 5 callers
Function
geopl
(w io.Writer, x, y []float64, color string, shapesize float64)
geo.go:236
↓ 5 callers
Function
kind
kind returns the type of statement
cmd/dshfmt/main.go:141
↓ 5 callers
Function
opencoords
opencoords returns the source of coordinates: either as filename, or as an individual string with special formatting: the first character must be '+'
generate.go:1770
↓ 5 callers
Function
parse
parse takes a line of input and returns a string slice containing the parsed tokens
parse.go:37
↓ 5 callers
Function
readLoc
readLoc reads lat/long pairs and an optional name from a file
geo.go:125
↓ 4 callers
Function
Process
Process reads input, parses, dispatches functions for code generation
decksh.go:60
↓ 4 callers
Function
colorop
colorop makes a color and optional opacity in the form of name:op
geo.go:158
↓ 4 callers
Function
colorstring
colorstring returns the markup for a color. either a single color or two colors and a percentage used for gradients
generate.go:75
↓ 4 callers
Function
endlist
endlist writes an ending list to w
cmd/dshtoc/main.go:102
↓ 4 callers
Function
evaloop
evaloop evaluates items in a loop body
loop.go:179
↓ 4 callers
Function
fontColorOpLp
fontColorOpLp generates markup for font, color, and opacity and linespacing
generate.go:103
↓ 4 callers
Function
newlist
newlist writes the beginning of a list to w
cmd/dshtoc/main.go:85
↓ 4 callers
Function
parseLatLongs
parseLatLongs parses two forms of lat/long parse to (x,y)
generate.go:1789
↓ 4 callers
Function
readKML
ReadKML reads and parses KML files, writing deck markup
kmlgeo.go:183
↓ 4 callers
Function
writeChart
writeChart writes a chart, using data in the filename, using specified settings
generate.go:2224
↓ 3 callers
Function
deckline
deckline makes a line in deck markup
kmlgeo.go:127
↓ 3 callers
Function
geocanvas
evaluate reserved variables for canvas bounds (geoXmin, geoXmax, geoYmin, geoYmax) if errors occur use the defaults
geo.go:46
↓ 3 callers
Function
geolatlong
evaluate reserved variables for set lat/long bounds, if errors occur use the defaults
geo.go:68
↓ 3 callers
Function
getcoord
getcoords extracts lat/long from geo URLs
generate.go:1593
↓ 3 callers
Function
keyinfo
(s string, kind string)
cmd/dshlint/main.go:206
↓ 3 callers
Function
keyword
keyword formats a general keyword
cmd/dshfmt/main.go:207
↓ 3 callers
Function
setDefaultChartSettings
setDefaultChartSettings sets all chart settings to default values
generate.go:2036
↓ 2 callers
Function
Dump
Dump shows the variables
decksh.go:33
↓ 2 callers
Function
area
area computes the diameter from a given area Area = Pi * (r*r), so given an area the diameter = sqrt ( area / pi) * 2 usecase: x=somevalue d=area x ci
assign.go:185
↓ 2 callers
Function
curve
curve make quadratic Bezier curve curve x1 y1 x2 y2 x3 y3 [size] [color] [opacity]
generate.go:1061
↓ 2 callers
Function
deckpolygon
deckpolygon makes deck markup for a polygon given x, y coordinates slices
kmlgeo.go:107
↓ 2 callers
Function
deckshape
deckshape draws the shapes (lines, polylines, polygons) in deck markup
kmlgeo.go:159
↓ 2 callers
Function
def
def reads and processes the function defintion def name arg1 arg2 ... argn ... edef
parse.go:294
↓ 2 callers
Function
dottedline
dotted line places count dots along the line (x1,y1) and (x2,y2)
generate.go:944
↓ 2 callers
Function
dump
dump prints the parsed lines
cmd/dshfmt/main.go:421
↓ 2 callers
Function
forvector
forvector returns the elements between "[" and "]"
loop.go:53
↓ 2 callers
Function
funcbody
funcbody caches the body of function defintions avoiding reapeted open/read/close
parse.go:271
↓ 2 callers
Function
geoDataFormat
geoDataFormat looks at a filename and returns the format type based on the suffix
geo.go:107
↓ 2 callers
Function
geodot
geodot places dots at geometric coordinates
geo.go:169
↓ 2 callers
Function
geotext
"geotext" places text at geographic coordinates
geo.go:225
↓ 2 callers
Function
isString
isString tests of a string is bounded by quotes
cond.go:27
↓ 2 callers
Function
kind
kind returns the type of statement
cmd/dshlint/main.go:230
↓ 2 callers
Function
maxitem
maxitem returns the maximum element within a collection of decksh lines between the <begin> and <end> elements
cmd/dshfmt/main.go:307
↓ 2 callers
Function
mktoc
mktoc makes a table of contents reading from r, writing to w
cmd/dshtoc/main.go:124
↓ 2 callers
Function
parseKMLCoords
ParseCoords makes x, y slices from the string data contained in the kml coordinate element (lat,long,elevation separated by commas, each coordinate se
kmlgeo.go:90
↓ 2 callers
Function
parsePoint
parsePoint return coordinates from the shape record
shpgeo.go:115
↓ 2 callers
Function
parseblock
parseblock parses a block of code
parse.go:377
↓ 2 callers
Function
parsefor
parsefor collects and evaluates a loop body
loop.go:124
↓ 2 callers
Function
parseif
parseif parses if -- else -- eif
parse.go:389
↓ 2 callers
Function
parsesign
Geographic functions parsesign fixes the parsing of signed numbers
generate.go:1578
↓ 2 callers
Function
process
process processes an io.Reader of decksh code
cmd/dshlint/main.go:321
↓ 2 callers
Function
readFloat64
readFloat64 turns raw data into floating point
shpgeo.go:109
↓ 2 callers
Function
readJSON
readJSON opens a geoJSON file, parses its contents, and writes coordinates in deck format
jsongeo.go:31
↓ 2 callers
Function
readSHP
readSHP opens and parses a Shapefile, generating deck markup
shpgeo.go:43
↓ 2 callers
Function
shpdeckpoint
shpdeckpoint places a circle at a coordinate. the coordinates are mapped from geographical coordinates to screen bounding box.
shpgeo.go:177
↓ 2 callers
Function
stropts
(opts options)
cmd/dshtoc/main.go:116
↓ 2 callers
Function
tempfile
make a temp file from a name
cmd/dshfmt/main.go:428
↓ 2 callers
Function
textblock
textblock generates markup for a block of text textblock x y width size [font] [color] [opacity] [link]
generate.go:365
↓ 2 callers
Function
toplevel
toplevel formats top level elements
cmd/dshfmt/main.go:193
↓ 1 callers
Function
Assign
Assign makes an assignment
decksh.go:28
↓ 1 callers
Function
JSONCoords
JSONCoordinates extracts coordinates from a JGeometry object, according to type
jsongeo.go:60
↓ 1 callers
Function
JSONLineString
JSONLineString parses an array of coordinate pairs
jsongeo.go:87
↓ 1 callers
Function
JSONMultiPolygon
JSONMultiPolygon parses an array of polygons
jsongeo.go:117
↓ 1 callers
Function
JSONPoint
JSONPoint parses a single coordinate pair [longitude, latitude]
jsongeo.go:74
↓ 1 callers
Function
JSONPolygon
JSONPolygon parses an array of linear rings (array of coordinate pairs)
jsongeo.go:101
↓ 1 callers
Function
angle
angle computes the angle formed by a line, compensating for aspect ratio
generate.go:1345
↓ 1 callers
Function
arc
arc makes the markup for arc arc cx cy w h a1 a2 [size] [color] [opacity]
generate.go:1034
↓ 1 callers
Function
arctext
arctext places text on an arc arctext cx cy radius begin-angle end-angle size [font] [color] [opacity] [link]
generate.go:301
↓ 1 callers
Function
areafunc
areafunc returns the diameter, given the area measure
assign.go:490
↓ 1 callers
Function
argChart
argChart takes a list of arguments with flags set and writes a chart
generate.go:2217
↓ 1 callers
Function
arrow
arrow draws a general arrow given two points. The rotation of the arrowhead is computed. arrow x1 y1 x2 y2 [linewidth] [arrowidth] [arrowheight] [colo
generate.go:1390
↓ 1 callers
Function
arrowhead
arrowhead returns the coordinates for left, right, up, down arrowheads. x, y is the point of the arrow, aw, ah are width, height
generate.go:1448
↓ 1 callers
Function
assign
assign creates an assignment by filling in the global id map assignments are either simple (x=10), binary op (x=a+b), coordinate (p=(100,50)) or built
assign.go:47
↓ 1 callers
Function
assignop
assignop creates an assignment by computing an addition or substraction on an identifier
assign.go:148
↓ 1 callers
Function
beginslide
beginslide writes new slide markup to w
cmd/dshtoc/main.go:107
↓ 1 callers
Function
binop
binop processes a binary expression: id=id op number
assign.go:130
↓ 1 callers
Function
brace
brace makes various kinds of braces: (left, right, up, down) lbrace x y size aw ah [linewidth] [color] [opacity] rbrace x y size aw ah [linewidth] [co
generate.go:1232
↓ 1 callers
Function
bracket
bracket makes various kinds of braces: (left, right, up, down) lbracket x y width height [linewidth] [color] [opacity] rbracket x y width height [line
generate.go:1118
↓ 1 callers
Function
canvas
canvas produces the "canvas" element canvas width height
generate.go:141
↓ 1 callers
Function
carrow
carrow makes a arrow with a curved line lcarrow x1 y1 x2 y2 x3 y3 [linewidth] [arrowidth] [arrowheight] [color] [opacity] rcarrow x1 y1 x2 y2 x3 y3 [l
generate.go:1500
↓ 1 callers
Function
chartbounds
chartbounds sets the bounding box for charts
generate.go:2191
↓ 1 callers
Function
chartflags
chartflags sets the flags for the dchart keyword
generate.go:2110
↓ 1 callers
Function
cimage
cimage makes a captioned image cimage "file" "caption" x y w h [scale] [link]
generate.go:444
↓ 1 callers
Function
comma
comma formats a floating point value with commas. Limitations: up to 15 digits, no decimals
assign.go:19
↓ 1 callers
Function
condition
condition evaluates string and number conditional
cond.go:33
↓ 1 callers
Function
conditional
conditional processes if...eif statements
cmd/dshfmt/main.go:235
↓ 1 callers
Function
content
content generates content of arbitrary type content "scheme://file" x y size
generate.go:256
↓ 1 callers
Function
coordfunc
coordfunc assigns a coordinate pair
assign.go:245
↓ 1 callers
Function
dbrace
lbrace makes a downward-facing brace
generate.go:1333
next →
1–100 of 228, ranked by callers