Metadata-Version: 2.1
Name: framecat
Version: 0.1.6
Author-email: Simon le Cleac'h <simonlch.edu@gmail.com>
License: MIT License
        
        Copyright (c) 2023 Simon Le Cleac'h
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pytest>=7.4.2
Requires-Dist: pytest-cov>=4.1.0
Requires-Dist: pillow>=9.0.0

## FrameCat
[![build](https://github.com/simon-lc/framecat/actions/workflows/build.yml/badge.svg)](https://github.com/simon-lc/framecat/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/simon-lc/framecat/graph/badge.svg?token=CUWTT7EK5E)](https://codecov.io/gh/simon-lc/framecat)

**Use this tool to automate video and gif generation from (Meshcat-generated) frame sequences.**

### Install package
```
pip install framecat
```
### Install external libraries
**FFmpeg**
```
sudo apt update
sudo apt install ffmpeg
ffmpeg --version
```

**gifsicle**
```
sudo apt update
sudo apt install -y gifsicle
gifsicle --version
```

### Quick start
- Make sure you're not inside a Docker container.
- `cd` to the root folder `~/workspace/framecat`. 
```
user@username~/workspace/framecat$
```

#### `LATEST` mode
- execute the command in the `LATEST` input mode: 
```
python cli/render.py latest --output-names name1 name2
```
- this will pull the latest 2 `.tar` files created in the `--input-folder` (defaults to `~/Downloads`).
- rename the `.tar` files as `name1.tar` and `name2.tar`.
- create a video, a GIF and a lossy GIF for each `.tar` file. 
- store them in the `--output-folder` (defaults to `~/Videos/meshcat`).


#### `BY-NAME` mode
- execute the command in the `BY-NAME` input mode:
```
python cli/render.py ny-name --input-names in_name1 --output-names out_name1`
```
- this will pull the `in_name1.tar` file from the `--input-folder` (defaults to `~/Downloads`).
- rename the `.tar` file as `out_name1.tar`.
- create a video, a GIF and a lossy GIF for each `.tar` file. 
- store these in the `--output-folder` (defaults to `~/Videos/meshcat`).
