Small maker of thumbnails and spitter-out of HTML for galleries.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.1 KiB

  1. galleryhtml
  2. ===========
  3. Python to make thumbnails and generate HTML and/or JSON pointing to them.
  4. Implemented as a badly-designed class with a command-line wrapper. Probably
  5. wrong in many particulars. I don't know Python.
  6. As of September 2016, this is just kind of an experiment. I'll probably change
  7. the interface (and might also abandon the whole thing in favor of some existing
  8. tool). If I get it to a place where I think I won't break the interface and
  9. there are some unit tests in place, that will probably be a v1.0.0.
  10. rationale
  11. ---------
  12. I just want to make some simple photo galleries for my website, using something
  13. I can easily plumb into Makefiles or [Vim macros][vim-macros].
  14. synopsis
  15. --------
  16. ```sh
  17. gallery-html --base_url=https://example.com/ --base_dir=. -x=256 -y=256
  18. ```
  19. installing
  20. ----------
  21. ```sh
  22. # I needed this on my Debian Jessie system:
  23. # sudo apt-get install python3-pil
  24. git clone https://github.com/brennen/galleryhtml
  25. cd galleryhtml
  26. sudo python3 setup.py install
  27. ```
  28. Installing for development:
  29. ```sh
  30. sudo pip3 install -e
  31. ```
  32. gallery-html usage
  33. ------------------
  34. <!-- exec -->
  35. $ gallery-html --help
  36. gallery-html - generate thumbnails and print html for images
  37. Usage:
  38. gallery-html [--source <pattern>...] [--output <dir>] [--base_url <url>] [-x <n>] [-y <n>] [--json <filename>] [--html <filename>] [--overwrite]
  39. gallery-html (-h | --help)
  40. gallery-html (-v | --version)
  41. Options:
  42. --source <pattern> Source directory or image file(s) to make gallery from
  43. --output <dir> Parent directory on local filesystem for thumbnails
  44. --base_url <url> Base URL for images
  45. -x <n> Maximum width of thumbnails in pixels
  46. -y <n> Maximum height of thumbnails in pixels
  47. --json <filename> Render JSON output to filename
  48. --html <filename> Render HTML output to filename
  49. --overwrite Replace existing thumbnail files
  50. -h --help Show this screen
  51. -v --version Display version
  52. <!-- end -->
  53. [vim-macros]: https://github.com/brennen/bpb-kit/blob/master/home/bin/vim-filter-exec-raw