open-index/open-npm huggingface dataset:
npm package: @lerypapa/clean-text
Description: Batch process text files using OpenAI API to clean and transform content
Latest version: 1.0.0

# Clean Text

A TypeScript-based command-line tool that helps batch process text files using OpenAI API to remove or keep content according to user-provided examples.

## Features

* Written in TypeScript for type safety and better development experience
* Supports batch processing of multiple text files
* Flexible content transformation based on user examples
* Configurable OpenAI model settings
* Command-line interface for easy usage

## Installation

1. Clone the repository
2. Install dependencies:

```bash
yarn install
```

3. Copy `.env.example` to `.env` and add your OpenAI API key:

```bash
cp .env.example .env
```

4. Build the project:
```bash
yarn build
```


## Usage

Basic usage:
```bash
yarn start -- -i <input-path> -o <output-path> -e <example-file>
```

Options:
- `-i, --input <path>`: Input directory or file (required)
- `-o, --output <path>`: Output directory (required)
- `-e, --example <path>`: Example file for processing instructions
- `-c, --config <path>`: Custom configuration file path

Example:

```bash
yarn start -- -i ./input-files -o ./output -e ./example.txt
```

This command will process all text files in the `input-files` directory and save the cleaned content to the `output` directory. The `example.txt` file contains the processing instructions for the tool.


## Configuration

You can customize the behavior by creating a config file (JSON):

```json
{
"model": "gpt-4-turbo-preview",
"maxTokens": 2000,
"temperature": 0.3
}
```

This config file will override the default settings in the `loadConfig` function.


## Development

- Run in development mode:

```bash
yarn dev
```

- Run tests:

```bash
yarn test
```

- Lint code:

```bash
npm run lint
```

## Project Structure

clean-text/
├── src/
│ ├── index.ts # Entry point
│ ├── processor.ts # Text processing logic
│ ├── config.ts # Configuration management
│ └── types.ts # TypeScript interfaces
├── dist/ # Compiled JavaScript
├── .env # Environment variables
└── package.json


## Requirements

- Node.js 16 or higher
- OpenAI API key
- TypeScript 5.x

## License

MIT
npm package: @lerypapa/html2markdown
Description: A tool to download HTML from URLs and convert it to Markdown
Author: Your Name
Latest version: 1.0.1

# html2markdown

A Node.js tool to download HTML from URLs and convert it to Markdown format.

## Features

- Download HTML content from any URL
- Convert HTML to clean Markdown format
- Automatically removes script tags and their contents
- Customizable output filename
- Can be used as a CLI tool or as a module

## Installation

```bash
npm install -g @lerypapa/html2markdown
# or
yarn global add @lerypapa/html2markdown
```

## Usage

### As a CLI tool

Basic usage (auto-generated filename):
```bash
html2md https://example.com
```

Specify output filename:
```bash
html2md https://example.com output.md
```

The first command will:
1. Download the HTML from the URL
2. Convert it to Markdown
3. Save it to an auto-generated file (e.g., `example-com-20231024123456.md`)
4. Print the filename where the Markdown was saved

The second command will save the output to the specified file (`output.md`).

### As a Module

Basic usage (auto-generated filename):
```javascript
const html2markdown = require('@lerypapa/html2markdown');

html2markdown('https://example.com')
    .then(markdown => {
        console.log('Conversion complete!');
    })
    .catch(error => {
        console.error('Error:', error.message);
    });
```

Specify output filename:
```javascript
html2markdown('https://example.com', 'output.md')
    .then(markdown => {
        console.log('Conversion complete!');
    })
    .catch(error => {
        console.error('Error:', error.message);
    });
```

## License

MIT
npm package: @les-desesperes/ensto-db
Description: Sequelize database module and model manager for Ensto
Author: Les Désespérés
Latest version: 1.1.9

# @les-desesperes/ensto-db

