lukasschwab / arxiv.py

Python wrapper for the arXiv API
MIT License
1.07k stars 120 forks source link

Replace `/` with `_` in legacy-format IDs in download filenames #118

Closed lukasschwab closed 1 year ago

lukasschwab commented 1 year ago

Description

Replace / with _ in download ID components

Fixes #117. Differentiates character-escaping strategies for paper titles and paper IDs:

Adds a regression test.

Notes

I'm not super happy with this solution, but I think it's minimally-breaking. Have to retain backwards-compatibility with a bad filename-sanitization scheme — too bad!

For more sophisticated (but more restricted) strategies, see e.g. Django's slugify.

Breaking changes

List any changes that break the API usage supported on master.

None

Relevant issues

List GitHub issues relevant to this change.

Checklist