Closed sreekaransrinath closed 4 years ago
Hi there! I found this repository through twitter and it looks very interesting. I definitely want to work on this issue 😄
It looks like there are about 150+ duplicates in extensiondict.py
.
I feel there might be a better way to store the extension - file type mapping. Maybe in a separate file, not as a dictionary/ python object, but still in a readable format.
Something like this?
extensions.dat
.vcf : Other/Uncategorized
.8svx : Media/Audio
.aac : Media/Audio
.ac3 : Media/Audio
.aif : Media/Audio
.amr : Media/Audio
.cda : Media/Audio
.fit : Media/Audio
Without changing the interaction/interface with other python files, only the function - getpath.
I suggest this idea because I feel it will be easier to write scripts/ a parser to work on that file and make large/repetitive changes such as removing duplicates, adding prefixes, etc.
If you feel it's a good idea I can start working on that too.
Thank you for this program 👍
Hi Rohan, thank you for your response!
That sounds like a great idea, go for it!
P.S. How exactly did you find this through twitter? xD
Hi,
I've opened a PR fixing this issue. But I've not included an extra utility file that can be used to search and delete items from the extensions.dat
file as I felt those operations could be done with a text editor too.
This is the file : extensionutil.py
Thank you for your time :)
P.S. This issue was mentioned by a twitter-bot over here: https://twitter.com/first_tmrs_only/status/1280456019748012032
extensiondict.py is riddled with duplicates from all the PRs I accepted, your task would require you to find and eliminate said duplicate keys.