Skip to main content

An executable tool to automatically download videos and images from urls in the clipboard

Project description

autodownload-from-clipboard 🚀

Quick Start: Run the Project with UV

uvx autodownload-from-clipboard

Project description

An executable tool to automatically download videos and images from urls in the clipboard

Template features

Please make sure that everything is setup: See Initial setup section below

✨ Key Features:

  1. Automatic Release Workflow: 🚦 Merging a pull request automatically creates a release PR—no manual steps required.

  2. One-Click Publishing: 🚀 Merging the release PR builds & uploads artifacts to both PyPI and GitHub, and updates the changelog.

  3. Zero-setup Development: 🔄 Powered by Astral UV, your dev environment & all dependencies are fully managed—no virtualenv or pip install needed.

  4. Continuous Testing: 🧪 Unit tests run automatically on every pull request to catch issues early.

  5. Automated Code Quality: 🧹 Pre-commit hooks enforce code quality and style validation before anything merges.

  6. Conventional Commits Required: 📝 PR titles must follow Conventional Commit standards for clear, automated changelogs and semantic versioning.

  7. Easy Code Quality Checks: ✅ Local pre-commit hooks keep your code clean and consistent.

    • Activate or deactivate: 🔛🔚

      uv run pre-commit install    # enable hooks
      uv run pre-commit uninstall  # disable hooks
      
    • Run all checks manually: 🏃‍♂️

      uv run pre-commit run --all-files
      
      • (the command is in ./precommit.sh/ ./precommit.bat)

Once the setup is finished, the main entrypoint of this project (app/main.py:main) can be called from every computer which has uv, via the following command:

uvx autodownload-from-clipboard

It can also be called locally by calling:

uvx LOCAL_PATH/autodownload-from-clipboard

Initial setup

⚠️ IMPORTANT SETUP REQUIRED

Some essential configurations for automated releases and PyPI integration require using the GitHub and PyPi web interfaces. Please follow the steps below in your browser to complete the setup.

Just after the cookiecutter has done his job, create the Github repo

  • Repository name: autodownload-from-clipboard
  • Description: An executable tool to automatically download videos and images from urls in the clipboard

Get to the local project:

git branch -M main
git remote add origin git@github.com:DSestu/autodownload-from-clipboard.git
git push -u origin main

Enable GH actions to create PR's

To enable automatic Pull Requests from release-please, you'll need to grant GitHub Actions permission to create and approve pull requests:

  1. Navigate to your repository on GitHub.
  2. Go to Settings > Actions > General.
  3. Scroll down to Workflow permissions.
  4. Select Allow GitHub Actions to create and approve pull requests.

Next steps:

  • In your repository's commit history, locate the "Cookiecutter initial commit" and copy its full commit SHA (use the copy icon at the end of the line).
  • Open release-please-config.json, find the bootstrap-sha field, and replace its value with the SHA you just copied. Commit this change.

Finally, ensure your repository has at least one release tag. Create a release from the first commit and tag it as 0.1.0.

The release please will be triggered after the first PR merge.

Setup publishing to Pypi

Configure Publishing to PyPI

To enable publishing to PyPI via GitHub Actions, follow these steps:

  1. Set up GitHub Environment:

    • In your GitHub repository, go to Settings > Environments.
    • Click New environment and name it pypi.
  2. Configure PyPI Publisher:

    • Log in to your PyPI account.
    • Go to "Account settings" > "Publishing" and click "Add a new publisher".
    • Choose "GitHub" as the integration type.
    • Follow the instructions to link your repository and grant the required permissions.
    • Select or specify the workflow file as release_please.yml (or the workflow you use for releases).
    • Ensure the environment name (pypi) matches exactly—this tells the workflow and PyPI which environment to expect.
  3. Verify Package Name Consistency:

    • Make sure the package name in your pyproject.toml file matches exactly with your project name on PyPI. This is critical for successful publishing.

By following these steps, you'll enable automated publishing of your package to PyPI whenever a release is created via GitHub Actions.

Advice

To improve the default pull request workflow experience, update your repository's settings as follows:

  1. Go to your repository's Settings.
  2. Scroll down to the Pull requests section.
  3. Disable Allow merge commits & Allow rebase merging
  4. Keep Allow squash merging, and change the default commit message to Pull request title

This will ensure your merge commits use clear, descriptive titles from pull requests instead of the default text, and keep changelogs concise.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autodownload_from_clipboard-0.1.1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autodownload_from_clipboard-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file autodownload_from_clipboard-0.1.1.tar.gz.

File metadata

  • Download URL: autodownload_from_clipboard-0.1.1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for autodownload_from_clipboard-0.1.1.tar.gz
Algorithm Hash digest
SHA256 05f1f58ff2db347e5eb20ee0ddc533f13621012f0d96a14a7f4688db12816110
MD5 99d42bf8b9ce9e15772e7f1f67395492
BLAKE2b-256 e39ec1fee9cb8981df09e414a48c79b596917ac2378744be83cab522ed9b25a8

See more details on using hashes here.

File details

Details for the file autodownload_from_clipboard-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: autodownload_from_clipboard-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for autodownload_from_clipboard-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5158ddfeb954c598dcae6d609c3c27825a8b3ba6188a6d7bfba9c27a9c50460c
MD5 524a5c1af9ad1292217366b54601c9a2
BLAKE2b-256 475c2f4939ec73316f2d6e866fb4c479aa02286d0a56ea84994776dd08514355

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page