Skip to content

Commit

Permalink
Merge pull request #3 from cqb13/standardize
Browse files Browse the repository at this point in the history
Standardize
  • Loading branch information
cqb13 authored Jul 8, 2024
2 parents cc4dbe7 + 0908423 commit f288c6f
Show file tree
Hide file tree
Showing 64 changed files with 10,876 additions and 15,480 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Run tests
run: cargo test --verbose

- name: Add rustup default target
run: rustup target add ${{ matrix.target }}

Expand All @@ -61,28 +64,28 @@ jobs:
run: |
choco install zip
cd target/${{ matrix.target }}/release
zip ti-tools-0.1.2-${{ matrix.target }}.zip ti-tools.exe
zip ti-tools-0.1.3-${{ matrix.target }}.zip ti-tools.exe
cd ../../..
- name: Create tar.gz file on macOS
if: ${{ matrix.os == 'macos-latest' }}
run: |
chmod +x target/${{ matrix.target }}/release/ti-tools
tar -zcf target/${{ matrix.target }}/release/ti-tools-0.1.2-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release ti-tools
tar -zcf target/${{ matrix.target }}/release/ti-tools-0.1.3-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release ti-tools
chmod +x target/${{ matrix.target2 }}/release/ti-tools
tar -zcf target/${{ matrix.target2 }}/release/ti-tools-0.1.2-${{ matrix.target2 }}.tar.gz -C target/${{ matrix.target2 }}/release ti-tools
tar -zcf target/${{ matrix.target2 }}/release/ti-tools-0.1.3-${{ matrix.target2 }}.tar.gz -C target/${{ matrix.target2 }}/release ti-tools
- name: Create tar.gz file on Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
chmod +x target/${{ matrix.target }}/release/ti-tools
tar -zcf target/${{ matrix.target }}/release/ti-tools-0.1.2-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release ti-tools
tar -zcf target/${{ matrix.target }}/release/ti-tools-0.1.3-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release ti-tools
- name: Upload release and assets to GitHub
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: "release-0.1.2-${{ github.run_number }}"
release_name: ti-tools 0.1.2
tag: "release-0.1.3-${{ github.run_number }}"
release_name: ti-tools 0.1.3
file_glob: true
file: target/*/release/ti-tools-0.1.2-*.{zip,tar.gz}
file: target/*/release/ti-tools-0.1.3-*.{zip,tar.gz}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
.DS_Store
.DS_Store
.vscode
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/tokens/standard_tokens"]
path = src/tokens/standard_tokens
url = https://github.com/TI-Toolkit/tokens/tree/built
84 changes: 83 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ti-tools"
version = "0.1.2"
version = "0.1.3"
edition = "2021"
authors = ["cqb13 <cqb13.dev@gmail.com>"]
license = "MIT"
Expand All @@ -14,3 +14,5 @@ categories = ["command-line-utilities"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
90 changes: 88 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,95 @@
# TI Tools

A CLI tool to convert 8xp files to text and back.
TI Tools is a CLI tool designed for converting 8xp files (used by TI-83 and TI-84 calculators) to text files and vice versa. It also supports various other features for working with 8xp files.

## This project would not be possible without the help of the following:
## Acknowledgments

This project would not be possible without the help of the following:

- [TI Toolkit Token Sheet](https://github.com/TI-Toolkit/tokens)
- [TI Basic Developer Wiki](http://tibasicdev.wikidot.com/tokens)
- [TI-83+ Link Protocol Guide v1.1](https://merthsoft.com/linkguide/ti83+/fformat.html)

## Installation

### Build from Source

Clone the repository and build the project using [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html):

```sh
git clone https://github.com/cqb13/ti-tools.git
cd ti-tools
cargo build --release
# The binary will be located at target/release/ti-tools
```

To add the binary to your PATH, run:

```sh
cargo install --path .
```

### Pre-built Binaries

Pre-built binaries are available for Windows, macOS, and Linux on the [releases page](https://github.com/cqb13/ti-tools/releases).

## Usage

```sh
ti-tools [COMMAND] [OPTIONS]
```

## Commands

```
help
Prints help information
<COMMAND> A command to help with
version
Prints version information
decode
Converts 8xp to txt
<INPUT> The input path to an 8xp file
-o --output <OUTPUT> The output path to a txt file
-d --display-mode <DISPLAY_MODE> The characters to translate the tokens to [pretty, accessible, ti] | Default: accessible
-m --model <MODEL> The model of calculator (use models command to see the supported models) | Default: latest
-c --content <> Display the content of the input file
-p --preview <> Preview the output file in the terminal
encode
Converts txt to 8xp
<INPUT> The input path to an 8xp file
-o --output <OUTPUT> The output path to a 8xp file
-m --model <MODEL> The model of calculator (use models command to see the supported models) | Default: latest
-c --content <> Display the content of the input file
-p --preview <> Preview the output file in the terminal
rename
Renames the program name in a 8xp file
<INPUT> The input path to an 8xp file
-n --name <NAME> New program number (8 or less uppercase alphabetic characters)
-f --new-file <> Create a new file with the same name as the program
-d --delete-old <> Delete the old file
models
Prints the supported TI calculator models
```

## Examples

### Decode

```sh
ti-tools decode ./src/tests/programs/TOCCATA.8xp -p -c -o ./TOCCATA.txt
```

### Encode

```sh
ti-tools encode ./TOCCATA.txt -p -c -o ./TOCCATA.8xp
```

## Contributing

Contributions are welcome! Feel free to fork this repository and submit pull requests.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Loading

0 comments on commit f288c6f

Please sign in to comment.