[![npm version](https://img.shields.io/npm/v/@les-desesperes/ensto-db.svg)](https://www.npmjs.com/package/@les-desesperes/ensto-db)
[![license](https://img.shields.io/npm/l/@les-desesperes/ensto-db.svg)](./LICENSE)
[![GitHub](https://img.shields.io/badge/github-Les--Desesperes%2Fensto__database__module-blue?logo=github)](https://github.com/Les-Desesperes/ensto_database_module)

Sequelize-based database module for Ensto applications.

It provides:
- an `EnstoDatabase` class for connection lifecycle and model management
- built-in Ensto models with associations
- dynamic model registration and schema-based model creation
- a singleton `sequelize` export for compatibility
- crypto helpers for hashing and AES encryption/decryption

## Installation

```bash
pnpm add @les-desesperes/ensto-db
```

## Documentation

Detailed usage documentation is available in [`docs/USAGE.md`](./docs/USAGE.md).

## Quick Start

```ts
import { EnstoDatabase } from '@les-desesperes/ensto-db';

async function main() {
  const db = new EnstoDatabase();

  await db.authenticate();
  await db.sync();

  const employee = await db.models.Employee.create({
    username: 'admin',
    badgeUuid: 'B053AF25',
    passwordHash: 'plain-password',
    role: 'Admin',
  });

  console.log(employee.employeeId);

  await db.close();
}

main().catch(console.error);
```

## Main Exports

```ts
import {
  EnstoDatabase,
  sequelize,
  createSequelizeInstance,
  getEnvDatabaseConfig,
  initModels,
  Employee,
  DeliveryDriver,
  Vehicle,
  Visitor,
  HistoryLog,
  encryptAES,
  decryptAES,
  hashSHA256,
} from '@les-desesperes/ensto-db';
```

## Built-in Models

- `Employee`
- `DeliveryDriver`
- `Vehicle`
- `Visitor`
- `HistoryLog`

## Dynamic Models

```ts
import { DataTypes } from 'sequelize';
import { EnstoDatabase } from '@les-desesperes/ensto-db';

const db = new EnstoDatabase();

const Contractor = db.createModel(
  'Contractor',
  {
    contractorId: {
      type: DataTypes.INTEGER.UNSIGNED,
      autoIncrement: true,
      primaryKey: true,
    },
    companyName: {
      type: DataTypes.STRING,
      allowNull: false,
    },
  },
  {
    tableName: 'contractors',
    timestamps: false,
  }
);
```

## Environment Variables

```env
MYSQL_DATABASE=ensto
MYSQL_USER=root
MYSQL_PASSWORD=secret
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
ENCRYPTION_KEY=your-32-byte-secret-key-string!!
```

## Development

```bash
pnpm install
pnpm run build
pnpm test
```

## Publish Notes

This release includes the new `EnstoDatabase` API and dynamic model support.
See the full guide in [`docs/USAGE.md`](./docs/USAGE.md) before publishing.
npm package: @les-roberts/api_gateway_generator
Description: This is a simple cli to generate your project and generating your routes to perfectly communicate with the api-gateway
Author: Clément Ribourt
Latest version: 1.0.7

# Initialise your project and add some routes

This is a simple cli to generate your project and generating your routes to perfectly communicate with the api-gateway

## Installation


First install the dependencie
```bash
$ npm i -g @les-roberts/api_gateway_generator
```

Install all dependencies
```bash
$ npm i
```

## Usage


```bash
$ api_gateway_generator <command>
```

First generate the project with :

```bash
$ api_gateway_generator init

√ Enter server port · 5000

Loaded templates: PATH_TO_NODE_MODULE\@les-roberts\api_gateway_generator\_templates
      added: src/config/routerConfig.ts
      added: src/main.ts
      added: package.json
      added: src/config/serverConfig.ts
      added: tsconfig.json
```

And then to generate your route :

```bash
$ api_gateway_generator route

√ Enter the name of the Route you want to create · user
√ Type host (you can add more later in routerConfig.ts) · http://localhost:3009
√ What strategy do you want to use ? · round-robin

Loaded templates: PATH_TO_NODE_MODULE\@les-roberts\api_gateway_generator\_templates
      inject: src/config/routerConfig.ts
```

You can launch your app with :

```bash
$ npm run start

> lesrobertsframework@1.0.0 start PATH_TO_PROJECT/PROJECT
> ts-node src/main.ts

App listenning on port : 8000
```
npm package: @les3dev/capacitor-bundle-path
Description: Retrieve the file system path to a bundled asset, or undefined if the asset is not found
Latest version: 1.0.0

# @les3dev/capacitor-bundle-path

Retrieve the file system path to a bundled asset, or `undefined` if the asset is not found.

## Install

<docgen-install>

<!--INSTALL_TABS_START-->

> **npm**
>
> ```bash
> npm install @les3dev/capacitor-bundle-path
> npx cap sync
> ```

> **pnpm**
>
> ```bash
> pnpm add @les3dev/capacitor-bundle-path
> pnpm exec cap sync
> ```

> **bun**
>
> ```bash
> bun add @les3dev/capacitor-bundle-path
> bunx cap sync
> ```

<!--INSTALL_TABS_END-->

</docgen-install>

<!--DOCGEN_INSTALL_END-->

## API

<docgen-index>

* [`get_path(...)`](#get_path)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### get_path(...)

```typescript
get_path(options: { path: string; }) => any
```

| Param         | Type                           |
| ------------- | ------------------------------ |
| **`options`** | <code>{ path: string; }</code> |

**Returns:** <code>any</code>

--------------------

</docgen-api>

## Usage

```typescript
import { BundlePath } from '@les3dev/capacitor-bundle-path';

const result = await BundlePath.get_path({ path: 'assets/myfile.json' });

if (result.path) {
  console.log('Native path:', result.path);
} else {
  console.warn('Asset not found');
}
```
npm package: @les3dev/catch_error
Description: A tiny helper that turns thrown errors into values you can branch on
Author: les3dev
Latest version: 1.0.0

# catch_error

A tiny helper inspired by Rust's `Result` type that turns thrown errors into values you can branch on — concise control flow, zero ceremony.

![](./thumbnail.png)

## Why use this

- Avoid try/catch weird control flow
- Forces to handle errors before accessing returned values
- Treat errors as values (like `Result`), so you can use normal control flow to handle them.
- Works with both synchronous functions and promises (returns a promise when given one).

## What it does

The `catch_error` helper runs a sync function or accepts a `Promise` and returns either the successful value or an `Error` instance with a TypeScript union type. Instead of throwing, failures are returned so callers can check `instanceof Error` and handle errors inline.

> See the implementation in [catch_error.ts](catch_error.ts).

## API

- `catch_error(fn: () => T): T | Error` — runs `fn` and returns either the value or an `Error`.
- `catch_error(promise: Promise<T>): Promise<T | Error>` — returns a promise that resolves to either the value or an `Error`.

Errors that are not `Error` instances are wrapped in a fallback `Error` with a helpful message.

## Examples

Sync example:

```ts
import {catch_error} from "./catch_error"; // or from the published package

function parseIntStrict(s: string) {
    if (!/^-?\d+$/.test(s)) throw new Error("not an integer");
    return Number(s);
}

const result = catch_error(() => parseIntStrict("42"));
if (result instanceof Error) {
    // handle error
    console.error("Failed to parse:", result.message);
} else {
    // use value
    console.log("value is", result);
}
```

Async example:

```ts
import {catch_error} from "./catch_error";

const valueOrErr = await catch_error(fetch_data());
if (valueOrErr instanceof Error) {
    // handle error
    console.error("fetch failed", valueOrErr);
} else {
    console.log("data", valueOrErr);
}
```

Custom error example:

```ts
class NotFoundError extends Error {
    constructor(message: string, body: any) {
        super(message);
        this.name = "NotFoundError";
        this.status = 404;
        this.body = body;
    }
}
const result = await catch_error(async () => {
    const res = await fetch("https://les3.dev/not_found");
    if (res.status === 404) {
        throw NotFoundError("page not found", await res.json());
    }
    return await res.json();
});
if (result instanceof NotFoundError) {
    console.log(result.status, result.message, result.body);
} else if (result instanceof Error) {
    console.log("Unknown error: ", result.message);
} else {
    console.log("Success: ", result);
}
```

> See the tests in [catch_error.test.ts](catch_error.test.ts) for more usage examples
npm package: @lescovex/sushi-lucas-sdk
Description: 🛠 An SDK for building applications on top of SushiSwap.
Latest version: 1.0.1

# Sushiswap SDK

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).

This modifies uniswap-sdk's UniswapV2Factory address. The new address for sushiswap is  `0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac`.

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/sushiswap/sushiswap-sdk.git
```

Move into the sushiswap-sdk working directory

```sh
cd sushiswap-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @lescovex/sushi-sdk
Description: 🛠 An SDK for building applications on top of SushiSwap.
Latest version: 1.0.5

# Sushiswap SDK

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).

This modifies uniswap-sdk's UniswapV2Factory address. The new address for sushiswap is  `0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac`.

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/sushiswap/sushiswap-sdk.git
```

Move into the sushiswap-sdk working directory

```sh
cd sushiswap-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @lescovex/v2-sdk
Description: 🛠 An SDK for building applications on top of Uniswap V2
Latest version: 1.0.3

# Uniswap V2 SDK

[![Unit Tests](https://github.com/Uniswap/uniswap-v2-sdk/workflows/Unit%20Tests/badge.svg)](https://github.com/Uniswap/uniswap-v2-sdk/actions?query=workflow%3A%22Unit+Tests%22)
[![Lint](https://github.com/Uniswap/uniswap-v2-sdk/workflows/Lint/badge.svg)](https://github.com/Uniswap/uniswap-v2-sdk/actions?query=workflow%3ALint)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![npm version](https://img.shields.io/npm/v/@uniswap/v2-sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/v2-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/v2-sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/v2-sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).
npm package: @lescovex/v3-sdk
Description: The latest version of the SDK is used in production in the Uniswap Interface, but it is considered Alpha software and may contain bugs or change significantly between patch versions. If you have questions about how to use the SDK, please reach out in the 
Latest version: 1.0.1

# Alpha software

The latest version of the SDK is used in production in the Uniswap Interface,
but it is considered Alpha software and may contain bugs or change significantly between patch versions.
If you have questions about how to use the SDK, please reach out in the `#dev-chat` channel of the Discord.
Pull requests welcome!

# Uniswap V3 SDK

[![Unit Tests](https://github.com/Uniswap/uniswap-v3-sdk/workflows/Unit%20Tests/badge.svg)](https://github.com/Uniswap/uniswap-v3-sdk/actions?query=workflow%3A%22Unit+Tests%22)
[![Lint](https://github.com/Uniswap/uniswap-v3-sdk/workflows/Lint/badge.svg)](https://github.com/Uniswap/uniswap-v3-sdk/actions?query=workflow%3ALint)
[![npm version](https://img.shields.io/npm/v/@uniswap/v3-sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/v3-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/v3-sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/v3-sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://docs.uniswap.org/).