Awesome
movie-cli-2
a CLI tool to fetch movies and tv series details from omdbApi.com and tmdb, or comparing two movies.
It can optionally save the movie metadata to the clipboard or as a markdown file in a custom folder. Metadata will be formatted as property:: value
for Logseq note-taking app.
version : 1.1.0 2022-01-17
install
npm i -g github:cannibalox/movie-cli-2
requirements :
- NodeJS > 17.5
- an api key from omdbapi.com to fetch movie details
- a TMDB api key is required to fetch "original title" property
USAGE
open a terminal and type movie
followed by search terms
Usage: movie [title] or [movie1]::[movie2]
Options:
-v, --version output the current version
-k, --key set and save your apîkeys
-r, --reset resets options and clear keys
-s, --settings define settings
-h, --help display help for command
terminal showing info (left) | movie info saved as a md file inside Logseq (right) demo
configuration
- on first start, the program should enter configuration mode and will let you choose options (eg: define which metadata to fetch, auto-save to clipboard, etc...)
- please get your own api keys for omdbapi (https://www.omdbapi.com/apikey.aspx) and TMDB (https://www.themoviedb.org/settings/api)
- the configuration is automatically saved, use
movie -v
to see the location of the config file - use
movie --reset
ormovie --settings
to modify the configuration after the first run
setup screen
for logseq users:
- the movie metadata can be saved as a markdown file as
property:: value
. It can add atitle::
and fill defaulttags::
- don't forget to set your date format in the config file to match your logseq date format (like yyyymmdd | yyyy-mm-dd | dddd, MMM do, yyyy | etc...) (refer to logseq docs and https://github.com/felixge/node-dateformat#mask-options to see available formats)
- the script can optionally ask for a custom rating and watched date, they will be saved as properties
rating::
andwatched:: [[%date%]]
(a few custom arguments are possible) - filepaths should point to your logseq journals and logseq pages folder (eg: 'c:\logseq-graph\journals', 'd:/logseq/pages' or '/Users/path/to/logseq/pages/or/journal/'). Test the output on a temp folder beforehand.
the folders must exist prior to the execution. the trailing
\
or/
is not required. - the script can optionally set a log line in the daily journal at the %watched date% defined for the movie
new features and improvements
the script is forked from Mayankchd's movie-cli, tailored for my personal movie tracking workflow in Logseq. notable differences and new features :
- added a list of matching titles to pick from, to disambiguate titles like
Alone (2008)
vsAlone (2020)
- added save to clipboard and save to file options
- added
original-title::
property using TMDB api for non-English titles - added custom inputs (ratings, watched date)
- refactor code, updated to ECMAScript modules, update dependencies and removed isomorphic-fetch.
limitations
in case of errors, try mmovie -r
or movie -s
to reset the settings.
only supports markdown, not org-mode format.
the daily page log is crude : it doesn't rely on the logseq API, it's only appending a line at the end of the md file.
use with wisdom and be careful of your data : backup your logseq folders, test outputs in a temp folder.