lipsum-cli is a small terminal application written in Rust language.

Overview

lipsum-cli

lipsum-cli is a small terminal application written in Rust language. It's used for generating pseudo-Latin lorem ipsum filler text in terminal.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat…

This application uses lipsum library to generate text.

It also has the ability to generate text from a file or stdin.

INSTALLATION

Using Cargo

cargo install lipsum-cli

Using Homebrew

brew tap xlith/lipsum-cli
brew install lipsum-cli

USAGE

lipsum-cli [OPTIONS]

OPTIONS:
    -f, --file                   File input for the custom source. This has priority to stdin.
                                       If not specified, stdin is used
    -h, --help                         Print help information
    -t, --text-source     Text source to choose from. Ignored if stdin or `-f` is used
                                       [default: liber-primus] [possible values: liber-primus,
                                       lorem-ipsum]
    -V, --version                      Print version information
    -w, --words                 Count of words to generate. Default is 5 if text source is
                                       not liber-primus

EXAMPLES

This will generate a string using Liber Primus like Grate Meminit et Praesentibus which should be suitable for use in a document title for section heading.

$ lipsum-cli 
Dolore sed in his Rebus Instructus

This will generate a string of 5 words from a file (lorem-ipsum.txt)

$ lipsum-cli --file ./start-wars.txt
Weapon, the DEATH STAR, an.

This will generate a string of 5 words from stdin

$ cat start-wars.txt | lipsum-cli
The Empire’s sinister agents, Princess.

This will generate a string of 10 words from a file (lorem-ipsum.txt)

$ lipsum-cli --file star-wars.txt --words 10
Aboard her starship, custodian of the stolen plans that can.

This will generate a string of 10 words from stdin

$ cat star-wars.txt | lipsum-cli --words 10
The stolen plans that can save her people and restore.

This will generate a string of 10 words using the lorem ipsum example filler text beginning with “Lorem ipsum dolor sit amet”

$ lipsum-cli lorem-ipsum --words 10
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do.

CONTRIBUTING

This is my first Rust project, so I'm sure there are some mistakes. If you have any questions, comments or ideas, please feel free to submit a pull request or open an issue.

Contribution Guidelines:

  • Fork the repository on GitHub
  • Create a new branch
  • Commit your changes
  • Push your branch to GitHub
  • Open a pull request

LICENSE

This project is licensed under the MIT license. Contributions will be accepted under the same license.

Release History

This is a changelog describing the most important changes per release.

Version 0.2.0 — 19.02.2022

  • Completely rewritten and redesigned the application to be more modular and easier to use.
  • Fix lots of text and typos.
  • Added unit tests.

Version 0.1.0 — 20.02.2022

  • Initial release
You might also like...
A Rust-based tool to analyze an application's heap.

Heap analysis tool for Rust Heap analysis is a pure-Rust implementation to track memory allocations on the heap. Usage Heap analysis provides a custom

A self-contained, single-binary Rust and Leptos application for remote Wake-on-LAN
A self-contained, single-binary Rust and Leptos application for remote Wake-on-LAN

Remote Wake-on-LAN with Rust and Leptos A self-contained, single-binary Rust and Leptos application serving a web interface to wake another device on

A Command Line OTP Authenticator application.

cloak A Command Line OTP (One Time Password) Authenticator application written in Rust that generates time-based and counter-based OTP codes. Motivati

Hydrogen is the desktop application for Geplauder, built with tauri studio.

Hydrogen Hydrogen is the desktop application for Geplauder, built with tauri studio. For more information on Geplauder, click here. Usage To configure

Teleport is a simple application for sending files from Point A to Point B

Teleporter Teleporter is a small utility in the vein of netcat to send files quickly from point A to point B. It is more convenient than netcat in tha

This plugin provides an interface for storing unencrypted values on the application cache folder.

Tauri Plugin Store This plugin provides an interface for storing unencrypted values on the application cache folder. Architecture This repo shape migh

Measure the execution time of an application

Execution Timer Drag an executable file on the binary or enter the path as an argument to measure the execution time of the program. Building cargo bu

