CDX-Writer
CDX-Writer copied to clipboard
Possibility of writing a file name without any path in `g` field?
If you instantiate a CDX_Writer with a file argument that contains a relative or absolute path and you use the default of use_full_path=False and file_prefix=None the g field is written with the relative or absolute path as given in file. Is that the intended behavior or is it meant to write the file name only as you would get with something like self.warc_path = os.path.basename(file)?
It is an intended behavior. We run cdx_writer with W/ARC files in the current working directory. So never saw a need for stripping path part from file.