semvec/pypi-packages huggingface dataset:
tsstp 0.2.0
Template semi-structure text parser
Requires Python: >=3.9

# Templates Semi-Structured Text Parser 
tsstp is a Python module, the Template semi-structure text parser, which allows custom parsing of semi-structured text data using templates. tsstp was developed to enable programmatic access to semi-structured textual data generated by computational software in computational materials science, but it can be used to parse any semi-structured text that contains unique repetitive patterns, and can also be extended to other texts with special patterns and textual notation.

Unlike regular file-specific parsers that require only input data, tsstp takes two files as input - the data to be parsed and the parsing template - and returns a result structure with extracted information.

The same data can be parsed by different templates to produce results corresponding to the template. Templates are easy to create and users can define templates to extract data according to their needs and are encouraged to write their own ttp templates,through this way to achieve simple data reuse, catering to the FAIR principle.

## install

```
pip install tsstp
```

## how to use 

 ```python
from tsstp import DataTemplate

data_to_parse = """
 POSCAR\(4)
 3
1.00000000000000
  8.3879995346000005    0.0000000000000000    0.0000000000000000
  0.0000000000000000    8.3879995346000005    0.0000000000000000
  0.0000000000000000    0.0000000000000000   23.0000000000000000
O    Fe   Ni
 50    33     1
 Direct configuration= 1
 """

template = """
 {{ head }}
 {{ loop_num }}
 {{ Scaling }}
 {{ Coordinates1 }} ~ loop_num
 {{ Coordinates2 }} ~ 3
 {{ Coordinates3 }} ~ 3
 {{ elements }} ~ n
 {{ elements_num }} ~ n
 Direct configuration= {{ number }}
 """

# create parser object and parse data using template:
parser = DataTemplate(data=data_to_parse, template=template)
parser.parse()

# print result in JSON format
results = parser.result(format='json')
print(results)
{
 "head": "POSCAR\(4)",
 "loop_num": "3",
 "Scaling": "1.00000000000000",
 "Coordinates1": ["8.3879995346000005", "0.0000000000000000","0.0000000000000000"],
 "Coordinates2": ["0.0000000000000000", "8.3879995346000005", "0.0000000000000000"],
 "Coordinates3": ["0.0000000000000000", "0.0000000000000000", "23.0000000000000000"],
 "elements": ["O", "Fe", "Ni"],
 "elements_num": ["50", "33", "1"],
 "number": "1"
  }
 ```
satgpt 0.0.4
GPT for satellite mission planning. In development. Get your API keys ready!

# SatGPT

GPT for satellite mission planning. In development. Get your API keys ready!

SatGPT heavily leverages Shell GPT, a command-line UI for OpenAI's completion API, 
and its features for custom role creation (as of 04/16/2023). Currently for SatGPT to work,
we need to overwrite the default shell roll using the instructions below.

## Installation

1. Clone this repo. Installing from source will be more straightforward than PyPi install at this stage.

2. From inside repo root, install from source.

```
python -m pip install -e . 
```

3. Overwrite `shell-gpt` default `shell` role with `satgpt` alpha demo.

```
python src/satgpt/make_role.py
```
## Usage

1. Start the REPL in shell mode.

```
sgpt --shel --repl temp
```

2. Request a STAC search using natural language

```
>>> find all landsat 8&9 imagery over washington, DC in April 2023
```

3. Request edits or additional steps

```
>>> pipe the results to stacterm cal
```

4. Try other things!
Version 0.0.4:
- Moved role creation to manual script run
- Populated README with basic usage

Version 0.0.3:
- Fixed custom role creation for satgpt to grab target machine os/ shell
- Added pystac as install dependency for demos
- Added this CHANGELOG

Version 0.0.2:
- Integrated shell-gpt as a dependency using the custom role feature released in version 0.9.0