Metadata-Version: 2.1
Name: cm2util
Version: 0.0.2
Summary: A collection of utility modules to aid in the creation of Circuit Maker 2 builds.
Project-URL: Homepage, https://github.com/triducal/cm2util
Project-URL: Issues, https://github.com/triducal/cm2util/issues
Author-email: Triducal <triducalrl@gmail.com>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Requires-Dist: cm2py
Requires-Dist: numpy
Requires-Dist: pillow
Requires-Dist: requests
Description-Content-Type: text/markdown

# cm2util

**cm2util** is a collection of utility modules to aid in the creation of Circuit Maker 2 builds. New modules and features are still being added.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install cm2util.

```bash
pip install cm2util
```

## Documentation

### Image

```python
from cm2util import Image

image = Image("path/to/image", size=50)

print(image.raw) #savecode
print(image.link) #dpaste link containing savecode
```

### Memory

```python
from cm2util import Memory
```

### Circuit

```python
from cm2util import Circuit

circuits = Circuit()

@circuits.build
def Mux(D0, D1, s):

    not1 = circuits.NOT(s)
    and1 = circuits.AND(D0, not1)
    and2 = circuits.AND(D1, s)
    or1 = circuits.OR(and1, and2)

    output = or1
    return output

saveCode = circuits.export(Mux)
print(saveCode)
```

### Compress

```python
from cm2util import Compress

dpaste_link = Compress(saveCode)
print(dpaste_link)
```

## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

[MIT](https://choosealicense.com/licenses/mit/)