Skip to content

Add CodeShot package#9415

Open
yasinahmed wants to merge 2 commits into
sublimehq:masterfrom
yasinahmed:add-codeshot
Open

Add CodeShot package#9415
yasinahmed wants to merge 2 commits into
sublimehq:masterfrom
yasinahmed:add-codeshot

Conversation

@yasinahmed
Copy link
Copy Markdown

Adds CodeShot, a Windows-only Sublime Text plugin for creating clean code screenshots.

Developer: Yasin Jagral

Repository:
https://github.com/yasinahmed/CodeShot

Notes:

  • Windows only
  • Requires Chrome or Edge installed locally
  • Uses PowerShell for clipboard copy
  • Works offline
  • First release tag: 1.0.0

@kaste
Copy link
Copy Markdown
Contributor

kaste commented May 8, 2026

Like it. A few things in random order:

  • Remove the CodeShotTestCommand test command
  • Add a .python_version file with the sole content 3.8\n to opt into the newer python host
  • The TypeError ... is that a mistake? What do you expect here?
            try:
                stdout, stderr = process.communicate(timeout=30)
            except TypeError:
                stdout, stderr = process.communicate()
  • the tempfiles ("copy" and html) should be deleted after use.

  • Remove the empty keymap file.

  • In copy_png_to_clipboard, the startupinfo is missing

  • You say in the README "Footer branding: CodeShot by Yasin Jagral" but it is configurable. It is just the default. I would add that to the README.

👍

@yasinahmed
Copy link
Copy Markdown
Author

Thanks for the review.

I have applied the requested fixes in the CodeShot repository:

  • Removed CodeShotTestCommand
  • Added .python_version with 3.8
  • Removed the empty Default.sublime-keymap
  • Removed the except TypeError fallback around process.communicate(timeout=...)
  • Added timeout handling with subprocess.TimeoutExpired
  • Added cleanup for temporary HTML and PNG files
  • Added startupinfo to copy_png_to_clipboard
  • Updated the README to clarify that CodeShot by Yasin Jagral is the default configurable footer text

New release tag: 1.0.1

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

This PR adds CodeShot.

Review for CodeShot main-490cc9d-2026.05.09.07.14.33

- Common used command prefix is: code_shot.
- Tip of main is tagged with 1.0.1. ✅

No failures

1 warning:
- 'Main.sublime-menu' has no 'Package Settings' entry for 'CodeShot'
    File: Main.sublime-menu


For more details on the report messages (for example how to resolve them), go to:
https://github.com/packagecontrol/st_package_reviewer/wiki

Repository: https://github.com/yasinahmed/CodeShot

@kaste
Copy link
Copy Markdown
Contributor

kaste commented May 9, 2026

  • 'Main.sublime-menu' has no 'Package Settings' entry for 'CodeShot'
    File: Main.sublime-menu

What that means:

  • Package defines 'CodeShot.sublime-settings', but 'Main.sublime-menu' has no settings entry under 'Preferences > Package Settings > CodeShot'. Add a 'Settings' entry using edit_settings with 'args.base_file' set to '${packages}/CodeShot/CodeShot.sublime-settings'.

@yasinahmed
Copy link
Copy Markdown
Author

Thanks. I have added the Package Settings entry under:

Preferences > Package Settings > CodeShot > Settings

The menu now uses edit_settings with:

${packages}/CodeShot/CodeShot.sublime-settings

I also updated the README accordingly.

New release tag: 1.0.2

@kaste
Copy link
Copy Markdown
Contributor

kaste commented May 12, 2026

LGTM @braver !

@github-actions
Copy link
Copy Markdown

This PR adds CodeShot.

Review for CodeShot main-67ebb1f-2026.05.12.06.54.15

- Common used command prefix is: code_shot.
- Tip of main is tagged with 1.0.2. ✅
- Tip: add 'args.default' to the 'Settings' menu entry. A minimal default is "{}".
    File: Main.sublime-menu

No failures, no warnings.


For more details on the report messages (for example how to resolve them), go to:
https://github.com/packagecontrol/st_package_reviewer/wiki

Repository: https://github.com/yasinahmed/CodeShot

@braver
Copy link
Copy Markdown
Collaborator

braver commented May 12, 2026

Please consider adding some comments to the settings file explaining what they do. Some of them are pretty obvious, but some could do with some explaining. It's also a mix of layout choices and language overrides in what seems like random order. If users are supposed to edit this, some help goes a long way.
Related, please consider adding a command palette entry for the settings.

Those are small things, I won't block merging over that. The schema check isn't happy though, please check the output there. Typically it's indentation or alphabetical sorting of packages.

@braver braver added feedback provided The changes and package have been seen by a reviewer mergeable The channel changes are good but some action from the author is still needed labels May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feedback provided The changes and package have been seen by a reviewer mergeable The channel changes are good but some action from the author is still needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants