prntscget.app

Lightshot prnt.sc (and prntscr.com) gallery downloader.

Members

Enums

ShellReturn
enum ShellReturn

Shell return values.

Functions

downloadAllImages
void downloadAllImages(Appender!(RemoteImage[]) images, Configuration config)

Downloads all images in the passed images list.

downloadImage
bool downloadImage(Appender!(ubyte[]) buffer, string url, string imagePath, Duration requestTimeout)

Downloads an image from the prnt.sc (prntscr.com) server.

ensureImageDirectory
bool ensureImageDirectory(string targetDirectory)

Ensures the target image directory exists, creating it if it does not and returning false if it fails to.

enumerateImages
uint enumerateImages(Appender!(RemoteImage[]) images, JSONValue listJSON, Configuration config, size_t numImages)

Enumerate images, skipping existing ones.

getImageList
ubyte[] getImageList(string cookie, uint requestTimeoutSeconds)

Fetches the JSON list of images for a passed cookie from the prnt.sc (prntscr.com) server.

handleGetopt
auto handleGetopt(string[] args, Configuration config)

Handles getopt arguments passed to the program.

hasValidJPEGEnding
bool hasValidJPEGEnding(ubyte[] fileContents)

Detects whether or not a passed array of bytes has a valid JPEG ending.

hasValidPNGEnding
bool hasValidPNGEnding(ubyte[] fileContents)

Detects whether or not a passed array of bytes has a valid PNG ending.

main
int main(string[] args)

Program entry point.

plurality
T plurality(N num, T singular, T plural)

Chooses between two values based on if the passed numeric value is one or many.

run
int run(string[] args)

Program main logic.

Structs

Configuration
struct Configuration

Aggregate of values supplied at the command line.

RemoteImage
struct RemoteImage

Embodies the notion of an image to be downloaded.

See Also

Meta