datatemplates icon indicating copy to clipboard operation
datatemplates copied to clipboard

Add support for more file types supported by the standard library

Open janbrohl opened this issue 5 years ago • 5 comments

Add support for:

  • INI files via https://docs.python.org/3/library/configparser.html
  • Unix "databases" via https://docs.python.org/3/library/dbm.html
  • SQLite3 databases via https://docs.python.org/3/library/sqlite3.html
  • ZIP archives via https://docs.python.org/3/library/zipfile.html
  • tar archives via https://docs.python.org/3/library/tarfile.html

janbrohl avatar Jun 11 '19 17:06 janbrohl

SQLite databases can be handled somewhat with https://github.com/sphinx-contrib/sqltable although I do like the idea of adding template support there. We may be able to simplify that code to use list tables, too, instead of generating the more complex table structure.

I'm not sure what we would do with templates and ZIP or tar archives. What did you have in mind there, iterating over the content?

dhellmann avatar Jun 11 '19 19:06 dhellmann

For ZIP and tar iterating entries and metadata, possibly content as a single string each.

janbrohl avatar Jun 11 '19 19:06 janbrohl

Actually the reason for the list is "because we can" without adding additional dependencies. While I am sure there are use cases, I don't have any on my mind.

janbrohl avatar Jun 11 '19 19:06 janbrohl

#28 adds basic support for Unix "databases" but I am not quite sure if this is worth including.

janbrohl avatar Jun 13 '19 18:06 janbrohl

If we add support for adding custom loaders more directly than via the import-module directive, this would be obsolete.

janbrohl avatar Jan 17 '20 19:01 janbrohl