MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / unicode_text_lines_from_binary

Function unicode_text_lines_from_binary

src/textcode/analysis.py:179–187  ·  view source on GitHub ↗

Return an iterable over unicode text lines extracted from a binary file at location.

(location)

Source from the content-addressed store, hash-verified

177
178
179def unicode_text_lines_from_binary(location):
180 """
181 Return an iterable over unicode text lines extracted from a binary file at
182 location.
183 """
184 T = typecode.get_type(location)
185 if T.contains_text:
186 for line in strings.strings_from_file(location):
187 yield remove_verbatim_cr_lf_tab_chars(line)
188
189
190def unicode_text_lines_from_pdf(location):

Callers 1

numbered_text_linesFunction · 0.85

Calls 2

get_typeMethod · 0.80

Tested by

no test coverage detected