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
Initial plugin #1
Comments
I got Claude 3 Opus to write the first version: https://gist.github.com/simonw/4cecde4a729f4da0b5059b50c8e01359 |
For checking space: import shutil
# Get the total, used, and free space in bytes for the /tmp directory
total, used, free = shutil.disk_usage('/tmp') The |
Still needed:
|
I'm going to test for available space when the user requests a download, not every time I show the export button. I don't think it's worth the extra computation on every page load for a button that is hardly ever pressed. It would also be confusing to the user if the button sometimes isn't there. |
One thing that bothers me here is that Since database actions cannot perform POST requests just yet I'm going to add a signed parameter to the URL instead, to ensure users cannot have export links generated for them. |
Goal is a datbase action menu item that can request a SQLite database copy. If there is enough space in
/tmp
it runs a subprocess that does aVACUUM INTO
to create an atomic snapshot in a temporary file, then lets you download it, then deletes the file.The text was updated successfully, but these errors were encountered: