Posts

fzf - Integrate with Jq for JSON Search

Fzf Search JSON Data

JSON is a ubiquitous data format and searching for content in JSON will come up often enough to warrant a real-time search functionality. jq can be used to query json and fzf can be combined with this tool to fulfill our JSON search capabilities.

Start fzf with jq

echo '' | fzf --preview "jq {q} < us-data.json.json"
Categories: #fzf
Tags: #cli-tools
DITA - Structured Documentation with XML

DITA Setup

DITA stands for Darwin Information Typing Architecture, it is an XML specification that prescribes tags for organizing your documentation content. For Dita to be able to generate a well-defined structure, it suggests a rather prescriptive methods of tag use. The intention of Dita is to promote content reuse so that your documentation project will be more manageable as it scales up in size and complexity.

Getting started with Dita begins with having these prerequisites.

  • Java
  • Text editor
  • DITA-OT
Categories: #documentation
Nuitka and PyQtgraph - Bundle a Python Application into a Standalone Binary

PyQtgraph Standalone Application

Nuitka is a Python compiler that supports the conversion of a Python application to compiled code. It enables you to create a single file executable for convenient distribution.

Prerequisites

You will need a C compiler and a Python version specified in the Nuitka README.md.

Installing Nuitka

python3 -m pip install nuitka
Categories: #python #shell
Tags: #cli-tools
Creating an AppImage from a Binary Executable

Make a Portable Desktop Application without the need for Installation

To create a binary which can be run on many Linux machines, an AppImage can be generated. An AppImage wraps around the files needed to run the application and when executed, doesn't require modifications to your operating system as it is self-contained.

Download the appimage tool executable file from here.

Categories: #shell
Tags: #cli-tools
Dearpygui - Menu Bar

With dearpygui, there are two ways to create a menu bar that displays within your main application window. One method of creating a menu bar is to use the "Viewport Menu Bar" which is the traditional menu bar with the fixed horizontal row of menu entries found near the top of your main applications window and the other is the "Menu Bar" which is a floating menu window inside your main application window.

Categories: #python
Tags: #dearpygui
Word Proximity Search

When you search for related words in a general area that are not in strict sequential order, you will have to resort to use a regex pattern that search across multiple words at a time.

"firstword someword anotherword someotherword secondword".match(/\b(?:firstword(?:\W+\w+){1,3}?\W+secondword)\b/g)

// Returns
// ["firstword someword anotherword someotherword secondword"]
Categories: #JavaScript
fzf - Find CLI Application and Execute

Run the Application when Found

When you have an application you wish to search for that you know starts with a certain letter, you type the letter into your Bash shell and press tab to display all the suggestions. Most likely, there will be more applications than one would be able to identify readily by eye.

To make the task of finding your application easier, one can use fzf to perform real-time filtering of your application search.

Categories: #fzf
Tags: #cli-tools