gofile

Module and tool to upload files to gofile.io
git clone https://code.alwayswait.ing/gofile
Log | Files | Refs

commit f8b32ef5a92fc362a1beb12a2f1a581a63594de7
parent d960d40703f889ad562cab0758c0dc3460d77f9c
Author: archiveanon <>
Date:   Mon, 23 Jun 2025 15:12:00 +0000

Expose script as gofile-upload binary

Diffstat:
Mpyproject.toml | 3+++
Msrc/gofile/cli.py | 8++++++--
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml @@ -10,6 +10,9 @@ dependencies = [ requires-python = ">= 3.11" +[project.scripts] +gofile-upload = "gofile.cli:main" + [project.optional-dependencies] dev = [ "mypy == 1.9.0", diff --git a/src/gofile/cli.py b/src/gofile/cli.py @@ -42,7 +42,7 @@ def file_upload_progress(file: pathlib.Path): yield tqdm.utils.CallbackIOWrapper(progress.update, file.open("rb"), "read") -async def main(): +async def amain(): # you may save and reuse a guest token # there's no clear indicator on whether or not it expires # there may be duplicate filenames in a folder @@ -137,5 +137,9 @@ async def main(): print(f"- Token: {first_upload.result.guest_token or args.token}") +def main(): + asyncio.run(amain()) + + if __name__ == "__main__": - asyncio.run(main()) + main()