Skip to content

petelouise/purr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purr

Installation

Prerequisites

  • Python 3.7 or higher

Using Poetry

Install dependencies using Poetry.

poetry install

Build. poetry build

Install. pip install -e .

Add to PATH

Make sure to add the purr executable to your system's PATH, or you can use it directly from the repository folder.

Usage

The general syntax to run a script is:

purr <clump> <script> [script_args]

Examples

# Run the 'mirror' script from the 'image' clump with sample.jpg and --east flag
purr image mirror sample.jpg --east

Development Notes

Running the App in Development

  1. Open a terminal and navigate to the project directory.
  2. Activate the Poetry environment.
    poetry shell
  3. Run the application.
    python main.py [arguments]

Dependency Management

Dependencies are managed via Poetry. To add a new dependency:

poetry add <package_name>

Script and Clump Dependencies

If a script or a clump has specific dependencies, consider creating a separate pyproject.toml under that clump or script folder for better dependency isolation.

How to Add New Scripts

  1. Create a new folder under the appropriate "clump" inside ./clumps/.
  2. Add an entry.py file, which will serve as the entry point for your script.
  3. Implement your script in entry.py.

Example folder structure:

- clumps/
  - image/
    - mirror/
      - entry.py

Example entry.py:

import typer

def main(image_path: str, east: bool = typer.Option(False, '--east')):
    # Your script logic here

if __name__ == '__main__':
    typer.run(main)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published