Skip to content

Commit

Permalink
Added example screenshot instructions in just upload --help (#2454)
Browse files Browse the repository at this point in the history
### What

Added example screenshot instructions in `just upload --help`

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [ ] ~~I've included a screenshot or gif (if applicable)~~

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: {{ pr-build-summary }}

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/11de035/docs
Examples preview: https://rerun.io/preview/11de035/examples
<!-- pr-link-docs:end -->
  • Loading branch information
abey79 authored Jun 16, 2023
1 parent ad77e2d commit e436820
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions scripts/upload_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
Usage
-----
python3 scripts/upload_image.py --help
Use the script:
python3 scripts/upload_image.py --help
or the just command:
just upload --help
"""

from __future__ import annotations
Expand Down Expand Up @@ -306,8 +312,23 @@ def data_hash(data: bytes) -> str:
return hashlib.sha1(data).hexdigest()


DESCRIPTION = """Upload an image to static.rerun.io.
Example screenshots
-------------------
To make example screenshots, follow these steps:
1. Run the example.
2. Resize the Rerun window to an approximate 16:9 aspect ratio and a width of ~1500px.
3. Groom the blueprints and panel visibility to your liking.
4. Take a screenshot using the command palette.
5. Run: just upload --name <name_of_example>
6. Copy the output HTML tag and paste it into the README.md file.
"""


def main() -> None:
parser = argparse.ArgumentParser(description="Upload an image.")
parser = argparse.ArgumentParser(description=DESCRIPTION, formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument(
"path", type=Path, nargs="?", help="File path to the image. If not provided, use the clipboard's content."
)
Expand Down

0 comments on commit e436820

Please sign in to comment.