Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: suffix and stem file columns #372

Closed
simonw opened this issue Jan 9, 2022 · 1 comment
Closed

Idea: suffix and stem file columns #372

simonw opened this issue Jan 9, 2022 · 1 comment
Labels
cli-tool enhancement New feature or request
Milestone

Comments

@simonw
Copy link
Owner

simonw commented Jan 9, 2022

For https://sqlite-utils.datasette.io/en/stable/cli.html#inserting-data-from-files

Given a file called dogs.jpg stem would be dogs and ext would be jpg.

Need to decide what happens for dogs.and.cats.jpg.gz.

@simonw simonw added enhancement New feature or request cli-tool labels Jan 9, 2022
@simonw
Copy link
Owner Author

simonw commented Jan 9, 2022

Pathlib says the stem of that would be dogs.and.cats.jpg - best stick with that for consistency. https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.suffix

It calls the last bit suffix - maybe I should use that instead of ext.

@simonw simonw changed the title Idea: ext and stem file columns Idea: suffix and stem file columns Jan 9, 2022
@simonw simonw closed this as completed in c9ecd0d Jan 9, 2022
@simonw simonw added this to the 3.21 milestone Jan 10, 2022
simonw added a commit that referenced this issue Jan 11, 2022
simonw added a commit that referenced this issue Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli-tool enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant