Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
image:
required: true
type: string
wasm-artifacts-path:
required: true
type: string
secrets:
ALGOLIA_APP_ID:
required: true
Expand All @@ -29,7 +32,18 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

- name: Install Dependendencies
run: pnpm --filter docs install
run: pnpm install

- name: Download WASM artifacts
if: ${{ inputs.wasm-artifacts-path }}
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: wasm-build
path: ${{ inputs.wasm-artifacts-path }}

- name: Build packages/js
# Only build for browser since that is all we need here
run: pnpm -F img2num build:browser

- name: Build Docusaurus
env:
Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/build-react-app.yml

This file was deleted.

12 changes: 3 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,14 @@ jobs:
with:
image: ${{ needs.set-image.outputs.image }}

build-react-app:
name: Build React App
uses: ./.github/workflows/build-react-app.yml
needs: [set-image, cmake-build]
with:
image: ${{ needs.set-image.outputs.image }}
wasm-artifacts-path: packages/js/build-wasm/

# Docs now builds react app internally
build-docs:
name: Build Documentation Site
uses: ./.github/workflows/build-docs.yml
needs: [set-image]
needs: [set-image, cmake-build]
with:
image: ${{ needs.set-image.outputs.image }}
wasm-artifacts-path: packages/js/build-wasm/
secrets:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
Expand Down
26 changes: 7 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,24 @@ jobs:
uses: ./.github/workflows/cmake-build.yml
with:
image: ${{ needs.setup.outputs.image }}
build-react-app:
name: Build React App
uses: ./.github/workflows/build-react-app.yml
needs: [cmake-build, wait-for-image, setup]
with:
wasm-artifacts-path: packages/js/build-wasm/
image: ${{ needs.setup.outputs.image }}

build-docs:
name: Build Documentation Site
needs: [wait-for-image, setup]
uses: ./.github/workflows/build-docs.yml
with:
image: ${{ needs.setup.outputs.image }}
wasm-artifacts-path: packages/js/build-wasm/
secrets:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }}

deploy:
name: Deploy site to GH Pages
needs: [build-react-app, build-docs, wait-for-image]
needs: [build-docs, wait-for-image]
runs-on: ubuntu-latest
steps:
- name: Download React build artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: react-build
path: ./new-react-build

- name: Download Docs build artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
Expand All @@ -67,12 +56,11 @@ jobs:

