class FilesToPrompt::App

Defined in:

files-to-prompt.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def binary_file?(file_path, chunk_size = 8192) : Bool #

Checks if a file is binary


[View source]
def build_file_output_string(file_path : String, content : String, config : ProcessingConfig) : String #

Builds file content as a string (for concurrent processing)


[View source]
def collect_files(path_to_process, config, files = [] of String) : Array(String) #

Collects all files to process from a path (chooses method based on config)


[View source]
def collect_files_concurrent(path_to_process, config) : Array(String) #

Collects all files to process from a path (concurrent version)


[View source]
def collect_files_sequential(path_to_process, config, files = [] of String) : Array(String) #

Collects all files to process from a path (sequential version)


[View source]
def config #

Convenience accessors


[View source]
def config_manager : ConfigManager #

[View source]
def config_manager=(config_manager : ConfigManager) #

[View source]
def convert_notebook_external(file_path : String, config : ProcessingConfig) #

Converts a Jupyter Notebook file to the specified format using external conversion.


[View source]
def convert_notebook_external_to_string(file_path : String, config : ProcessingConfig) : String | Nil #

Converts a Jupyter Notebook file to the specified format using external conversion and returns the content as a string.


[View source]
def convert_notebook_internal(file_path : String, config : ProcessingConfig) #

Converts a Jupyter Notebook file to the specified format using internal conversion.


[View source]
def convert_notebook_internal_to_string(file_path : String, config : ProcessingConfig) : String | Nil #

Converts a Jupyter Notebook file to the specified format using internal conversion and returns the content as a string.


[View source]
def convert_to_asciidoc(ipynb_data : JSON::Any) : String #

Converts a Jupyter Notebook file to AsciiDoc format.


[View source]
def convert_to_markdown(ipynb_data : JSON::Any) : String #

Converts a Jupyter Notebook file to Markdown format.


[View source]
def error(*args) #

Output error to console or stderr file (for error messages)


[View source]
def output(*args) #

Output to console or stdout file (for normal output)


[View source]
def output_config #

[View source]
def paths_to_process : Array(String) #

[View source]
def paths_to_process=(paths_to_process : Array(String)) #

[View source]
def process_file(file_path : String, config : ProcessingConfig) #

Processes a single file.


[View source]
def process_files_concurrently(files : Array(String), config : ProcessingConfig) #

Processes files concurrently using worker pool


[View source]
def process_path(path_to_process, config) #

Processes a file or directory path


[View source]
def read_gitignore(dir_path) #

Reads .gitignore rules


[View source]
def read_paths_from_stdin(use_null_separator : Bool = false, input_io : IO = STDIN) : Array(String) #

Reads paths from stdin, matching Python's read_paths_from_stdin behavior


[View source]
def run(args, stdin_io : IO | Nil = nil) #

[View source]
def should_ignore_dir?(dir_path, config, gitignore_rules = config.gitignore_rules) #

Checks if a directory should be ignored based on ignore patterns (unless ignore_files_only)


[View source]
def should_ignore_file?(file_path, config, gitignore_rules = config.gitignore_rules) #

Checks if a file should be ignored based on gitignore and ignore patterns


[View source]
def should_include_by_extension?(file_path, config) #

Checks if a file should be included based on extensions


[View source]