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

a script to delete converted PDF files #80

Open
qaisjp opened this issue May 2, 2019 · 0 comments
Open

a script to delete converted PDF files #80

qaisjp opened this issue May 2, 2019 · 0 comments

Comments

@qaisjp
Copy link
Member

qaisjp commented May 2, 2019

Sometimes when users open certain files (PDFs, Word files), Google Docs "helpfully" converts the file to a Google Doc. This is wasteful. We should write a script to auto-delete files like the one below:

image

image

Any Google Doc matching these heuristics will automatically be deleted:

  • Google Doc will usually have another file (probably a PDF or Word file) with the same name in the folder
  • Google Doc will usually be newer
  • Google Doc's first three activity entries will be by the same user, within 60s of each other

It would be cool if we caught this at the time of document creation, automatically deleted, and actually email the user saying "Please don't do this! Please follow the guidance here".

Sometimes another user will open a doc file, accidentally hit space, and then close the file. We should be smart and file these "suspect" documents away for a human to delete. If we manage to catch this at time of document creation, this doesn't really become useful outside the initial purge.

An alternative option is to just run the script at regular intervals, but that's no fun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant