Skip to content

Add Support for Reading Source Text From Standard Input#43

Open
kilo52 wants to merge 5 commits intomasterfrom
feature/read-stdin
Open

Add Support for Reading Source Text From Standard Input#43
kilo52 wants to merge 5 commits intomasterfrom
feature/read-stdin

Conversation

@kilo52
Copy link
Copy Markdown
Member

@kilo52 kilo52 commented Apr 12, 2026

Adds support in scount to specify via the '-' argument that the input should not be read from a file but rather taken from standard input. By providing an explicit extension '-.ext', the user can further specify that the provided source input should be treated as source formatted in a specific format or programming language.

Implemented functionality to read source text from stdin, allowing users to
specify input using '-' or '-.ext'. This implementation is kept rather simple,
effectively reading input from stdin and writing it into a temporary file. This
is done so that the path to the temporary file can be passed to the API
of the rcnCount() function. This avoids the need to introduce another API
function at this point, or to provide a quasi separate implementation of
rcnCount() in the scount code.

[CL]: Added support in scount for reading source input via stdin. [Issue#31]

Signed-off-by: Phil Gaiser <phil.gaiser@raven-computing.com>
@kilo52 kilo52 self-assigned this Apr 12, 2026
@kilo52 kilo52 added the Feature New feature label Apr 12, 2026
@kilo52 kilo52 linked an issue Apr 12, 2026 that may be closed by this pull request
kilo52 added 4 commits April 14, 2026 21:32
Signed-off-by: Phil Gaiser <phil.gaiser@raven-computing.com>
Signed-off-by: Phil Gaiser <phil.gaiser@raven-computing.com>
Signed-off-by: Phil Gaiser <phil.gaiser@raven-computing.com>
…s invalid.

Signed-off-by: Phil Gaiser <phil.gaiser@raven-computing.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Support for Reading Source Files From Standard Input

1 participant