semvec/pypi-packages huggingface dataset:
pygeneral 1.1.2
Tools for Python
Requires Python: >=3.12
Keywords: tools, python, helpers, utilities, general

# README - pygeneral

A collection of general-purpose Python utilities.

---

## Table of Contents

1. [Overview](#overview)
2. [Installation](#installation)
3. [Command-Line Usage](#command-line-usage)
4. [Python Usage](#python-usage)
   - [Sorting with `lensort`](#sorting-with-lensort)
   - [Using `StdoutCounter`](#using-stdoutcounter)
   - [Checking Root Privileges with `is_root`](#checking-root-privileges-with-is_root)
5. [Project Structure](#project-structure)
6. [License](#license)

---

## Overview

`pygeneral` is a set of small Python utilities that can simplify common tasks.

- **`ProgressBar`** is a simple progress bar that can be used in the console.
- **`StdoutCounter`** provides a straightforward way to show progress in the console, incrementally updating a single line.
- **`is_root`** helps you check if the current user has root (on Linux/Unix) or administrator (on Windows) privileges.
- **`lensort`** sorts lines based on their distance to a match of a specified regular expression.

---

## Installation

```bash
pip install pygeneral
```

Or, for development:

```bash
# (1) Clone the repository
git clone https://github.com/BartSte/pygeneral.git
cd pygeneral
pip install -e ".[dev]"
```

---

## Usage

You can import the classes and functions from `pygeneral` as you normally would
with in a Python script. Additionally, some of the utilities are also available
as command-line tools. As is explained below.

### Lensort

After installation, you will have the `lensort` command available:

```bash
lensort [OPTIONS] <REGEX>
```

#### Example

Suppose you have a file named `input.txt`:

```
abc = 1
x = 2
yy = 3
```

If you run:

```bash
lensort '=' -f input.txt
```

The output will be:

```
x = 2
yy = 3
abc = 1
```

Explanation:

- It sorts lines by the number of characters before the `=` match.
- `x = 2` has 1 character before `=`.
- `yy = 3` has 2 characters before `=`.
- `abc = 1` has 3 characters before `=`.

You can also pipe content directly to `lensort`, for example:

```bash
cat input.txt | lensort '='
```

---

## License

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).  
See the [LICENSE](LICENSE) file for details.
phonon-to-json 0.0.4
Package for converting CASTEP .phonon files to .json files.
Requires Python: >=3.8

# phonon-to-json
Converts [CASTEP](http://www.castep.org/) .phonon files into .json files readable by [TSS Physics Phonon Visualiser](https://henriquemiranda.github.io/phononwebsite/phonon.html).

# Install
To install ```phonon-to-json``` run:
```
pip install phonon-to-json
```
# Dependencies
```phonon-to-json``` requires 
- [```castep-outputs```](https://pypi.org/project/castep-outputs/)
- [```spglib```](https://pypi.org/project/spglib/)
- ```numpy```

# Command line
```phonon-to-json``` is designed to be run as a command line tool. To run:
```
phonon_to_json [filename] [name] [formula]
```
- ```[filename]``` is the name of the .phonon file (excluding the .phonon extension)
- ```[name]``` is the name of the compound, as displayed at the top of the [website](https://henriquemiranda.github.io/phononwebsite/phonon.html)
- ```[formula]``` is the chemical formula of the compound

```[name]``` and ```[formula]``` are optional, if ommited ```[filename]``` will be used
# As a module
To use ```phonon-to-json``` as a module import ```json_dumper```:
```
import phonon_to_json as pj

filename = "[filename]"
name = "[name]"
formula = "[formula]"

r_data = pj.read_file(filename)
w_data = pj.read_to_write(r_data, name, formula)
pj.write_file(filename, w_data)
```
dvr-pdf 1.0.22
DvRD PDF generator
Requires Python: >=3.13
Keywords: PDF, generator

# README #

This README would normally document whatever steps are necessary to get your application up and running.

### What is this repository for? ###

* Quick summary
* Version
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)

### How do I get set up? ###

* Summary of set up
* Configuration
* Dependencies
* Database configuration
* How to run tests
* Deployment instructions

### Contribution guidelines ###

* Writing tests
* Code review
* Other guidelines

### Who do I talk to? ###

* Repo owner or admin
* Other community or team contact