Git Product home page Git Product logo

filmposter's Introduction

Film Poster

A Gum powered interactive Bash script to create Hugo photo posts in a section called film. By default it is targeted for Film photography posts, but this script can be adapted for any kind of a post-type where the user wants to be prompted for specific tags that are defined in plain-text files. This repo is meant to be a standalone demonstration, you'll want to customize your seleection options from the defaults.

Demo

Screencapture of a terminal window side by side with a browser window. The terminal is demonstrating an application that enters information about photo like title, film, camera, etc. and then selects the file from a file picker. Once the process is completed the browser auto refreshes to show the new photo has been added to the grid and then the photo page is loaded showing the different tags, via clicking a few tags it is demonstrated that they were generated and linked with other posts.

Higher quality webm demo file is on my website if listening to the audio of a mechanical keyboard clacking away is your thing!

Motivation

I didn't have a good process to add film photos to my Hugo static site with consistent tags to serve as metadata for camera, film, developer, format, etc. so I cobbled together a small Bash script to collect some input and create a folder as a Hugo page bundle but it was a very manual process still and the tag template immediately became tedious to maintain. I discovered Gum and decided to play with it to see if it would improve my post creation experience and it has been pretty good during my brief testing.

Dependencies

  • Bash
  • Gum
  • Hugo binary is not required to be installed locally

Installation

Gum

Install Gum using instructions found in the Gum repo.

Film Poster

Recommended install location is in the Hugo site root folder as git submodule. You could also copy just the filmPoster.sh file and create your own text files so any future updates to this repo doesn't upset your customizations.

git submodule add https://github.com/shombando/filmPoster.git
git submodule init

Configuration

filmPoser.sh

  • Path of the output folder that will be created (a Hugo Page Bundle), from where this script/repo exists. Change the last part of the path from film to whatever you want to call your Hugo section. Note: this script assumes that the section (folder) exists. If it doesn't then just drop a file called _index.md in that section (folder) and it will create a list of posts. If you want the same layout as the demo gif, put these files here into the /layouts/film folder.

    • OUTPUT_DIR="../content/film"
  • Default starting directory for locating Photos

    • PHOTOS_DIR=~/Pictures

Text files

โš ๏ธ WarningThe options that show up in the prompts are defined in the *.txt files. Because this repo is meant to be a standalone demo the configuration is checked in but ideally those options would be customized by you. Just know if that you use this repo "in production" (which is absolutely not recommended) and theny you do customize and run an update on this submodule you will see conflicts. They're populated with my personal choice and I plan on using this repo to keep my personal configuration so it'll change and grow over time. Update all the text files with the information that is relevant for you.

All files will accept a new entry per line. These will be generated as Hugo tags so they should not contain spaces.

  • cameras.txt
  • developers.txt
  • filmstocks.txt
  • format.txt
  • labs.txt

Usage

Call the script ./filmPoster.sh and use arrow navigation keys or type in the filter list for fuzzy matching. Gum also support vim keys for navigation including in the file picker (h for up one level and l for drilling down).

filmposter's People

Contributors

shombando avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.