- name: Prepare built assets
run: |
mkdir -p ./new-build/info
mkdir -p ./new-build
# We could just mv, but cp keeps the structure and works like a log for debugging if necessary
cp -r ./new-react-build/* ./new-build
cp -r ./new-docs-build/* ./new-build/info
cp -r ./new-docs-build/* ./new-build

- name: Deploy React App
- name: Deploy Website
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -81,4 +69,4 @@ jobs:
user_email: "github-actions[bot]@users.noreply.github.com"

- name: Clean temp folders
run: rm -rf ./new-react-build ./new-docs-build
run: rm -rf ./new-docs-build
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,5 @@ packages/py

docs/.docusaurus
docs/build/
docs/static/js/api.json
docs/static/docs
docs/static/*
docs/docs/js/api/
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Want to contribute to Img2Num? There are a few things you need to know.

We wrote a [contribution guide](https://ryan-millard.github.io/Img2Num/info/docs/contributing) to help you get started.
We wrote a [contribution guide](https://ryan-millard.github.io/Img2Num/docs/contributing) to help you get started.

**A few important points:**

Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ It converts raster images (like PNGs and JPGs) into clean SVGs with _high accura
[![Stars](https://img.shields.io/github/stars/Ryan-Millard/Img2Num?style=social)](https://github.com/Ryan-Millard/Img2Num)
[![Docker Pulls](https://img.shields.io/docker/pulls/ryanmillard/img2num-dev)](https://hub.docker.com/repository/docker/ryanmillard/img2num-dev/general)
[![Open in Codespaces](https://img.shields.io/badge/-Open%20in%20Codespaces-black?logo=github)](https://codespaces.new/Ryan-Millard/Img2Num)
[![Docs](https://img.shields.io/badge/docs-full-blue?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/)
[![Changelog](https://img.shields.io/badge/changelog-full-orange?logo=git&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/changelog/)
[![Docs](https://img.shields.io/badge/docs-full-blue?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/)
[![Changelog](https://img.shields.io/badge/changelog-full-orange?logo=git&logoColor=white)](https://ryan-millard.github.io/Img2Num/changelog/)

## Contents

Expand Down Expand Up @@ -58,7 +58,7 @@ It converts raster images (like PNGs and JPGs) into clean SVGs with _high accura

### What are you waiting for?

Try our [image to color-by-number demo](https://ryan-millard.github.io/Img2Num/)!
Try our [image to color-by-number demo](https://ryan-millard.github.io/Img2Num/example-apps/react-js/)!

</div>

Expand Down Expand Up @@ -99,29 +99,29 @@ Try our [image to color-by-number demo](https://ryan-millard.github.io/Img2Num/)

| Language | Package Info |
|-----------:|:------------|
| <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=bindings-c"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/c/c-original.svg" width="30" /></a> | <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=bindings-c"><img src="https://img.shields.io/badge/GitHub_Releases-C_Bindings-A8B9CC?logo=github" /></a> [![Docs](https://img.shields.io/badge/docs-C-A8B9CC?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/c/) [![C Changelog](https://img.shields.io/badge/changelog-C-A8B9CC?logo=c)](https://ryan-millard.github.io/Img2Num/info/changelog/c/) |
| <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=cpp"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/cplusplus/cplusplus-original.svg" width="30" /></a> | <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=cpp"><img src="https://img.shields.io/badge/GitHub_Releases-C++-00599C?logo=github" /></a> [![Docs](https://img.shields.io/badge/docs-C++-00599C?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/cpp/) [![C++ Changelog](https://img.shields.io/badge/changelog-C%2B%2B-00599C?logo=c%2B%2B&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/changelog/cpp/) |
| <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=packages-js"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/javascript/javascript-original.svg" width="30" /></a> | [![npm](https://img.shields.io/npm/v/img2num?logo=npm)](https://www.npmjs.com/package/img2num) ![Downloads](https://img.shields.io/npm/dm/img2num?logo=npm) <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=packages-js"><img src="https://img.shields.io/badge/GitHub_Releases-JavaScript_Package-F7DF1E?logo=github" /></a> [![Docs](https://img.shields.io/badge/docs-JavaScript-F7DF1E?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/js/) [![JavaScript Changelog](https://img.shields.io/badge/changelog-JavaScript-F7DF1E?logo=javascript)](https://ryan-millard.github.io/Img2Num/info/changelog/js/) |
| <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=packages-py"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/python/python-original.svg" width="30" /></a> | ![PyPI](https://img.shields.io/pypi/v/img2num?logo=pypi) [![PyPI Downloads](https://img.shields.io/pypi/dm/img2num?logo=pypi)](https://pypi.org/project/img2num/) [![Supported Versions](https://img.shields.io/pypi/pyversions/img2num?logo=python)](https://pypi.org/project/img2num/) <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=packages-py"><img src="https://img.shields.io/badge/GitHub_Releases-Python_Package-3776AB?logo=github" /></a> [![Docs](https://img.shields.io/badge/docs-Python-3776AB?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/py/) [![Python Changelog](https://img.shields.io/badge/changelog-Python-3776AB?logo=python)](https://ryan-millard.github.io/Img2Num/info/changelog/py/) |
| <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=bindings-c"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/c/c-original.svg" width="30" /></a> | <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=bindings-c"><img src="https://img.shields.io/badge/GitHub_Releases-C_Bindings-A8B9CC?logo=github" /></a> [![Docs](https://img.shields.io/badge/docs-C-A8B9CC?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/c/) [![C Changelog](https://img.shields.io/badge/changelog-C-A8B9CC?logo=c)](https://ryan-millard.github.io/Img2Num/changelog/c/) |
| <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=cpp"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/cplusplus/cplusplus-original.svg" width="30" /></a> | <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=cpp"><img src="https://img.shields.io/badge/GitHub_Releases-C++-00599C?logo=github" /></a> [![Docs](https://img.shields.io/badge/docs-C++-00599C?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/cpp/) [![C++ Changelog](https://img.shields.io/badge/changelog-C%2B%2B-00599C?logo=c%2B%2B&logoColor=white)](https://ryan-millard.github.io/Img2Num/changelog/cpp/) |
| <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=packages-js"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/javascript/javascript-original.svg" width="30" /></a> | [![npm](https://img.shields.io/npm/v/img2num?logo=npm)](https://www.npmjs.com/package/img2num) ![Downloads](https://img.shields.io/npm/dm/img2num?logo=npm) <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=packages-js"><img src="https://img.shields.io/badge/GitHub_Releases-JavaScript_Package-F7DF1E?logo=github" /></a> [![Docs](https://img.shields.io/badge/docs-JavaScript-F7DF1E?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/js/) [![JavaScript Changelog](https://img.shields.io/badge/changelog-JavaScript-F7DF1E?logo=javascript)](https://ryan-millard.github.io/Img2Num/changelog/js/) |
| <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=packages-py"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/python/python-original.svg" width="30" /></a> | ![PyPI](https://img.shields.io/pypi/v/img2num?logo=pypi) [![PyPI Downloads](https://img.shields.io/pypi/dm/img2num?logo=pypi)](https://pypi.org/project/img2num/) [![Supported Versions](https://img.shields.io/pypi/pyversions/img2num?logo=python)](https://pypi.org/project/img2num/) <a href="https://github.com/Ryan-Millard/Img2Num/releases?q=packages-py"><img src="https://img.shields.io/badge/GitHub_Releases-Python_Package-3776AB?logo=github" /></a> [![Docs](https://img.shields.io/badge/docs-Python-3776AB?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/py/) [![Python Changelog](https://img.shields.io/badge/changelog-Python-3776AB?logo=python)](https://ryan-millard.github.io/Img2Num/changelog/py/) |
Comment thread
Ryan-Millard marked this conversation as resolved.

## Community Links
[![Changelog](https://img.shields.io/badge/Changelog-Full-orange?logo=git&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/changelog/)
[![Changelog](https://img.shields.io/badge/Changelog-Full-orange?logo=git&logoColor=white)](https://ryan-millard.github.io/Img2Num/changelog/)
[![Contributing](https://img.shields.io/badge/Contributing-Guide-blue?logo=github)](https://github.com/Ryan-Millard/Img2Num/blob/main/CONTRIBUTING.md)
[![Issues](https://img.shields.io/badge/Issues-Available-brightgreen?logo=github)](https://github.com/Ryan-Millard/Img2Num/issues/views/1151)
[![Good First Issues](https://img.shields.io/badge/Good%20First%20Issues-Welcome-6cc644?logo=github)](https://github.com/Ryan-Millard/Img2Num/issues/views/1155)
[![Blog](https://img.shields.io/badge/Blog-Updates-ff6f00?logo=githubpages)](https://ryan-millard.github.io/Img2Num/info/blog/)
[![Blog](https://img.shields.io/badge/Blog-Updates-ff6f00?logo=githubpages)](https://ryan-millard.github.io/Img2Num/blog/)
[![GitHub Discussions](https://img.shields.io/badge/discussions-join_the_chat-4c1?logo=github)](https://github.com/Ryan-Millard/Img2Num/discussions)

## Quick Start

### C / C++

[![Documentation](https://img.shields.io/badge/Documentation-C-A8B9CC?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/c/)
[![Documentation](https://img.shields.io/badge/Documentation-C++-00599C?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/cpp/)
[![Documentation](https://img.shields.io/badge/Documentation-C-A8B9CC?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/c/)
[![Documentation](https://img.shields.io/badge/Documentation-C++-00599C?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/cpp/)

This process is too detailed to put in a `README.md` file, so please see our documentation:
- [<img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/c/c-original.svg" width="28" alt="C"/> Documentation](https://ryan-millard.github.io/Img2Num/info/docs/c/)
- [<img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/cplusplus/cplusplus-original.svg" width="28" alt="C++"/> Documentation](https://ryan-millard.github.io/Img2Num/info/docs/cpp/)
- [<img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/c/c-original.svg" width="28" alt="C"/> Documentation](https://ryan-millard.github.io/Img2Num/docs/c/)
- [<img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/cplusplus/cplusplus-original.svg" width="28" alt="C++"/> Documentation](https://ryan-millard.github.io/Img2Num/docs/cpp/)

> [!TIP]
> You can install the library from our GitHub releases:
Expand All @@ -133,9 +133,9 @@ This process is too detailed to put in a `README.md` file, so please see our doc

<img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/javascript/javascript-original.svg" width="30" />

For more detailed information on installing this package, please refer to [our documentation](https://ryan-millard.github.io/Img2Num/info/docs/js/):
For more detailed information on installing this package, please refer to [our documentation](https://ryan-millard.github.io/Img2Num/docs/js/):

[![Docs](https://img.shields.io/badge/docs-JavaScript-F7DF1E?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/js/)
[![Docs](https://img.shields.io/badge/docs-JavaScript-F7DF1E?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/js/)

#### CDN

Expand Down Expand Up @@ -164,9 +164,9 @@ import { imageToSvg } from "img2num";

<img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/python/python-original.svg" width="30" />

For more detailed information on installing this package, please refer to [our documentation](https://ryan-millard.github.io/Img2Num/info/docs/py/):
For more detailed information on installing this package, please refer to [our documentation](https://ryan-millard.github.io/Img2Num/docs/py/):

[![Docs](https://img.shields.io/badge/docs-Python-3776AB?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/info/docs/py/)
[![Docs](https://img.shields.io/badge/docs-Python-3776AB?logo=gitbook&logoColor=white)](https://ryan-millard.github.io/Img2Num/docs/py/)

#### Install Img2Num using pip

Expand Down Expand Up @@ -199,7 +199,7 @@ Subdirectories retain their own licenses:

## Can't find something?

If you need something, see [our documentation](https://ryan-millard.github.io/Img2Num/info/docs/).
If you need something, see [our documentation](https://ryan-millard.github.io/Img2Num/docs/).

If you can't find it, feel free to open an [issue](https://github.com/Ryan-Millard/Img2Num/issues/new) to request assistance with finding or creating what you need.

Expand All @@ -212,7 +212,7 @@ If you can't find it, feel free to open an [issue](https://github.com/Ryan-Milla
> [!NOTE]
> ### Maintainers wanted
> We’re looking for new maintainers.
> [Read more here](https://ryan-millard.github.io/Img2Num/info/blog/img2num-maintainer-expansion/).
> [Read more here](https://ryan-millard.github.io/Img2Num/blog/img2num-maintainer-expansion/).


## Contributors & Credits
Expand Down
2 changes: 1 addition & 1 deletion bindings/js/doxygen/home_page.dox
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* \endcode
*
* For extensive documentation, please see the
* [project setup guide](/Img2Num/info/docs/next/contributing/setup-and-dependencies/)
* [project setup guide](/Img2Num/docs/contributing/setup-and-dependencies/)
*
* This will generate the necessary WASM files for use in JavaScript. You can then integrate them into your web
* projects or Node.js applications.
Expand Down
4 changes: 4 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Dependencies
node_modules

# Static files
/static/docs/internal/**/api/*
!/static/docs/internal/**/api/.gitkeep
/static/docs/cpp/api/*
!/static/docs/cpp/api/.gitkeep
/static/docs/c/api/*
!/static/docs/c/api/.gitkeep
/static/example-apps/react-js/*
!/static/example-apps/react-js/.gitkeep

# Production
/build
Expand Down
2 changes: 1 addition & 1 deletion docs/blog/2025-12-05-launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Instead, it is now a library that supports C, C++, Python, and JavaScript.

{/* truncate */}

Try it out online at [https://ryan-millard.github.io/Img2Num/](https://ryan-millard.github.io/Img2Num/) and start coloring your favorite images today!
Try it out online at [https://ryan-millard.github.io/Img2Num/example-apps/react-js/](https://ryan-millard.github.io/Img2Num/example-apps/react-js/) and start coloring your favorite images today!

Stay tuned for tutorials, tips, and updates right here on the blog.
Loading