WebArchiveExtractor icon indicating copy to clipboard operation
WebArchiveExtractor copied to clipboard

Add CLI support

Open An-GG opened this issue 2 years ago • 4 comments

This adds support for using the built executable from the command line. If valid command line arguments are detected, the file is extracted and the program exits without launching graphical windows.

Additionally, some improvements / organized some stuff:

  • The extraction logic has been refactored to be reusable and moved to the Extraction class.
  • Adjusted build settings to fix code-signing, everyone should be able to build with a one-liner
  • rewrote readme with install and build instructions

An-GG avatar Jun 28 '22 05:06 An-GG

Thank you for the submission @An-GG! I'll have a look at this in the next few days.

On first pass, the printf bits in the logging with the ansii escape chars were initially a red flag for me - maybe remove those if they were just there for debugging.

Looking further, it looks like some interesting stuff will have a deeper look soon :)

robrohan avatar Sep 04 '23 20:09 robrohan

Hi Rob, happy to help you merge this PR. Should be able to get back to you on these concerns tonight.

An-GG avatar Sep 05 '23 14:09 An-GG

honestly i dunno, all I remember is that the project would not build in Xcode, there was some recommendation given by Xcode to fix the issue and I hit apply, and then it built (and then these edits showed up in the git diff)

  • are you able to build with this change reverted?
  • are you able to build with xcodebuild from the command line? (its possible I made this change to fix command line only builds)

xcodebuild -project WebArchiveExtractor.xcodeproj works fine but i'd double check if it reproduces in CI

An-GG avatar Sep 06 '23 01:09 An-GG

probably not the right place for this but great article. i learned something new

An-GG avatar Sep 06 '23 07:09 An-GG