vcf_to_obsidian.vcf_converter

VCF Converter module for handling VCF to Markdown conversion.

Classes

VCFConverter

Class responsible for converting VCF files to Markdown format.

Module Contents

class vcf_to_obsidian.vcf_converter.VCFConverter[source]

Class responsible for converting VCF files to Markdown format.

reader[source]
writer[source]
filename_gen[source]
_extract_rev_timestamp_from_markdown(markdown_path)[source]

Extract REV timestamp from existing Markdown file.

Parameters:

markdown_path (Path) – Path to the Markdown file

Returns:

REV timestamp as datetime object, or None if not found

Return type:

datetime or None

_should_skip_conversion(vcf_path, markdown_path)[source]

Check if conversion should be skipped based on file modification times.

Parameters:
  • vcf_path (Path) – Path to the VCF file

  • markdown_path (Path) – Path to the Markdown file

Returns:

True if conversion should be skipped, False otherwise

Return type:

bool

convert_vcf_to_markdown(vcf_path, output_dir)[source]

Convert a single VCF file to Markdown format.

Parameters:
  • vcf_path (Path) – Path to the VCF file

  • output_dir (Path) – Output directory for Markdown files

Returns:

True if successful, False otherwise

Return type:

bool

convert_vcf_files_from_sources(folder_sources, file_sources, output_dir, ignore_files=None, verbose=False)[source]

Convert VCF files from multiple sources (folders and individual files) to Markdown format.

This method collects VCF files from the specified sources, applies ignore filters, and processes them directly using convert_vcf_to_markdown.

Parameters:
  • folder_sources (list) – List of Path objects for directories containing VCF files

  • file_sources (list) – List of Path objects for individual VCF files

  • output_dir (Path) – Output directory for Markdown files

  • ignore_files (list, optional) – List of Path objects for files to ignore

  • verbose (bool) – Whether to enable verbose output

Returns:

(successful_count, total_count, all_vcf_files)

Return type:

tuple

process_tasks(folder, obsidian, file, verbose, ignore)[source]

Process VCF conversion tasks from CLI arguments.

This method handles the complete CLI workflow including validation, file collection, processing, and reporting.

Parameters:
  • folder – Tuple/list of folder paths containing VCF files

  • obsidian – Path to destination directory for Markdown files

  • file – Tuple/list of individual VCF file paths to process

  • verbose – Boolean flag for verbose output

  • ignore – Tuple/list of VCF file paths to ignore