supitsdu / clipper

Seamlessly copy file contents to clipboard from command line. Lightweight, cross-platform tool for instant text transfers.
MIT License
3 stars 3 forks source link

Changes for issue (Reduce complexity when parsing content #14) #15

Closed karimalzalek closed 2 months ago

karimalzalek commented 2 months ago

@supitsdu Code changes include:

Extracted Content Parsing Logic: The parseContent function handles the logic of determining the content string based on the directText flag and file arguments.

Simplified Main Function: The main function is now more concise, focusing on flag parsing, calling parseContent, and handling the result.

Error Handling: The error handling is streamlined, with errors being returned from parseContent and handled in the main function.

ccoVeille commented 2 months ago

I reviewed the commit instead of the PR :facepalm:

https://github.com/karimalzalek/clipper/commit/d7d51ef6b3fa6468bf3df136375973fc76dea4cd#r143456813

ccoVeille commented 2 months ago

Fixes #14

ccoVeille commented 2 months ago

I should have been clearer, they were things I reported on the commit

Let me review there