Repository navigation
Add a deepfield command line - #21
Merged
Merged
Conversation
Switch scenes and presets, change settings of the running wallpaper, trigger events, control the schedule, and render stills, videos, time-lapses, GIFs and PNG sequences from a terminal. Commands go to the running app over a local message port and fall back to the saved settings when it isn't running.
…o cli # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
deepfield, a command line for the app. It's the app's own executable:DeepField.app/Contents/MacOS/DeepField installlinks it onto the PATH, and starting it asdeepfield(or with a command name as the first argument) runs the command instead of the app.What it does
status,get,set KEY=VALUE...,keys,reset,on/off/toggle,pause/resume. Keys are the saved format's (palette.corefor nested ones), colors are hex, and bad keys or values are rejected with suggestions or the allowed choices.scene NAME|random [KEY=VALUE...](the scene's last settings plus changes),preset apply|save|delete|rename|export|import, with--fade/--styleusing the schedule's transitions.render [image|video|timelapse] OUT. The extension picks png/jpg/heic/tiff, mp4/mov (H.264, HEVC, ProRes), gif, or a folder of PNG frames. Options include--size,--scale,--time,--duration,--fps,--speed,--loop,--smoothand--defaults. Live Earth's clock follows--speed, so its day time-lapses.events/event NAME,schedule status|on|off|next,login,customize,launch,quit,completion zsh|bash|fish.How
State commands (
CLI/CLIService.swift) are sent as JSON to the running app over aCFMessagePortand run on its main thread, so changes show at once. When nothing answers, the same code runs on the saved settings in the command's own process. Rendering runs offscreen in the command's process (CLI/RenderCommand.swift). Small changes elsewhere:FrameCapture.Sequencecan render events (off by default, so the phone loop is unchanged),MobileExport.dissolveis shared for--loop,EventSchedule.namedlists events by name, andAppDelegateexposes show/hide and pause.Verified
setsaves and a fresh process reads it back;pause/eventfail with a hint.--loopend leads into its start. ffprobe confirms codec, size, frame count and duration.install --dir, the link re-executing the real path (bundle and defaults domain correct), zsh/bash completion syntax, and the dev--snapshotstill working.Not tested: fish completion (not installed) and tab completion in a live shell. No visual change to the wallpaper itself, so no screenshots.