| Crates.io | dproc |
| lib.rs | dproc |
| version | 1.2.4 |
| created_at | 2025-12-11 05:04:35.62192+00 |
| updated_at | 2025-12-11 05:23:10.897106+00 |
| description | A basic CLI data processor, designed to be fed data and output data directly from the commandline |
| homepage | https://github.com/matthewyang204/dproc |
| repository | https://github.com/matthewyang204/dproc |
| max_upload_size | |
| id | 1979177 |
| size | 102,824 |
dprocdproc is a basic CLI data processor, designed to be fed data and output data directly from the commandline.
dproc [SUBCMD1] [SUBCMD2] {yourdata}
SUBCMD1 can be:round functions for rounding, getting averages, etcfreq functions for getting frequencies of values, such as the mode or number of occurrences of a valuedeviate functions for getting deviations and values related to deviations, such as the varianceorganize functions for organizing the datasetenumerate functions for enumerating (getting data about the dataset), such as getting their sum or counting how many valuesmath miscellaneous functions for arbitrary things about integers like gcd and lcmsolve functions for solving equationselectrical electrical engineering functionsSUBCMD2 can be:When SUBCMD1 is round:
mean get the mean of the datasetgeo-mean get the geoemtric mean of the datasetharmonic-mean get the harmonic mean of the datasetmedian get the median of the datasetdecimal round to a decimal place, with the value to be rounded supplied as the first value, and the number of decimal places maintained specified as the secondinteger round the number to the nearest integerWhen SUBCMD1 is freq:
mode get the mode of the datasetnum {search term} {data} get the number of occurrences of the search term in the datasetWhen SUBCMD1 is deviate:
range get the range of the datavariance get the variance of the datastandard get the standard deviation of the data; the program will ask you if the data given is a sample or populationmeanAbsolute get the mean absolute deviationmedianAbsolute get the median absolute deviationiqr get the interquartile range of the datasetskewness get the skewness of the datasetWhen SUBCMD1 is organize:
sort sort the data from smallest to largestkeep-unique remove duplicate values from the datasetWhen SUBCMD1 is enumerate:
sum get the sum of the datacount get the number of values in the datamin get the minimum value in the datamax get the maximum value of the dataWhen SUBCMD1 is math:
lcm get the LCM of a datasetgcd, gcf get the GCD/GCF of a datasetprime-check check whether each number in the dataset is primefactorial get the factorial of each number in the datasetWhen SUBCMD1 is solve:
quadratic-single {{a}} {{b}} {{c}} solve a quadratic equation with the quadratic formula, where a, b, and c are the coefficients of the quadratic equation ax^2 + bx + c = 0. Note that you may have to convert your equation; this does not accept != 0 on the other side of the equation.linear-dual {{a1}} {{b1}} {{c1}} {{a2}} {{b2}} {{c2}} solve a system of two linear equations with the substitution method, where a1, b1, c1 are the coefficients of the first linear equation a1x + b1y = c1 and a2, b2, c2 are the coefficients of the second linear equation a2x + b2y = c1. Note that this is standard form and you may have to convert your equations to it.triangle-centroid {{x1}} {{y1}} {{x2}} {{y2}} {{x3}} {{y3}} get the centroid of triangle A(x1, y1) B(x2, y2) C(x3, y3)When SUBCMD1 is electrical:
volt {{current}} {{resistance}} get the voltage using Ohm's Lawresistance {{voltage}} {{current}} get the resistance using Ohm's Lawcurrent {{voltage}} {{resistance}} get the current using Ohm's LawPlace your data, values separated by spaces, in the place of {yourdata}. Alternatively, you may put stdin or - in the place of {yourdata} to read from stdin.
Requirements:
gcc, clang, MSVC, or some other C99-compliant C compilerAnd to build with ./configure && make:
makear (usually comes with binutils, or more rarely, coreutils)To build with cargo:
cd into the resulting foldercargo build --release (or without --release if you want a non-release debug-ready build)Or if you want your good old ./configure && make style build:
cd into the resulting folder./configure.make. Alternatively, to make it run a specified number of jobs, run make -j{yournumberofjobs}. Replace {yournumberofjobs} with the number of jobs you want to run. You can also specify your build target in the BUILDTARGET variable (optional) via make BUILDTAGET={yourtarget}, replacing {yourtarget} with your target, such as x86_64-apple-darwin. You can also specify the linker with make BUILDLINKER={yourlinker}, where {yourlinker} is your linker. These options can all be combined or used separately, and they are both completely optional.This program uses libraries that are bundled, which means you don't need the development headers to be installed.
libmysolvers bfe79f6Requirements:
makeThe official way is to install via cargo install dproc from crates.io. You can usually install via cargo install --path . if you built from the source tree.
To install a build done via the traditional UNIX-style build system, simply run make install in the root of the built binary's folder (root folder of a downloaded-and-built source folder). You can specify where you want to install with the PREFIX var. To do this, run make install PREFIX={yourprefix}. Replace {yourprefix} with your prefix. Use sudo where appropriate.
If you want to install from a binary downloaded from the releases, simply move the binary to a folder of your choice in your PATH.
On macOS, you can also use Homebrew. To install using Homebrew, first tap my self-hosted tap via brew tap matthewyang204/homebrew-formulae-casks. Then, simply install with brew install dproc.
It's very easy to build a GUI frontend for this program. You can build your own or use the one that comes with it. This processor can be integrated with multiple different types of graphical frontends or even middlemen. Some examples:
However, for typical use, it is recommended to get familiar with the terminal and use it in the CLI where it is the most powerful.
This is the GUI frontend that is included in the source code and disabled by default. It can be built with the build.py script in the gui/ folder. It has a separate versioning system; I may or may not package a binary on every single separate release of the GUI
Requirements:
python 3.6 or laterTo build:
requirements.txt with pip3python3 build.py (UNIX systems) or python build.py (Windows systems)This project is licensed under the GNU General Public License v3.0 (GPLv3).
All past and future versions of dproc are covered by this license.
See the LICENSE file for full details.
Note on GUI frontends: Of course I'd prefer you to write FOSS GUI frontends, as this software is designed to follow the FSF's merits. However, I do not restrict the creation of non-open-source frontends, as frontends do not copy any code. Similarly, the API used could be considered a standard and I'm not going to force all software using same/similar API control (commands, subcommands, etc) to comply with the FOSS license of this program, so long as those programs do not copy or use extremely similar code originating from this program.