sily 2.2.0
Personal library
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Sily libraries for D programming language.
Modules
core
sily.color
andsily.vector
: Contains color and templated vector structs with utils
// Vector can be constructed manually or with aliases
auto v1 = Vector!(int, 2)(10, 20);
auto v2 = ivec2(10, 20);
auto v3 = ivec2(10, 20);
auto v4 = vec2!int(10, 20);
// Also vector can be given only one value,
// in that case it'll be filled with that value
auto v5 = ivec4(13);
auto v6 = vec4(0.3f);
// Vector values can be accessed with array slicing,
// by using color symbols or swizzling
float v6x = v6.x;
float v6z = v6.z;
float[] v6yzx = v6.yzx;
auto rvec7 = Vector!(real, 7)(10);
auto rvec7s = rvec7.VecType(20);
col c = col(3, 4, 1, 2);
col d = c.brg;
col g = Colors.aquamarine;
vec4 v = d;
vec4 e = v.xyyz;
string code = g.toAnsiString();
Color can be converted to bash escape sequence to set/print colors in Ansi8, Ansi256 and TrueColor modes.
sily.getopt
: Contains custom getopt printer:
help = getopt(
args,
config.bundling, config.passThrough, std.getopt.config.caseSensitive,
"columns|c", "Sets width/columns", &conf.width,
"rows|r", "Sets height/rows", &conf.height,
"size|s", "Matches size. Must be \'width\', \'height\' or \'fit\'", &conf.size,
"color|C", "Sets color type. Must be \'ansi8\', \'ansi256\', \'truecolor\'", &conf.color,
);
uint _opt = 0;
if (help.helpWanted || args.length == 1) {
printGetopt(
"Usage: app [args] file",
"Size",
help.options[0..3],
"Colors",
help.options[3],
"Misc",
customOption("options", "Returns options")
);
return 0;
}
Converts into:
Usage: app [args] image-file
Size:
-c, --columns Sets width/columns
-r, --rows Sets height/rows
-s, --size Matches size. Must be 'width', 'height' or 'fit'
Colors:
-C, --color Sets color type. Must be 'ansi8', 'ansi256', 'truecolor'
Misc:
options Returns options
sily.array
: Array manipulation (fill, search)sily.clang
: Utils to work with C bindings (plussily.ptr
)sily.conv
: Streamlined conversionsily.file
: File manipulationsily.math
: Misc math utilssily.matrix
: Matrix mathsily.meta.swizzle
: Swizzling used bysily.vector
andsily.color
.sily.meta
itself is emptysily.path
: Path manipulationsily.property
: Template mixin to generate propertiessily.ptr
: Pointer conversionsily.queue
: FCFS queue containersily.stdio
: Stdio wrappersily.string
: String manipulationsily.time
: Time wrappersily.uni
:std.uni
alternativesily.quaternion
: Quaternion math
- Registered by Alisa Lain
- 2.2.0 released 20 days ago
- al1-ce/sily-dlang
- MIT license
- Copyright © 2022, Alisa Lain
- Authors:
- Sub packages:
- sily:unit, sily:dyaml, sily:sdlang
- Dependencies:
- speedy-stdio
- Versions:
-
2.2.0 2023-May-17 2.1.0 2023-May-09 2.0.0 2023-May-03 1.5.1 2023-May-02 1.5.0 2023-Apr-25 - Download Stats:
-
-
1 downloads today
-
2 downloads this week
-
22 downloads this month
-
186 downloads total
-
- Score:
- 0.4
- Short URL:
- sily.dub.pm