String With File: add range input

tobyspark said: "Would it be possible to develop it slightly to have a line number input, so QC would have the ability to read a single line from a longer text file?"

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

smokris's picture
range type, begin, end

I envision it as follows:

  • Range Type input --- specify what "Begin" and "End" mean. Choices to include: Lines, Bytes, or (default) Complete File
  • Range Begin
  • Range End

tobyspark's picture
other options and more info

...that was from an email written half a year ago! haha!

  • 'reload file' as signal (ie. a boolean input that triggers on rising edge)
  • encoding format (choice of unicode or whatever the standard windows roman encoding is).

i used this node to read text files being created on the server. as-was, it would only read the file when the document was opened. it should be able to reread the file on a trigger or when the file path changes.

the files arrived onto the BSD server from a windows based director application, so weren't unicode. i needed to run the text through the iconv command line utility (standard on tiger), something like this: iconv -f MS-ANSI -t UTF8

also i couldn't use the string scanner node, as there was no way i could coax it to split the string by a carriage return. i may have missed a trick, but i certainly tried everything i knew. if there was, there would be no need for the range input unless you're loading superhuge files.

now having said all that, for any future projects i'll most likely be using the new shell script node, and the precise unix-fu to achieve the exact text reading and filtering capability i need.