• R/O
  • SSH

execsql: コミット

Default repository for execsql.py


コミットメタ情報

リビジョン8d8959f8ef8d4cb65fef71dd34e986eefb7aed03 (tree)
日時2023-04-19 12:06:09
作者rdnielsen
コミッターrdnielsen

ログメッセージ

Fixed description handling when exporting multiple tables to ODS at once.

変更サマリ

差分

diff -r 323a0d79b131 -r 8d8959f8ef8d execsql/execsql.py
--- a/execsql/execsql.py Fri Apr 07 10:52:23 2023 -0700
+++ b/execsql/execsql.py Tue Apr 18 20:06:09 2023 -0700
@@ -27,12 +27,12 @@
2727 #
2828 # ===============================================================================
2929
30-__version__ = "1.115.2"
31-__vdate = "2023-04-07"
30+__version__ = "1.115.3"
31+__vdate = "2023-04-18"
3232
3333 primary_vno = 1
3434 secondary_vno = 115
35-tertiary_vno = 2
35+tertiary_vno = 3
3636
3737 import os
3838 import os.path
@@ -13767,8 +13767,9 @@
1376713767
1376813768 def write_queries_to_ods(table_list, db, outfile, append=False, tee=False, desc=None):
1376913769 tables = [t.strip() for t in table_list.split(",")]
13770- descriptions = [d.strip() for d in desc.split(",")]
13771- one_desc = len(descriptions) != len(tables)
13770+ if desc is not None:
13771+ descriptions = [d.strip() for d in desc.split(",")]
13772+ one_desc = len(descriptions) != len(tables)
1377213773 if os.path.isfile(outfile) and not append:
1377313774 os.unlink(outfile)
1377413775 wbk = OdsFile()
@@ -13815,10 +13816,13 @@
1381513816 # Add sheet to workbook
1381613817 wbk.add_sheet(tbl)
1381713818 # Add information to the "Datasheets" sheet.
13818- if one_desc:
13819- d = desc
13820- else:
13821- d = descriptions[i]
13819+ if desc is None:
13820+ d = None
13821+ else:
13822+ if one_desc:
13823+ d = desc
13824+ else:
13825+ d = descriptions[i]
1382213826 datasheetlist = wbk.sheet_named(inventory_name)
1382313827 if datasheetlist:
1382413828 script, lno = current_script_line()
diff -r 323a0d79b131 -r 8d8959f8ef8d setup.py
--- a/setup.py Fri Apr 07 10:52:23 2023 -0700
+++ b/setup.py Tue Apr 18 20:06:09 2023 -0700
@@ -5,7 +5,7 @@
55 long_description = f.read()
66
77 setuptools.setup(name='execsql',
8- version='1.115.2',
8+ version='1.115.3',
99 description="Runs a SQL script against a PostgreSQL, MS-Access, SQLite, MS-SQL-Server, MySQL, MariaDB, Firebird, or Oracle database, or an ODBC DSN. Provides metacommands to import and export data, copy data between databases, conditionally execute SQL and metacommands, and dynamically alter SQL and metacommands with substitution variables. Data can be exported in 18 different formats, including CSV, TSV, ODS, HTML, JSON, LaTeX, and Markdown tables, and using custom templates.",
1010 author='Dreas Nielsen',
1111 author_email='dreas.nielsen@gmail.com',
旧リポジトリブラウザで表示