go-shiori / obelisk

Go package and CLI tool for saving web page as single HTML file
MIT License
249 stars 18 forks source link

Add support for specifying a path for archive resources #12

Open waybackarchiver opened 2 years ago

waybackarchiver commented 2 years ago

It is proposed the flag be marked -directory and the short flag -d.

abhijit-hota commented 2 years ago

I believe this is already achieved via the --output option. From the README (emphasis mine):

  • If --output flag is not specified then Obelisk will generate file name for the archive and save it in current working directory.
  • If --output flag is set to - and there is only one URL to process (either from input file or from CLI arguments) then the default output will be stdout.
  • If --output flag is specified but there are more than one URL to process, Obelisk will generate file name for the archive, but keep using the directory from the specified output path.
  • If --output flag is specified but it sets to an existing directory, Obelisk will also generate file name for the archive.

Example usage:

obelisk "https://philipptanlak.com/web-frontends-in-go" --output blogs/go-frontend.html
waybackarchiver commented 2 years ago

I believe this is already achieved via the --output option. From the README (emphasis mine):

  • If --output flag is not specified then Obelisk will generate file name for the archive and save it in current working directory.
  • If --output flag is set to - and there is only one URL to process (either from input file or from CLI arguments) then the default output will be stdout.
  • If --output flag is specified but there are more than one URL to process, Obelisk will generate file name for the archive, but keep using the directory from the specified output path.
  • If --output flag is specified but it sets to an existing directory, Obelisk will also generate file name for the archive.

Example usage:

obelisk "https://philipptanlak.com/web-frontends-in-go" --output blogs/go-frontend.html

You are right. The --output flag is used to archive a single file but separate files with Archiver.WrapDirectory.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days