Posts

Batch XCF to Jpg Conversion

Gimp's Default Editing Format to JPG

When saving multiple edited images into Gimp's native image editing format, there will be a need to export them to a readily used format such as JPG. By using the bash script written by Eli you can achieve this task.

However, his bash script requires you to place that file into the same directory as to where the xcf files are located for conversion, which can be improved if you wish to operate on multiple folders with xcf, it would be inconvenient to copy the script to all those folders.

Modifying the script, we have the following file, "convert_xcf_to_jpg.sh", which can take an input and output directories to control where the conversion will take place without the restriction of leaving the script in the same directory as the xcf files.

Categories: #shell
Typst - Reusability

Sharing String Contents

Typst offers the capability of content reuse by allowing for file imports. It makes extensive use of functions to perform special manipulation of text.

Shared Function - Load Function from File

Reusable content can be defined in another file within a function. This function when called will yield the shared content.

// shared-function.typ

#let content() = {
[ 
  = Content from another file
 Shared appears here.
 ]
}

The sample.typ will load the content from shared-function.typ.

// sample.typ

#import("shared-function.typ"): *
#content()
Categories: #shell #typst
Typst - LaTeX Alternative

Typesetting Documents with Rust

LaTeX is a time-honored typesetting application that has developed a large community. With age, comes accumulation of the wealth of packages for general document creation. Although it is tool that is well-developed, it tends to be slower and is burden with a legacy design that is not as performant as newer tools. Since its use is so pervasive, it has become entrenched in the document creation community preventing new competing application has come forth. However, there is an alternative that is worth considering and that one is Typst.

Categories: #shell #typst
Tags: #NodeJs
Oclif and Vite

Incompatibility with CLI Build

If you intend to build out an Oclif typescript CLI app that is to be consumed by Vitejs, you might experience an issue with integrating the two. The Oclif CLI builds properly, but when executing the CLI through vite, this errors comes up.

[ERR_UNKNOWN_FILE_EXTENSION] TypeError Plugin: ... [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" ...
Categories: #shell #typescript
Tags: #NodeJs