springheel.addimg module¶
Add a new strip to Springheel’s input.
-
springheel.addimg.
addImg
()¶ Add an image as a Springheel comic with metadata.
-
springheel.addimg.
checkConfs
(input_dir: str) → List[str]¶ Check which .conf files exist in input.
- Parameters
- input_dirstr
Absolute path of the input/ directory.
- Returns
- list of str
A list of config files.
-
springheel.addimg.
formatOutput
(meta_dict, json_mode, output_file)¶ Save metadata to a file.
- Parameters
- meta_dictdict
Dictionary of all needed metadata for the strip.
- json_modebool
Whether to save the metadata as JSON or not.
- output_filestr
The output filename to use.
-
springheel.addimg.
getInfo
() → Tuple[str, dict, bool]¶ Retrieve info from a .conf file and command line input.
- Returns
- meta_pathstr
Output path for the metadata file.
- meta_dictstr
A dictionary with image metadata.
- json_modebool
Whether the output should be in JSON format or not.
Notes
Fields that are not provided by the command-line invocation of
springheel-addimg
will be requested withinput()
. If non- optional fields are still left empty, they default to “<Missing Field>” to call attention to this fact.
-
springheel.addimg.
parseCommandInput
() → argparse.Namespace¶ Read info on the strip from the command line.
- Returns
- argparse.Namespace
Arguments provided by the user, if any. Should contain values (including None) for input, conf, title, num, chapter, alt, source, json, and commentary.