An open API service indexing awesome lists of open source software.

https://github.com/1998code/swift2html

Convert Swift Code to HTML with GPT Codex (OpenAI)
https://github.com/1998code/swift2html

codex gpt html openai swift swiftui

Last synced: 3 months ago
JSON representation

Convert Swift Code to HTML with GPT Codex (OpenAI)

Awesome Lists containing this project

README

          

# Swift2HTML - Convert Swift code to HTML
### Powered by OpenAI GPT Codex

Xnapper-2022-12-17-18 38 56

## Supported Frameworks
![image](https://user-images.githubusercontent.com/54872601/208244837-4fa0e73e-d2ed-4194-a586-564c67d21a7e.png)

## Features
- [x] Swift Input
- [x] HTML Output
- [x] HTML Preview
- [x] Light / Dark Mode
- [x] AutoPilot (Refresh per input) / Manual Update (Default)
- [x] FontAwesome Icon Replacement
- [x] OpenAI GPT Codex Integration
- [ ] Select CSS Framework (Reserved)

## Getting Started
First, run the development server:

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/openai](http://localhost:3000/api/openai). This endpoint can be edited in `pages/api/openai.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## Dark Mode
CleanShot 2022-12-17 at 21 26 41@2x

### Comment Available
CleanShot 2022-12-17 at 21 27 40@2x

## Limitation
- Accuracy and generation may be various in every trial.
- Incorrect conversion to Pixel, e.g., width: 300 => w-300, where suppose only w-[300px] can work fine. Of course, the scaling is incorrect too.
- Limited tokens.

## License
MIT