A shared document application akin to Google Docs. Example usage of wasm-peers library.

Live Document Proof of concept application showcasing the usability of wasm-peers crate for easy and costless peer-2-peer WebRTC communication. It's a

messloc is a drop in replacement for malloc that can transparently recover from memory fragmentation without any changes to application code.
messloc is a drop in replacement for malloc that can transparently recover from memory fragmentation without any changes to application code.

messloc is a drop in replacement for malloc that can transparently recover from memory fragmentation without any changes to application code. Goals Al

Comments
  • Problematic tty options

    Problematic tty options

    Hi. Thanks for sharing this project!

    I'm trying to use this together with rofi and I found there is a problem when using lipsum-cli with pipes.

    The docs says:

    cat start-wars.txt | lipsum-cli
    The Empire’s sinister agents, Princess.
    

    But if you try to use lipsum-cli with xargs

    echo "lipsum-cli -w 10" | xargs -i /bin/bash -c "{}"
    

    You always get an empty response. I think this is because: if atty::isnt(Stream::Stdin) sets the input_source to stdin, and there is no stdin.

    I think a possible solution would be change the precedence described here:

    -t, --text-source <TEXT_SOURCE> Text source to choose from. Ignored if stdin or -f is used

    So if you specify a -t value, it won't read from stdin, and pipes can be used freely.

    opened by mariano-dagostino 2
Owner
Civan Yavuzşen
Civan Yavuzşen
Smolprng - A small PRNG library written in Rust, a translation of SmallPRNG

SmolPRNG This is a small PRNG library/framwork written in pure Rust, that is a translation of another project of mine, SmallPRNG. The main goal of thi

Dustin Kenefake 2 Jan 10, 2022
A Rust library containing a collection of small well-tested primitives.

Gazebo - a library of Rust utilities This library contains a collection of well-tested utilities. Most modules stand alone, but taking a few represent

Meta Incubator 168 Dec 29, 2022
Massayo is a small proof-of-concept Rust library which removes AV/EDR hooks in a given system DLL

Massayo Massayo is a small proof-of-concept Rust library based on UnhookingPOC, which removes AV/EDR hooks in a given system DLL. I tried to reduce fi

null 53 Dec 21, 2022
A small utility for tracking the change in opening and closing of issues in a GitHub repo

A small utility for tracking the change in opening and closing of issues in a GitHub repo. This tool can be used to build visualizations for issue triage over time with the hope of motivating closing more issues than are opened.

Ryan Levick 12 Sep 29, 2021
A small tool to clone git repositories to a standard location, organised by domain name and path.

A small tool to clone git repositories to a standard location, organised by domain name and path. Runs on BSD, Linux, macOS, Windows, and more.

Wesley Moore 68 Dec 19, 2022
💫 Small microservice to handle state changes of Kubernetes pods and post them to Instatus or Statuspages

?? Kanata Small microservice to handle state changes of Kubernetes pods and post to Instatus ?? Why? I don't really want to implement and repeat code

Noel ʕ •ᴥ•ʔ 4 Mar 4, 2022
This is a small demo to accompany the Tauri + Yew tutorial

Tauri + Yew Demo This is a small demo to accompany the Tauri + Yew tutorial

Steve Pryde 94 Jan 2, 2023
Small utility to display hour in a binary format on the Novation's Launchpad X.

lpx-binary-clock Small utility to display hour in a binary format on the Novation's Launchpad X. Hours, minutes and seconds are displayed one digit pe

Alexis LOUIS 1 Feb 13, 2022
🦀 Small Tauri SolidJS Example feat. Vite

Tauri Solid Example (2022) Simple Solid(vite) starter running with Tauri. Should hopefully save some time trying to setup Tauri and Solid. Currently c

Luke Secomb 14 Oct 25, 2022
Small library for text to image steganography.

hips-lib Performs text to image steganography by hinding and retrieving secret text within images or pixel arrays. This is achieved by encoding the se

hewhocopypastes 4 Feb 21, 2023