Skip to content
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

Update empty-screenshots extension #12358

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

robotdestroy
Copy link
Contributor

@robotdestroy robotdestroy commented May 15, 2024

Description

Screencast

Checklist

- Updates to preferences, functionality and language
- Initial commit
@raycastbot raycastbot added the extension fix / improvement Label for PRs with extension's fix improvements label May 15, 2024
@raycastbot
Copy link
Collaborator

raycastbot commented May 15, 2024

Thank you for your contribution! 🎉

🔔 @chanceaclark you might want to have a look.

@raycastbot raycastbot added the extension: empty-screenshots Issues related to the empty-screenshots extension label May 15, 2024
@robotdestroy
Copy link
Contributor Author

  • Added preference for the user to choose to 'delete' or 'move to trash' behavior
  • Added directory UI affordance for the user to choose the screenshot folder
  • Added preference for the user to choose the screenshot custom prefix
  • Added additional option to not protect recent screenshots

@robotdestroy
Copy link
Contributor Author

New UI
CleanShot 2024-05-14 at 21 34 41@2x

Copy link
Contributor

@chanceaclark chanceaclark left a comment

Choose a reason for hiding this comment

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

Hey @robotdestroy thanks for contributing to this extension! I have a few comments regarding this change but overall I love this addition!

🍹 = Optional or discussion comments so feel free to disregard them if you feel passionately about it.

Additionally, I am about to get married/go on my honeymoon for the next two weeks so I won't be able to respond much after this message. After this review, I will defer the approval of this PR to the Raycast team or valid approver. Hopefully this doesn't impact the resolution time too much 🙏

extensions/empty-screenshots/src/index.ts Outdated Show resolved Hide resolved
extensions/empty-screenshots/package.json Outdated Show resolved Hide resolved
extensions/empty-screenshots/package.json Outdated Show resolved Hide resolved
extensions/empty-screenshots/src/index.ts Outdated Show resolved Hide resolved
extensions/empty-screenshots/package.json Show resolved Hide resolved
robotdestroy and others added 5 commits May 15, 2024 20:45
Co-authored-by: Chancellor Clark <chancellorclark@gmail.com>
Co-authored-by: Chancellor Clark <chancellorclark@gmail.com>
Co-authored-by: Chancellor Clark <chancellorclark@gmail.com>
@pernielsentikaer
Copy link
Collaborator

Is this ready for another review?

@pernielsentikaer pernielsentikaer self-assigned this May 21, 2024
@robotdestroy
Copy link
Contributor Author

Yup!


try {
const files = await readdir(folder);

const screenshots = files
.filter((file) => file.endsWith(".png") || file.endsWith(".mov"))
.filter((file) =>
prefixString ? file.startsWith(prefixString) : file.startsWith("CleanShot") || file.startsWith("Screen"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I just tried to change language to danish and the name here is Skærmbillede 2024-05-22 kl. 09.08.22.png - this will never be removed, so maybe it's better to do as before and only filter if custom prefixString has been set (which we could make to a comma seperated list)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension: empty-screenshots Issues related to the empty-screenshots extension extension fix / improvement Label for PRs with extension's fix improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants