Skip to content

Commit

Permalink
Merge pull request #2 from recoskyler/recoskyler-dev
Browse files Browse the repository at this point in the history
Documentation and UI
  • Loading branch information
recoskyler authored Sep 2, 2023
2 parents e7e4724 + a432d1d commit be71980
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 18 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ pip-selfcheck.json

*.xlsx
*.xlsm
*.xltx
*.xltm
*.ods

SheetGPT
*.AppImage
82 changes: 68 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,66 @@
# SheetGPT

<img src="https://github.com/recoskyler/sheetGPT/blob/main/icon.png" data-canonical-src="https://github.com/recoskyler/sheetGPT/blob/main/icon.png" width="128" height="128" />
<img src="https://github.com/recoskyler/sheetGPT/blob/main/assets/icon.png" data-canonical-src="https://github.com/recoskyler/sheetGPT/blob/main/assets/icon.png" width="128" height="128" />

A visual tool for completing a specific column/row using the data from other columns/rows in a XLSX/XLSM file utilizing ChatGPT.

<img src="https://github.com/recoskyler/sheetGPT/blob/main/assets/screenshot-1.png" data-canonical-src="https://github.com/recoskyler/sheetGPT/blob/main/assets/screenshot-1.png" />

<img src="https://github.com/recoskyler/sheetGPT/blob/main/assets/screenshot-2.png" data-canonical-src="https://github.com/recoskyler/sheetGPT/blob/main/assets/screenshot-2.png" />

## Example

### Input table

On "**Sheet A**"

|Row v/Column >|A|B|C|D|
|--:|--:|:-:|--:|--:|
|**1**|**Release Year**|**Game**|**Character 1**|**Character 2**|
|**2**|*1996*| |*Mario*|*Peach*|
|**3**|*2015*|*SOMA*|*Simon Jarrett*|*Catherine Chun*|
|**4**|*2017*| |*Link*|*Zelda*|
|**5**|*2018*| |*Madeline*|*Theo*|
``
### SheetGPT configuration

|Setting|Value|
|---|--|
|**Sheet**|`Sheet A`|
|**Input columns**|`a,c,d`|
|**Input starting position**|`2`|
|**Input ending**|`5`|
|**Output column**|`B`|
|**Output row**|`2`|
|**Output placement**|`Place on the next row`|
|**ChatGPT Model**|`gpt-3.5-turbo-16k`|
|**OpenAI API Key**|`<MY API KEY>`|
|**System Prompt**|`You are a helpful assistant. You give only the answer, without forming a sentence. If you are not sure, try guessing. If you are still unsure about the answer, output '?'. If you don't know the answer, or if you cannot give a correct answer output '?'.`|
|**Prompt**|`What is the game with the characters $1 and $2, released in $0? Output only the name of the game. If you are unsure, or you don't know, output a question mark "?"`|
|**Skip existing results**|`Enabled`|
|**Processing limit**|`2`|

### Output table

|Row v/Column >|A|B|C|D|
|--:|--:|:-:|--:|--:|
|**1**|**Release Year**|**Game**|**Character 1**|**Character 2**|
|**2**|*1996*|Super Mario 64|*Mario*|*Peach*|
|**3**|*2015*|*SOMA*|*Simon Jarrett*|*Catherine Chun*|
|**4**|*2017*|The Legend of Zelda: Breath of the Wild|*Link*|*Zelda*|
|**5**|*2018*| |*Madeline*|*Theo*|

*As you can see, the last row was not completed as the* "**Processing limit**" *was set to* `2`

## Status

Still in development, but can be used.
**Stable**, can be used.

**DO NOT FORGET TO BACK UP YOUR DATA BEFOREHAND**, even though a separate output file is being created, it is best to be safe.

## Usage

1. Go to releases, and download the latest executable suitable for your platform.
1. [Download the latest release](https://github.com/recoskyler/sheetGPT/releases/latest) suitable for your platform.
2. Launch the executable.
3. Choose an input file.
4. Choose an output file.
Expand Down Expand Up @@ -48,7 +98,7 @@ Still in development, but can be used.
2. Create a new virtual environment:

```bash
python3 -m venv env
python -m venv env
```

3. Activate the virtual environment:
Expand All @@ -62,25 +112,25 @@ Still in development, but can be used.
- Windows (Powershell)

```ps1
env/Scripts/Activate.ps1
.\env\Scripts\Activate.ps1
```

- Windows (CMD)

```cmd
env/Scripts/activate.bat
.\env\Scripts\activate.bat
```

4. Install dependencies:

```bash
pip3 install -r requirements.txt
pip install -r requirements.txt
```

5. Run the script:

```bash
python3 main.py
python main.py
```

Or to use hot-reload
Expand All @@ -91,20 +141,24 @@ Still in development, but can be used.

### Packaging

#### Executable
Executable will be created for your platform (for MacOS if you run it on MacOS, for Windows if you run it on Windows...).

Executable will be created for your platform (for Linux if you run it on Linux, for Windows if you run it on Windows...).
#### MacOS Executable

```bash
flet pack main.py --icon icon.png --name SheetGPT --add-data "modules:modules"
flet pack main.py --icon assets/icon.png --name SheetGPT --product-name SheetGPT --product-version v1.0.1 --copyright MIT --bundle-id com.recoskyler.sheetgpt --add-data "assets:assets"
```

#### AppImage
#### Windows Executable

```bat
flet pack main.py --icon assets\icon.png --name SheetGPT --product-name SheetGPT --product-version v1.0.1 --file-version v1.0.1 --file-description SheetGPT --copyright MIT --add-data "assets;assets"
```

An AppImage will be created to be used with Linux.
#### Linux Executable

```bash
ezpyi -A -i icon.png main.py SheetGPT
flet pack main.py --icon assets/icon.png --name SheetGPT --add-data "assets:assets"
```

## [LICENSE](https://github.com/recoskyler/sheetGPT/blob/main/LICENSE)
Expand Down
File renamed without changes
Binary file added assets/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,13 +1034,19 @@ def start_processing(e):
[
ft.Column(
controls=[
ft.Image(
src=f"/icon.png",
width=64,
height=64,
fit=ft.ImageFit.CONTAIN,
),
ft.Text(
"SheetGPT",
style=ft.TextThemeStyle.HEADLINE_MEDIUM,
text_align=ft.TextAlign.CENTER
),
)
],
horizontal_alignment=ft.CrossAxisAlignment.STRETCH,
horizontal_alignment=ft.CrossAxisAlignment.STRETCH
),
ft.Text("File configuration", style=ft.TextThemeStyle.TITLE_LARGE),
ft.Text("Input file", style=ft.TextThemeStyle.TITLE_MEDIUM),
Expand Down Expand Up @@ -1148,4 +1154,4 @@ def start_processing(e):

page.add(root_container)

ft.app(target=main)
ft.app(target=main, assets_dir="assets")

0 comments on commit be71980

Please sign in to comment.