Skip to content

add OpenSCAD language support #1502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 29, 2024
Merged

add OpenSCAD language support #1502

merged 6 commits into from
Dec 29, 2024

Conversation

kenchou
Copy link
Contributor

@kenchou kenchou commented Dec 28, 2024

OpenSCAD is a software for creating solid 3D CAD objects.
SCAD stands for "Scripted CAD", where CAD is an acronym for "Computer-Aided Design".

OpenSCAD has been added to the upstream repository Tokei (v13.0.0-alpha.2) ( PR #1097)

Due to Perl 6 being renamed to Raku in Tokei v13.x, this PR has also been updated accordingly to avoid build errors.

languages.yaml Outdated
- "#803788"
- "#FFFFFF"
chip: "#178600" # required, this is used for the language breakdown bar, its value can be found in linguist (link 2).
icon: '\u{F34E}'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The icon property's indentation needs to be decreased by one level.

This is why the Nerd Font icon isn't appearing in the web preview. https://vercel-cxhqbujdb-o2shs-projects.vercel.app/#OpenScad

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

languages.yaml Outdated
Comment on lines 1813 to 1821
- blue
- magenta
- magenta
- white
hex: # optional, alternative to basic colors for terminals that support true colour.
- "#9B4F97"
- "#67217A"
- "#803788"
- "#FFFFFF"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're declaring 4 colors but only using one.

More info on how to color an ascii logo: https://github.com/o2sh/onefetch/wiki/ascii-art

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed. Removed unnecessary color definitions.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

94b5656 I added a second color with hex values to get it closer to the original logo https://vercel-f4f8n13fs-o2shs-projects.vercel.app/#OpenScad

languages.yaml Outdated
{0} ·...· .-=++*****++=-.
{0} ---------
colors:
ansi: # required, a list of the ANSI colors used to colorize the logo
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove the comments

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

languages.yaml Outdated
@@ -1887,7 +1920,7 @@ Perl:
- cyan
chip: "#0298C3"
icon: '\u{E67E}'
Perl6:
Raku:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The languages are alphabetized, so this would need to be moved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed. Moved to after Racket

Cargo.toml Outdated
@@ -66,7 +66,7 @@ serde_yaml = "0.9.34"
strum.workspace = true
time = { version = "0.3.37", features = ["formatting"] }
time-humanize = { version = "0.1.3", features = ["time"] }
tokei = "12.1.2"
tokei = "13.0.0-alpha.7"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@o2sh So we're good with moving to a pre-release? I don't have a problem with it, but what are your thoughts?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's definitely not ideal, but we can always roll back if we find any issues

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly, the upstream release is too slow. It took 3 months from merging this PR to the release. I almost forgot about it.

Copy link
Collaborator

@spenserblack spenserblack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I'm picky about git histories, ideally this PR would be 1 commit to bump tokei and 1 to add OpenSCAD support, but I'm not going to block based on that. LGTM!

@o2sh
Copy link
Owner

o2sh commented Dec 29, 2024

Good point @spenserblack, I bumped tokei in its own commit da23635 and reverted the corresponding changes from this PR

Copy link
Owner

@o2sh o2sh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your contribution @kenchou, the ASCII logo looks great 🎉

@o2sh o2sh merged commit 4bec002 into o2sh:main Dec 29, 2024
4 checks passed
@o2sh o2sh added the feat label Jan 1, 2025
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jan 3, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [o2sh/onefetch](https://github.com/o2sh/onefetch) | minor | `2.22.0` -> `2.23.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>o2sh/onefetch (o2sh/onefetch)</summary>

### [`v2.23.1`](https://github.com/o2sh/onefetch/releases/tag/2.23.1)

[Compare Source](o2sh/onefetch@2.23.0...2.23.1)

<!-- Release notes generated using configuration in .github/release.yml at main -->

##### Bug Fixes 🐛

-   Fix version in man page

**Full Changelog**: o2sh/onefetch@2.23.0...2.23.1

### [`v2.23.0`](https://github.com/o2sh/onefetch/releases/tag/2.23.0)

[Compare Source](o2sh/onefetch@2.22.0...2.23.0)

<!-- Release notes generated using configuration in .github/release.yml at main -->

#### What's Changed

##### New Features 🎉

-   add language support for OpenSCAD by [@&#8203;kenchou](https://github.com/kenchou) in o2sh/onefetch#1502
-   add language support for Modelica by [@&#8203;dietmarw](https://github.com/dietmarw) in o2sh/onefetch#1262
-   add language support for ATS by [@&#8203;pykenny](https://github.com/pykenny) in o2sh/onefetch#523
-   add language support for CUDA by [@&#8203;jtmr05](https://github.com/jtmr05) in o2sh/onefetch#940
-   add missing nerd fonts icons for some languages by [@&#8203;ankddev](https://github.com/ankddev) in o2sh/onefetch#1491

##### Chores 🧹

-   add Italian translation of README by [@&#8203;tlazzarin](https://github.com/tlazzarin) in o2sh/onefetch#1435
-   add Polish translation of README by [@&#8203;adamperkowski](https://github.com/adamperkowski) in o2sh/onefetch#1444
-   add Czech translation of READEME by [@&#8203;Amereyeu](https://github.com/Amereyeu) in o2sh/onefetch#1439
-   update russian README by [@&#8203;ankddev](https://github.com/ankddev) in o2sh/onefetch#1478
-   \[onefetch.dev] migrate to Svelte v5 by [@&#8203;o2sh](https://github.com/o2sh) in o2sh/onefetch#1455
-   add script to preview/validate Nerd Fonts by [@&#8203;spenserblack](https://github.com/spenserblack) in o2sh/onefetch#1492
-   add Powershell snippet to run onefetch automatically by [@&#8203;kiapanahi](https://github.com/kiapanahi) in o2sh/onefetch#1453

#### New Contributors

-   [@&#8203;tlazzarin](https://github.com/tlazzarin) made their first contribution in o2sh/onefetch#1435
-   [@&#8203;kiapanahi](https://github.com/kiapanahi) made their first contribution in o2sh/onefetch#1453
-   [@&#8203;adamperkowski](https://github.com/adamperkowski) made their first contribution in o2sh/onefetch#1444
-   [@&#8203;Amereyeu](https://github.com/Amereyeu) made their first contribution in o2sh/onefetch#1439
-   [@&#8203;ankddev](https://github.com/ankddev) made their first contribution in o2sh/onefetch#1478
-   [@&#8203;kenchou](https://github.com/kenchou) made their first contribution in o2sh/onefetch#1502
-   [@&#8203;dietmarw](https://github.com/dietmarw) made their first contribution in o2sh/onefetch#1262
-   [@&#8203;pykenny](https://github.com/pykenny) made their first contribution in o2sh/onefetch#523
-   [@&#8203;jtmr05](https://github.com/jtmr05) made their first contribution in o2sh/onefetch#940

**Full Changelog**: o2sh/onefetch@2.22.0...2.23.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44Ni40IiwidXBkYXRlZEluVmVyIjoiMzkuODYuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants