Extract split symbols (line or pair) from source files. Analyzes source code and extracts comments based on file type.
bash
splitsym <file> [--lines M-N] [--config CONFIG]
ArgumentDescriptionfileSource file to analyze (required)--linesOptional line range (e.g., 100-200)--configPath to symbols.json config (default: ~/.config/splitsym/symbols.json)
ExtensionComment Style.py, .rb, .sh, .yaml``# comment``.c, .js, .ts, .java``// comment``.sql, .hs``-- comment``.lisp, .clj``; comment``.tex, .erl``% comment``.html, .xml, .vue``<!-- comment -->``.py``"""docstring""" or '''docstring'''``.ml, .mli``(* comment *)
bash
# Extract all comments from a Python file
splitsym myfile.py
# Extract comments from specific line range
splitsym myfile.py --lines 100-200
# Use custom config
splitsym myfile.py --config ./my-symbols.json
text
123 PAIR: multi-line comment content...
45 # This is a comment line
PAIR: prefix indicates multi-line block comments