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

CLI: Add command to display the list of supported file formats #2247

Closed
lastzero opened this issue Apr 12, 2022 · 1 comment
Closed

CLI: Add command to display the list of supported file formats #2247

lastzero opened this issue Apr 12, 2022 · 1 comment
Assignees
Labels
docs 📚 Write, improve, or review documentation enhancement Refactoring, improvement or maintenance task released Available in the stable release ux Impacts User Experience

Comments

@lastzero
Copy link
Member

As a user with a variety of file formats in my library, I would like to check them against a list of supported formats without having to read source code or external documentation.

Implementing this seems like a quick win since we need this for our documentation anyway and don't have time to manually update the list every time something changes.

To show all supported formats (-s hides the description to make the output more compact, the -n flag removes the text wrapping so that the result can be copied directly into our docs as it is a valid Markdown table):

$ photoprism show formats

| Format |          Description           |  Type   |           Extensions           |
|--------|--------------------------------|---------|--------------------------------|
| BMP    | Bitmap                         | Image   | .bmp                           |
| GIF    | Graphics Interchange Format    | Image   | .gif                           |
| HEIF   | High Efficiency Image File     | Image   | .heic, .heif                   |
|        | Format                         |         |                                |
| JPG    | JPEG (Joint Photographic       | Image   | .jfi, .jfif, .jif, .jpe,       |
|        | Experts Group)                 |         | .jpeg, .jpg, .thm              |
| MPO    | Stereoscopic 3D Format based   | Image   | .mpo                           |
|        | on JPEG                        |         |                                |
| PNG    | Portable Network Graphics      | Image   | .pn, .png                      |
| TIFF   | Tag Image File Format          | Image   | .tif, .tiff                    |
| WEBP   | Google WebP                    | Image   | .webp                          |
| RAW    | Unprocessed Image Data         | Raw     | .3fr, .ari, .arw, .bay, .cap,  |
|        |                                |         | .cr2, .cr3, .crw, .data, .dcr, |
|        |                                |         | .dcs, .dng, .drf, .eip, .erf,  |
|        |                                |         | .fff, .gpr, .iiq, .k25, .kdc,  |
|        |                                |         | .mdc, .mef, .mos, .mrw, .nef,  |
|        |                                |         | .nrw, .obm, .orf, .pef, .ptx,  |
|        |                                |         | .pxn, .r3d, .raf, .raw, .rw2,  |
|        |                                |         | .rwl, .rwz, .sr2, .srf, .srw,  |
|        |                                |         | .x3f                           |
| AAE    | Apple Image Edits              | Sidecar | .aae                           |
| JSON   | Serialized JSON Data           | Sidecar | .json                          |
|        | (Exiftool, Google Photos)      |         |                                |
| MD     | Markdown Formatted Text        | Sidecar | .markdown, .md                 |
| TOML   | Serialized TOML Data (Tom's    | Sidecar | .toml                          |
|        | Obvious, Minimal Language)     |         |                                |
| TXT    | Plain Text                     | Sidecar | .txt                           |
| XML    | Extensible Markup Language     | Sidecar | .xml                           |
| XMP    | Adobe Extensible Metadata      | Sidecar | .xmp                           |
|        | Platform                       |         |                                |
| YML    | Serialized YAML Data (Config,  | Sidecar | .yaml, .yml                    |
|        | Metadata)                      |         |                                |
| 3G2    | Multimedia Container for 3G    | Video   | .3g2                           |
|        | CDMA2000, based on 3GP         |         |                                |
| 3GP    | MPEG-4 Part 12, Mobile         | Video   | .3gp                           |
|        | Multimedia Container           |         |                                |
| AV1    | Alliance for Open Media        | Video   | .av1                           |
| AVC    | H.264, Advanced Video Coding,  | Video   | .avc                           |
|        | MPEG-4 Part 10                 |         |                                |
| AVI    | Microsoft Audio Video          | Video   | .avi                           |
|        | Interleave                     |         |                                |
| FLV    | Flash Video                    | Video   | .f4v, .flv                     |
| HEVC   | H.265, High Efficiency Video   | Video   | .hevc                          |
|        | Coding                         |         |                                |
| MKV    | Matroska Multimedia Container  | Video   | .mkv                           |
| MOV    | Apple QuickTime                | Video   | .mov, .qt                      |
| MP2    | H.262, H.222, MPEG-2           | Video   | .mp2, .mpv                     |
| MP4    | MPEG-4 Part 14 Multimedia      | Video   | .m4v, .mp, .mp4                |
|        | Container                      |         |                                |
| MPG    | MPEG (Moving Picture Experts   | Video   | .mpeg, .mpg                    |
|        | Group)                         |         |                                |
| MTS    | AVCHD (Advanced Video Coding   | Video   | .mts                           |
|        | High Definition)               |         |                                |
| OGV    | Ogg Media by Xiph.Org          | Video   | .ogg, .ogv, .ogx               |
| WEBM   | Google WebM                    | Video   | .webm                          |
| WMV    | Windows Media                  | Video   | .wmv                           |
@lastzero lastzero added enhancement Refactoring, improvement or maintenance task docs 📚 Write, improve, or review documentation ux Impacts User Experience labels Apr 12, 2022
@lastzero lastzero self-assigned this Apr 12, 2022
lastzero added a commit to photoprism/photoprism-docs that referenced this issue Apr 12, 2022
see photoprism/photoprism#2247

Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit to photoprism/photoprism-docs that referenced this issue Apr 12, 2022
see photoprism/photoprism#2247

Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit to photoprism/photoprism-docs that referenced this issue Apr 12, 2022
see photoprism/photoprism#2247

Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit to photoprism/photoprism-docs that referenced this issue Apr 12, 2022
see photoprism/photoprism#2247

Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit to photoprism/photoprism-docs that referenced this issue Apr 12, 2022
see photoprism/photoprism#2247

Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero lastzero added the please-test Ready for acceptance test label Apr 12, 2022
lastzero added a commit that referenced this issue Apr 14, 2022
Replaces the --no-wrap flag with --md in all "photoprism show ..."
subcommands, as this is easier to understand. See also #2247.
Unused code was opportunistically removed along the way.
@rabotond
Copy link

Tested. Indeed the new command works and lists formats.

@graciousgrey graciousgrey added released Available in the stable release and removed please-test Ready for acceptance test labels May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs 📚 Write, improve, or review documentation enhancement Refactoring, improvement or maintenance task released Available in the stable release ux Impacts User Experience
Projects
Status: Release 🌈
Development

No branches or pull requests

3 participants