Skip to content

Allow inferring source format from alternate string #95

@yajo

Description

@yajo

Is your feature request related to a problem? Please describe.

I'm integrating sqlitebiter into another system whose storage is content-addressable.

The file name on disk doesn't contain the original file name; only its content hash.

The original file name is stored elsewhere in a separate DB.

Describe the solution you'd like

A --format-from-filename option in sqlitebiter file and/or sqlitebiter stdin that allows me to pass a filename to be considered for automatic format detection, instead of the filename of the file being processed (which BTW isn't available in sqlitebiter stdin mode).

Describe alternatives you've considered

Creating a copy of the file with another name, converting it and removing it. Duplicates desired disk space, so it's not a good solution.

I also tried creating a symlink with the appropriate name that points to the hashed file. It doesn't work because:

  • If I don't pass --follow-symlinks, it's skipped.
  • If I pass it, it tries to obtain the file name from the target of the symlink, which, again, is just a hash.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions