@v587d/capital-generation 2.28.0 → 2.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/README.md +5 -4
- package/THIRD_PARTY_NOTICES.md +16 -0
- package/automation/package.json +1 -1
- package/chart-ui/package.json +1 -1
- package/config/package.json +1 -1
- package/lib/collector-runtime.js +56 -1
- package/lib/data-collector/catalog-taxonomy.d.ts +1 -1
- package/lib/data-collector/catalog-taxonomy.js +33 -0
- package/lib/data-collector/tools.js +7 -7
- package/lib/host-version.d.ts +9 -0
- package/lib/host-version.js +57 -0
- package/lib/python-runtime/errors.d.ts +1 -1
- package/lib/python-runtime/errors.js +2 -0
- package/lib/python-runtime/manager.d.ts +28 -1
- package/lib/python-runtime/manager.js +141 -5
- package/lib/python-runtime/probe.d.ts +24 -0
- package/lib/python-runtime/probe.js +66 -50
- package/lib/runtime-entry.js +8 -0
- package/lib/sources/csindex-http.d.ts +4 -0
- package/lib/sources/csindex-http.js +233 -0
- package/lib/sources/eastmoney-http.js +1504 -1
- package/lib/sources/fuyao-rest.js +168 -8
- package/lib/sources/official-http.d.ts +4 -0
- package/lib/sources/official-http.js +477 -0
- package/lib/sources/python-remote.d.ts +25 -0
- package/lib/sources/python-remote.js +461 -0
- package/lib/sources/sina-http.d.ts +2 -0
- package/lib/sources/sina-http.js +484 -0
- package/lib/sources/tencent-http.js +23 -8
- package/lib/sources/ths-http.d.ts +2 -0
- package/lib/sources/ths-http.js +514 -0
- package/lib/time/tools.js +19 -0
- package/lib/web-retriever/local-fetch.d.ts +1 -1
- package/lib/web-retriever/local-fetch.js +1 -1
- package/lib/web-retriever/sources.d.ts +7 -0
- package/lib/web-retriever/sources.js +46 -21
- package/lib/web-retriever/throttle.d.ts +8 -0
- package/lib/web-retriever/throttle.js +13 -0
- package/lib/web-retriever/tools.js +1 -1
- package/lib/web-retriever/wind-client.d.ts +1 -1
- package/lib/web-retriever/wind-client.js +1 -1
- package/package.json +6 -3
- package/preset/capital-generation/agent.patch.yml +7 -5
- package/preset/capital-generation/skills/capital-data-protocol/SKILL.md +16 -16
- package/python/scripts/baostock_stock_basic.py +129 -0
- package/python/scripts/baostock_valuation_history.py +141 -0
- package/python/scripts/pbc_social_financing.py +291 -0
- package/python/vendor/baostock/LICENSE +19 -0
- package/python/vendor/baostock/__init__.py +42 -0
- package/python/vendor/baostock/common/__init__.py +0 -0
- package/python/vendor/baostock/common/contants.py +189 -0
- package/python/vendor/baostock/common/context.py +4 -0
- package/python/vendor/baostock/corpreport/__init__.py +0 -0
- package/python/vendor/baostock/corpreport/corp_performance.py +202 -0
- package/python/vendor/baostock/data/__init__.py +0 -0
- package/python/vendor/baostock/data/messageheader.py +17 -0
- package/python/vendor/baostock/data/msg.py +21 -0
- package/python/vendor/baostock/data/resultset.py +200 -0
- package/python/vendor/baostock/demo/__init__.py +0 -0
- package/python/vendor/baostock/demo/demo_A_stock_5mk-data.py +34 -0
- package/python/vendor/baostock/demo/demo_A_stock_k_data.py +36 -0
- package/python/vendor/baostock/demo/demo_AllStock.py +27 -0
- package/python/vendor/baostock/demo/demo_Balance_data.py +22 -0
- package/python/vendor/baostock/demo/demo_CashFlow_data.py +22 -0
- package/python/vendor/baostock/demo/demo_Dividend_data.py +35 -0
- package/python/vendor/baostock/demo/demo_Dupont_data.py +25 -0
- package/python/vendor/baostock/demo/demo_Forecast_report.py +24 -0
- package/python/vendor/baostock/demo/demo_Growth_data.py +22 -0
- package/python/vendor/baostock/demo/demo_Index_k_data.py +39 -0
- package/python/vendor/baostock/demo/demo_Operation_data.py +22 -0
- package/python/vendor/baostock/demo/demo_PerformanceExpress_report.py +25 -0
- package/python/vendor/baostock/demo/demo_Profit_data.py +22 -0
- package/python/vendor/baostock/demo/demo_TradeDates.py +27 -0
- package/python/vendor/baostock/demo/demo_adjust_factor_data.py +23 -0
- package/python/vendor/baostock/demo/demo_assignDayData.py +23 -0
- package/python/vendor/baostock/demo/demo_daily_adjust_factor_data.py +28 -0
- package/python/vendor/baostock/demo/demo_daily_k_4_AStock.py +28 -0
- package/python/vendor/baostock/demo/demo_daily_k_4_ETF.py +28 -0
- package/python/vendor/baostock/demo/demo_depositRate_data.py +26 -0
- package/python/vendor/baostock/demo/demo_hs300_stocks.py +26 -0
- package/python/vendor/baostock/demo/demo_loanRate_data.py +26 -0
- package/python/vendor/baostock/demo/demo_moneySupplyDataMonth_data.py +26 -0
- package/python/vendor/baostock/demo/demo_moneySupplyDataYear_data.py +26 -0
- package/python/vendor/baostock/demo/demo_requiredReserveRatio_data.py +26 -0
- package/python/vendor/baostock/demo/demo_set_API_key.py +37 -0
- package/python/vendor/baostock/demo/demo_stockBasic_data.py +27 -0
- package/python/vendor/baostock/demo/demo_stock_Valuation_indicator_data.py +34 -0
- package/python/vendor/baostock/demo/demo_stock_industry.py +26 -0
- package/python/vendor/baostock/demo/demo_sz50stocks.py +26 -0
- package/python/vendor/baostock/demo/demo_zz500_stock.py +26 -0
- package/python/vendor/baostock/evaluation/__init__.py +0 -0
- package/python/vendor/baostock/evaluation/season_index.py +758 -0
- package/python/vendor/baostock/login/__init__.py +0 -0
- package/python/vendor/baostock/login/loginout.py +230 -0
- package/python/vendor/baostock/macroscopic/__init__.py +0 -0
- package/python/vendor/baostock/macroscopic/economic_data.py +723 -0
- package/python/vendor/baostock/metadata/__init__.py +0 -0
- package/python/vendor/baostock/metadata/stock_metadata.py +207 -0
- package/python/vendor/baostock/security/__init__.py +0 -0
- package/python/vendor/baostock/security/history.py +265 -0
- package/python/vendor/baostock/security/sectorinfo.py +1024 -0
- package/python/vendor/baostock/util/__init__.py +0 -0
- package/python/vendor/baostock/util/socketutil.py +97 -0
- package/python/vendor/baostock/util/stringutil.py +83 -0
- package/python/vendor/et_xmlfile/LICENSE +23 -0
- package/python/vendor/et_xmlfile/LICENSE.python +298 -0
- package/python/vendor/et_xmlfile/__init__.py +8 -0
- package/python/vendor/et_xmlfile/incremental_tree.py +917 -0
- package/python/vendor/et_xmlfile/xmlfile.py +158 -0
- package/python/vendor/openpyxl/LICENSE +23 -0
- package/python/vendor/openpyxl/__init__.py +19 -0
- package/python/vendor/openpyxl/_constants.py +13 -0
- package/python/vendor/openpyxl/cell/__init__.py +4 -0
- package/python/vendor/openpyxl/cell/_writer.py +136 -0
- package/python/vendor/openpyxl/cell/cell.py +332 -0
- package/python/vendor/openpyxl/cell/read_only.py +136 -0
- package/python/vendor/openpyxl/cell/rich_text.py +202 -0
- package/python/vendor/openpyxl/cell/text.py +184 -0
- package/python/vendor/openpyxl/chart/_3d.py +105 -0
- package/python/vendor/openpyxl/chart/__init__.py +19 -0
- package/python/vendor/openpyxl/chart/_chart.py +199 -0
- package/python/vendor/openpyxl/chart/area_chart.py +106 -0
- package/python/vendor/openpyxl/chart/axis.py +401 -0
- package/python/vendor/openpyxl/chart/bar_chart.py +144 -0
- package/python/vendor/openpyxl/chart/bubble_chart.py +67 -0
- package/python/vendor/openpyxl/chart/chartspace.py +195 -0
- package/python/vendor/openpyxl/chart/data_source.py +246 -0
- package/python/vendor/openpyxl/chart/descriptors.py +43 -0
- package/python/vendor/openpyxl/chart/error_bar.py +62 -0
- package/python/vendor/openpyxl/chart/label.py +127 -0
- package/python/vendor/openpyxl/chart/layout.py +74 -0
- package/python/vendor/openpyxl/chart/legend.py +75 -0
- package/python/vendor/openpyxl/chart/line_chart.py +129 -0
- package/python/vendor/openpyxl/chart/marker.py +90 -0
- package/python/vendor/openpyxl/chart/picture.py +35 -0
- package/python/vendor/openpyxl/chart/pie_chart.py +177 -0
- package/python/vendor/openpyxl/chart/pivot.py +65 -0
- package/python/vendor/openpyxl/chart/plotarea.py +162 -0
- package/python/vendor/openpyxl/chart/print_settings.py +57 -0
- package/python/vendor/openpyxl/chart/radar_chart.py +55 -0
- package/python/vendor/openpyxl/chart/reader.py +32 -0
- package/python/vendor/openpyxl/chart/reference.py +124 -0
- package/python/vendor/openpyxl/chart/scatter_chart.py +53 -0
- package/python/vendor/openpyxl/chart/series.py +197 -0
- package/python/vendor/openpyxl/chart/series_factory.py +41 -0
- package/python/vendor/openpyxl/chart/shapes.py +89 -0
- package/python/vendor/openpyxl/chart/stock_chart.py +54 -0
- package/python/vendor/openpyxl/chart/surface_chart.py +119 -0
- package/python/vendor/openpyxl/chart/text.py +78 -0
- package/python/vendor/openpyxl/chart/title.py +76 -0
- package/python/vendor/openpyxl/chart/trendline.py +98 -0
- package/python/vendor/openpyxl/chart/updown_bars.py +31 -0
- package/python/vendor/openpyxl/chartsheet/__init__.py +3 -0
- package/python/vendor/openpyxl/chartsheet/chartsheet.py +107 -0
- package/python/vendor/openpyxl/chartsheet/custom.py +61 -0
- package/python/vendor/openpyxl/chartsheet/properties.py +28 -0
- package/python/vendor/openpyxl/chartsheet/protection.py +41 -0
- package/python/vendor/openpyxl/chartsheet/publish.py +58 -0
- package/python/vendor/openpyxl/chartsheet/relation.py +97 -0
- package/python/vendor/openpyxl/chartsheet/views.py +51 -0
- package/python/vendor/openpyxl/comments/__init__.py +4 -0
- package/python/vendor/openpyxl/comments/author.py +21 -0
- package/python/vendor/openpyxl/comments/comment_sheet.py +211 -0
- package/python/vendor/openpyxl/comments/comments.py +62 -0
- package/python/vendor/openpyxl/comments/shape_writer.py +112 -0
- package/python/vendor/openpyxl/compat/__init__.py +54 -0
- package/python/vendor/openpyxl/compat/abc.py +8 -0
- package/python/vendor/openpyxl/compat/numbers.py +43 -0
- package/python/vendor/openpyxl/compat/product.py +17 -0
- package/python/vendor/openpyxl/compat/singleton.py +40 -0
- package/python/vendor/openpyxl/compat/strings.py +25 -0
- package/python/vendor/openpyxl/descriptors/__init__.py +58 -0
- package/python/vendor/openpyxl/descriptors/base.py +272 -0
- package/python/vendor/openpyxl/descriptors/container.py +41 -0
- package/python/vendor/openpyxl/descriptors/excel.py +112 -0
- package/python/vendor/openpyxl/descriptors/namespace.py +12 -0
- package/python/vendor/openpyxl/descriptors/nested.py +129 -0
- package/python/vendor/openpyxl/descriptors/sequence.py +136 -0
- package/python/vendor/openpyxl/descriptors/serialisable.py +240 -0
- package/python/vendor/openpyxl/descriptors/slots.py +18 -0
- package/python/vendor/openpyxl/drawing/__init__.py +4 -0
- package/python/vendor/openpyxl/drawing/colors.py +435 -0
- package/python/vendor/openpyxl/drawing/connector.py +144 -0
- package/python/vendor/openpyxl/drawing/drawing.py +92 -0
- package/python/vendor/openpyxl/drawing/effect.py +407 -0
- package/python/vendor/openpyxl/drawing/fill.py +425 -0
- package/python/vendor/openpyxl/drawing/geometry.py +584 -0
- package/python/vendor/openpyxl/drawing/graphic.py +177 -0
- package/python/vendor/openpyxl/drawing/image.py +65 -0
- package/python/vendor/openpyxl/drawing/line.py +144 -0
- package/python/vendor/openpyxl/drawing/picture.py +144 -0
- package/python/vendor/openpyxl/drawing/properties.py +174 -0
- package/python/vendor/openpyxl/drawing/relation.py +17 -0
- package/python/vendor/openpyxl/drawing/spreadsheet_drawing.py +382 -0
- package/python/vendor/openpyxl/drawing/text.py +717 -0
- package/python/vendor/openpyxl/drawing/xdr.py +33 -0
- package/python/vendor/openpyxl/formatting/__init__.py +3 -0
- package/python/vendor/openpyxl/formatting/formatting.py +114 -0
- package/python/vendor/openpyxl/formatting/rule.py +291 -0
- package/python/vendor/openpyxl/formula/__init__.py +3 -0
- package/python/vendor/openpyxl/formula/tokenizer.py +446 -0
- package/python/vendor/openpyxl/formula/translate.py +166 -0
- package/python/vendor/openpyxl/packaging/__init__.py +3 -0
- package/python/vendor/openpyxl/packaging/core.py +115 -0
- package/python/vendor/openpyxl/packaging/custom.py +289 -0
- package/python/vendor/openpyxl/packaging/extended.py +137 -0
- package/python/vendor/openpyxl/packaging/interface.py +56 -0
- package/python/vendor/openpyxl/packaging/manifest.py +194 -0
- package/python/vendor/openpyxl/packaging/relationship.py +158 -0
- package/python/vendor/openpyxl/packaging/workbook.py +185 -0
- package/python/vendor/openpyxl/pivot/__init__.py +1 -0
- package/python/vendor/openpyxl/pivot/cache.py +965 -0
- package/python/vendor/openpyxl/pivot/fields.py +326 -0
- package/python/vendor/openpyxl/pivot/record.py +111 -0
- package/python/vendor/openpyxl/pivot/table.py +1261 -0
- package/python/vendor/openpyxl/reader/__init__.py +1 -0
- package/python/vendor/openpyxl/reader/drawings.py +71 -0
- package/python/vendor/openpyxl/reader/excel.py +349 -0
- package/python/vendor/openpyxl/reader/strings.py +44 -0
- package/python/vendor/openpyxl/reader/workbook.py +133 -0
- package/python/vendor/openpyxl/styles/__init__.py +11 -0
- package/python/vendor/openpyxl/styles/alignment.py +62 -0
- package/python/vendor/openpyxl/styles/borders.py +103 -0
- package/python/vendor/openpyxl/styles/builtins.py +1397 -0
- package/python/vendor/openpyxl/styles/cell_style.py +206 -0
- package/python/vendor/openpyxl/styles/colors.py +172 -0
- package/python/vendor/openpyxl/styles/differential.py +95 -0
- package/python/vendor/openpyxl/styles/fills.py +224 -0
- package/python/vendor/openpyxl/styles/fonts.py +113 -0
- package/python/vendor/openpyxl/styles/named_styles.py +282 -0
- package/python/vendor/openpyxl/styles/numbers.py +200 -0
- package/python/vendor/openpyxl/styles/protection.py +17 -0
- package/python/vendor/openpyxl/styles/proxy.py +62 -0
- package/python/vendor/openpyxl/styles/styleable.py +151 -0
- package/python/vendor/openpyxl/styles/stylesheet.py +274 -0
- package/python/vendor/openpyxl/styles/table.py +94 -0
- package/python/vendor/openpyxl/utils/__init__.py +17 -0
- package/python/vendor/openpyxl/utils/bound_dictionary.py +26 -0
- package/python/vendor/openpyxl/utils/cell.py +240 -0
- package/python/vendor/openpyxl/utils/dataframe.py +87 -0
- package/python/vendor/openpyxl/utils/datetime.py +140 -0
- package/python/vendor/openpyxl/utils/escape.py +43 -0
- package/python/vendor/openpyxl/utils/exceptions.py +34 -0
- package/python/vendor/openpyxl/utils/formulas.py +24 -0
- package/python/vendor/openpyxl/utils/indexed_list.py +49 -0
- package/python/vendor/openpyxl/utils/inference.py +60 -0
- package/python/vendor/openpyxl/utils/protection.py +22 -0
- package/python/vendor/openpyxl/utils/units.py +108 -0
- package/python/vendor/openpyxl/workbook/__init__.py +4 -0
- package/python/vendor/openpyxl/workbook/_writer.py +197 -0
- package/python/vendor/openpyxl/workbook/child.py +166 -0
- package/python/vendor/openpyxl/workbook/defined_name.py +189 -0
- package/python/vendor/openpyxl/workbook/external_link/__init__.py +3 -0
- package/python/vendor/openpyxl/workbook/external_link/external.py +190 -0
- package/python/vendor/openpyxl/workbook/external_reference.py +18 -0
- package/python/vendor/openpyxl/workbook/function_group.py +36 -0
- package/python/vendor/openpyxl/workbook/properties.py +151 -0
- package/python/vendor/openpyxl/workbook/protection.py +163 -0
- package/python/vendor/openpyxl/workbook/smart_tags.py +56 -0
- package/python/vendor/openpyxl/workbook/views.py +155 -0
- package/python/vendor/openpyxl/workbook/web.py +98 -0
- package/python/vendor/openpyxl/workbook/workbook.py +438 -0
- package/python/vendor/openpyxl/worksheet/__init__.py +1 -0
- package/python/vendor/openpyxl/worksheet/_read_only.py +190 -0
- package/python/vendor/openpyxl/worksheet/_reader.py +472 -0
- package/python/vendor/openpyxl/worksheet/_write_only.py +160 -0
- package/python/vendor/openpyxl/worksheet/_writer.py +390 -0
- package/python/vendor/openpyxl/worksheet/cell_range.py +512 -0
- package/python/vendor/openpyxl/worksheet/cell_watch.py +34 -0
- package/python/vendor/openpyxl/worksheet/controls.py +107 -0
- package/python/vendor/openpyxl/worksheet/copier.py +70 -0
- package/python/vendor/openpyxl/worksheet/custom.py +35 -0
- package/python/vendor/openpyxl/worksheet/datavalidation.py +202 -0
- package/python/vendor/openpyxl/worksheet/dimensions.py +306 -0
- package/python/vendor/openpyxl/worksheet/drawing.py +14 -0
- package/python/vendor/openpyxl/worksheet/errors.py +93 -0
- package/python/vendor/openpyxl/worksheet/filters.py +486 -0
- package/python/vendor/openpyxl/worksheet/formula.py +51 -0
- package/python/vendor/openpyxl/worksheet/header_footer.py +270 -0
- package/python/vendor/openpyxl/worksheet/hyperlink.py +46 -0
- package/python/vendor/openpyxl/worksheet/merge.py +141 -0
- package/python/vendor/openpyxl/worksheet/ole.py +133 -0
- package/python/vendor/openpyxl/worksheet/page.py +174 -0
- package/python/vendor/openpyxl/worksheet/pagebreak.py +94 -0
- package/python/vendor/openpyxl/worksheet/picture.py +8 -0
- package/python/vendor/openpyxl/worksheet/print_settings.py +184 -0
- package/python/vendor/openpyxl/worksheet/properties.py +97 -0
- package/python/vendor/openpyxl/worksheet/protection.py +120 -0
- package/python/vendor/openpyxl/worksheet/related.py +17 -0
- package/python/vendor/openpyxl/worksheet/scenario.py +105 -0
- package/python/vendor/openpyxl/worksheet/smart_tag.py +78 -0
- package/python/vendor/openpyxl/worksheet/table.py +385 -0
- package/python/vendor/openpyxl/worksheet/views.py +155 -0
- package/python/vendor/openpyxl/worksheet/worksheet.py +907 -0
- package/python/vendor/openpyxl/writer/__init__.py +1 -0
- package/python/vendor/openpyxl/writer/excel.py +295 -0
- package/python/vendor/openpyxl/writer/theme.py +291 -0
- package/python/vendor/openpyxl/xml/__init__.py +42 -0
- package/python/vendor/openpyxl/xml/constants.py +129 -0
- package/python/vendor/openpyxl/xml/functions.py +87 -0
- package/watchlist/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
4
|
+
from openpyxl.descriptors import (
|
|
5
|
+
Typed,
|
|
6
|
+
Alias,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from openpyxl.descriptors.excel import ExtensionList
|
|
10
|
+
from openpyxl.descriptors.nested import NestedBool
|
|
11
|
+
|
|
12
|
+
from .text import Text, RichText
|
|
13
|
+
from .layout import Layout
|
|
14
|
+
from .shapes import GraphicalProperties
|
|
15
|
+
|
|
16
|
+
from openpyxl.drawing.text import (
|
|
17
|
+
Paragraph,
|
|
18
|
+
RegularTextRun,
|
|
19
|
+
LineBreak,
|
|
20
|
+
ParagraphProperties,
|
|
21
|
+
CharacterProperties,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Title(Serialisable):
|
|
26
|
+
tagname = "title"
|
|
27
|
+
|
|
28
|
+
tx = Typed(expected_type=Text, allow_none=True)
|
|
29
|
+
text = Alias('tx')
|
|
30
|
+
layout = Typed(expected_type=Layout, allow_none=True)
|
|
31
|
+
overlay = NestedBool(allow_none=True)
|
|
32
|
+
spPr = Typed(expected_type=GraphicalProperties, allow_none=True)
|
|
33
|
+
graphicalProperties = Alias('spPr')
|
|
34
|
+
txPr = Typed(expected_type=RichText, allow_none=True)
|
|
35
|
+
body = Alias('txPr')
|
|
36
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
37
|
+
|
|
38
|
+
__elements__ = ('tx', 'layout', 'overlay', 'spPr', 'txPr')
|
|
39
|
+
|
|
40
|
+
def __init__(self,
|
|
41
|
+
tx=None,
|
|
42
|
+
layout=None,
|
|
43
|
+
overlay=None,
|
|
44
|
+
spPr=None,
|
|
45
|
+
txPr=None,
|
|
46
|
+
extLst=None,
|
|
47
|
+
):
|
|
48
|
+
if tx is None:
|
|
49
|
+
tx = Text()
|
|
50
|
+
self.tx = tx
|
|
51
|
+
self.layout = layout
|
|
52
|
+
self.overlay = overlay
|
|
53
|
+
self.spPr = spPr
|
|
54
|
+
self.txPr = txPr
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def title_maker(text):
|
|
59
|
+
title = Title()
|
|
60
|
+
paraprops = ParagraphProperties()
|
|
61
|
+
paraprops.defRPr = CharacterProperties()
|
|
62
|
+
paras = [Paragraph(r=[RegularTextRun(t=s)], pPr=paraprops) for s in text.split("\n")]
|
|
63
|
+
|
|
64
|
+
title.tx.rich.paragraphs = paras
|
|
65
|
+
return title
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class TitleDescriptor(Typed):
|
|
69
|
+
|
|
70
|
+
expected_type = Title
|
|
71
|
+
allow_none = True
|
|
72
|
+
|
|
73
|
+
def __set__(self, instance, value):
|
|
74
|
+
if isinstance(value, str):
|
|
75
|
+
value = title_maker(value)
|
|
76
|
+
super().__set__(instance, value)
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
4
|
+
from openpyxl.descriptors import (
|
|
5
|
+
Typed,
|
|
6
|
+
String,
|
|
7
|
+
Alias
|
|
8
|
+
)
|
|
9
|
+
from openpyxl.descriptors.excel import ExtensionList
|
|
10
|
+
from openpyxl.descriptors.nested import (
|
|
11
|
+
NestedBool,
|
|
12
|
+
NestedInteger,
|
|
13
|
+
NestedFloat,
|
|
14
|
+
NestedSet
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
from .data_source import NumFmt
|
|
18
|
+
from .shapes import GraphicalProperties
|
|
19
|
+
from .text import RichText, Text
|
|
20
|
+
from .layout import Layout
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class TrendlineLabel(Serialisable):
|
|
24
|
+
|
|
25
|
+
tagname = "trendlineLbl"
|
|
26
|
+
|
|
27
|
+
layout = Typed(expected_type=Layout, allow_none=True)
|
|
28
|
+
tx = Typed(expected_type=Text, allow_none=True)
|
|
29
|
+
numFmt = Typed(expected_type=NumFmt, allow_none=True)
|
|
30
|
+
spPr = Typed(expected_type=GraphicalProperties, allow_none=True)
|
|
31
|
+
graphicalProperties = Alias("spPr")
|
|
32
|
+
txPr = Typed(expected_type=RichText, allow_none=True)
|
|
33
|
+
textProperties = Alias("txPr")
|
|
34
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
35
|
+
|
|
36
|
+
__elements__ = ('layout', 'tx', 'numFmt', 'spPr', 'txPr')
|
|
37
|
+
|
|
38
|
+
def __init__(self,
|
|
39
|
+
layout=None,
|
|
40
|
+
tx=None,
|
|
41
|
+
numFmt=None,
|
|
42
|
+
spPr=None,
|
|
43
|
+
txPr=None,
|
|
44
|
+
extLst=None,
|
|
45
|
+
):
|
|
46
|
+
self.layout = layout
|
|
47
|
+
self.tx = tx
|
|
48
|
+
self.numFmt = numFmt
|
|
49
|
+
self.spPr = spPr
|
|
50
|
+
self.txPr = txPr
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class Trendline(Serialisable):
|
|
54
|
+
|
|
55
|
+
tagname = "trendline"
|
|
56
|
+
|
|
57
|
+
name = String(allow_none=True)
|
|
58
|
+
spPr = Typed(expected_type=GraphicalProperties, allow_none=True)
|
|
59
|
+
graphicalProperties = Alias('spPr')
|
|
60
|
+
trendlineType = NestedSet(values=(['exp', 'linear', 'log', 'movingAvg', 'poly', 'power']))
|
|
61
|
+
order = NestedInteger(allow_none=True)
|
|
62
|
+
period = NestedInteger(allow_none=True)
|
|
63
|
+
forward = NestedFloat(allow_none=True)
|
|
64
|
+
backward = NestedFloat(allow_none=True)
|
|
65
|
+
intercept = NestedFloat(allow_none=True)
|
|
66
|
+
dispRSqr = NestedBool(allow_none=True)
|
|
67
|
+
dispEq = NestedBool(allow_none=True)
|
|
68
|
+
trendlineLbl = Typed(expected_type=TrendlineLabel, allow_none=True)
|
|
69
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
70
|
+
|
|
71
|
+
__elements__ = ('spPr', 'trendlineType', 'order', 'period', 'forward',
|
|
72
|
+
'backward', 'intercept', 'dispRSqr', 'dispEq', 'trendlineLbl')
|
|
73
|
+
|
|
74
|
+
def __init__(self,
|
|
75
|
+
name=None,
|
|
76
|
+
spPr=None,
|
|
77
|
+
trendlineType='linear',
|
|
78
|
+
order=None,
|
|
79
|
+
period=None,
|
|
80
|
+
forward=None,
|
|
81
|
+
backward=None,
|
|
82
|
+
intercept=None,
|
|
83
|
+
dispRSqr=None,
|
|
84
|
+
dispEq=None,
|
|
85
|
+
trendlineLbl=None,
|
|
86
|
+
extLst=None,
|
|
87
|
+
):
|
|
88
|
+
self.name = name
|
|
89
|
+
self.spPr = spPr
|
|
90
|
+
self.trendlineType = trendlineType
|
|
91
|
+
self.order = order
|
|
92
|
+
self.period = period
|
|
93
|
+
self.forward = forward
|
|
94
|
+
self.backward = backward
|
|
95
|
+
self.intercept = intercept
|
|
96
|
+
self.dispRSqr = dispRSqr
|
|
97
|
+
self.dispEq = dispEq
|
|
98
|
+
self.trendlineLbl = trendlineLbl
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
4
|
+
from openpyxl.descriptors import Typed
|
|
5
|
+
from openpyxl.descriptors.excel import ExtensionList
|
|
6
|
+
|
|
7
|
+
from .shapes import GraphicalProperties
|
|
8
|
+
from .axis import ChartLines
|
|
9
|
+
from .descriptors import NestedGapAmount
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class UpDownBars(Serialisable):
|
|
13
|
+
|
|
14
|
+
tagname = "upbars"
|
|
15
|
+
|
|
16
|
+
gapWidth = NestedGapAmount()
|
|
17
|
+
upBars = Typed(expected_type=ChartLines, allow_none=True)
|
|
18
|
+
downBars = Typed(expected_type=ChartLines, allow_none=True)
|
|
19
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
20
|
+
|
|
21
|
+
__elements__ = ('gapWidth', 'upBars', 'downBars')
|
|
22
|
+
|
|
23
|
+
def __init__(self,
|
|
24
|
+
gapWidth=150,
|
|
25
|
+
upBars=None,
|
|
26
|
+
downBars=None,
|
|
27
|
+
extLst=None,
|
|
28
|
+
):
|
|
29
|
+
self.gapWidth = gapWidth
|
|
30
|
+
self.upBars = upBars
|
|
31
|
+
self.downBars = downBars
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from openpyxl.descriptors import Typed, Set, Alias
|
|
5
|
+
from openpyxl.descriptors.excel import ExtensionList
|
|
6
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
7
|
+
from openpyxl.drawing.spreadsheet_drawing import (
|
|
8
|
+
AbsoluteAnchor,
|
|
9
|
+
SpreadsheetDrawing,
|
|
10
|
+
)
|
|
11
|
+
from openpyxl.worksheet.page import (
|
|
12
|
+
PageMargins,
|
|
13
|
+
PrintPageSetup
|
|
14
|
+
)
|
|
15
|
+
from openpyxl.worksheet.drawing import Drawing
|
|
16
|
+
from openpyxl.worksheet.header_footer import HeaderFooter
|
|
17
|
+
from openpyxl.workbook.child import _WorkbookChild
|
|
18
|
+
from openpyxl.xml.constants import SHEET_MAIN_NS, REL_NS
|
|
19
|
+
|
|
20
|
+
from .relation import DrawingHF, SheetBackgroundPicture
|
|
21
|
+
from .properties import ChartsheetProperties
|
|
22
|
+
from .protection import ChartsheetProtection
|
|
23
|
+
from .views import ChartsheetViewList
|
|
24
|
+
from .custom import CustomChartsheetViews
|
|
25
|
+
from .publish import WebPublishItems
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class Chartsheet(_WorkbookChild, Serialisable):
|
|
29
|
+
|
|
30
|
+
tagname = "chartsheet"
|
|
31
|
+
_default_title = "Chart"
|
|
32
|
+
_rel_type = "chartsheet"
|
|
33
|
+
_path = "/xl/chartsheets/sheet{0}.xml"
|
|
34
|
+
mime_type = "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml"
|
|
35
|
+
|
|
36
|
+
sheetPr = Typed(expected_type=ChartsheetProperties, allow_none=True)
|
|
37
|
+
sheetViews = Typed(expected_type=ChartsheetViewList)
|
|
38
|
+
sheetProtection = Typed(expected_type=ChartsheetProtection, allow_none=True)
|
|
39
|
+
customSheetViews = Typed(expected_type=CustomChartsheetViews, allow_none=True)
|
|
40
|
+
pageMargins = Typed(expected_type=PageMargins, allow_none=True)
|
|
41
|
+
pageSetup = Typed(expected_type=PrintPageSetup, allow_none=True)
|
|
42
|
+
drawing = Typed(expected_type=Drawing, allow_none=True)
|
|
43
|
+
drawingHF = Typed(expected_type=DrawingHF, allow_none=True)
|
|
44
|
+
picture = Typed(expected_type=SheetBackgroundPicture, allow_none=True)
|
|
45
|
+
webPublishItems = Typed(expected_type=WebPublishItems, allow_none=True)
|
|
46
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
47
|
+
sheet_state = Set(values=('visible', 'hidden', 'veryHidden'))
|
|
48
|
+
headerFooter = Typed(expected_type=HeaderFooter)
|
|
49
|
+
HeaderFooter = Alias('headerFooter')
|
|
50
|
+
|
|
51
|
+
__elements__ = (
|
|
52
|
+
'sheetPr', 'sheetViews', 'sheetProtection', 'customSheetViews',
|
|
53
|
+
'pageMargins', 'pageSetup', 'headerFooter', 'drawing', 'drawingHF',
|
|
54
|
+
'picture', 'webPublishItems')
|
|
55
|
+
|
|
56
|
+
__attrs__ = ()
|
|
57
|
+
|
|
58
|
+
def __init__(self,
|
|
59
|
+
sheetPr=None,
|
|
60
|
+
sheetViews=None,
|
|
61
|
+
sheetProtection=None,
|
|
62
|
+
customSheetViews=None,
|
|
63
|
+
pageMargins=None,
|
|
64
|
+
pageSetup=None,
|
|
65
|
+
headerFooter=None,
|
|
66
|
+
drawing=None,
|
|
67
|
+
drawingHF=None,
|
|
68
|
+
picture=None,
|
|
69
|
+
webPublishItems=None,
|
|
70
|
+
extLst=None,
|
|
71
|
+
parent=None,
|
|
72
|
+
title="",
|
|
73
|
+
sheet_state='visible',
|
|
74
|
+
):
|
|
75
|
+
super().__init__(parent, title)
|
|
76
|
+
self._charts = []
|
|
77
|
+
self.sheetPr = sheetPr
|
|
78
|
+
if sheetViews is None:
|
|
79
|
+
sheetViews = ChartsheetViewList()
|
|
80
|
+
self.sheetViews = sheetViews
|
|
81
|
+
self.sheetProtection = sheetProtection
|
|
82
|
+
self.customSheetViews = customSheetViews
|
|
83
|
+
self.pageMargins = pageMargins
|
|
84
|
+
self.pageSetup = pageSetup
|
|
85
|
+
if headerFooter is not None:
|
|
86
|
+
self.headerFooter = headerFooter
|
|
87
|
+
self.drawing = Drawing("rId1")
|
|
88
|
+
self.drawingHF = drawingHF
|
|
89
|
+
self.picture = picture
|
|
90
|
+
self.webPublishItems = webPublishItems
|
|
91
|
+
self.sheet_state = sheet_state
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def add_chart(self, chart):
|
|
95
|
+
chart.anchor = AbsoluteAnchor()
|
|
96
|
+
self._charts.append(chart)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def to_tree(self):
|
|
100
|
+
self._drawing = SpreadsheetDrawing()
|
|
101
|
+
self._drawing.charts = self._charts
|
|
102
|
+
tree = super().to_tree()
|
|
103
|
+
if not self.headerFooter:
|
|
104
|
+
el = tree.find('headerFooter')
|
|
105
|
+
tree.remove(el)
|
|
106
|
+
tree.set("xmlns", SHEET_MAIN_NS)
|
|
107
|
+
return tree
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
from openpyxl.worksheet.header_footer import HeaderFooter
|
|
4
|
+
|
|
5
|
+
from openpyxl.descriptors import (
|
|
6
|
+
Bool,
|
|
7
|
+
Integer,
|
|
8
|
+
Set,
|
|
9
|
+
Typed,
|
|
10
|
+
Sequence
|
|
11
|
+
)
|
|
12
|
+
from openpyxl.descriptors.excel import Guid
|
|
13
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
14
|
+
from openpyxl.worksheet.page import (
|
|
15
|
+
PageMargins,
|
|
16
|
+
PrintPageSetup
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class CustomChartsheetView(Serialisable):
|
|
21
|
+
tagname = "customSheetView"
|
|
22
|
+
|
|
23
|
+
guid = Guid()
|
|
24
|
+
scale = Integer()
|
|
25
|
+
state = Set(values=(['visible', 'hidden', 'veryHidden']))
|
|
26
|
+
zoomToFit = Bool(allow_none=True)
|
|
27
|
+
pageMargins = Typed(expected_type=PageMargins, allow_none=True)
|
|
28
|
+
pageSetup = Typed(expected_type=PrintPageSetup, allow_none=True)
|
|
29
|
+
headerFooter = Typed(expected_type=HeaderFooter, allow_none=True)
|
|
30
|
+
|
|
31
|
+
__elements__ = ('pageMargins', 'pageSetup', 'headerFooter')
|
|
32
|
+
|
|
33
|
+
def __init__(self,
|
|
34
|
+
guid=None,
|
|
35
|
+
scale=None,
|
|
36
|
+
state='visible',
|
|
37
|
+
zoomToFit=None,
|
|
38
|
+
pageMargins=None,
|
|
39
|
+
pageSetup=None,
|
|
40
|
+
headerFooter=None,
|
|
41
|
+
):
|
|
42
|
+
self.guid = guid
|
|
43
|
+
self.scale = scale
|
|
44
|
+
self.state = state
|
|
45
|
+
self.zoomToFit = zoomToFit
|
|
46
|
+
self.pageMargins = pageMargins
|
|
47
|
+
self.pageSetup = pageSetup
|
|
48
|
+
self.headerFooter = headerFooter
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class CustomChartsheetViews(Serialisable):
|
|
52
|
+
tagname = "customSheetViews"
|
|
53
|
+
|
|
54
|
+
customSheetView = Sequence(expected_type=CustomChartsheetView, allow_none=True)
|
|
55
|
+
|
|
56
|
+
__elements__ = ('customSheetView',)
|
|
57
|
+
|
|
58
|
+
def __init__(self,
|
|
59
|
+
customSheetView=None,
|
|
60
|
+
):
|
|
61
|
+
self.customSheetView = customSheetView
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
from openpyxl.descriptors import (
|
|
4
|
+
Bool,
|
|
5
|
+
String,
|
|
6
|
+
Typed
|
|
7
|
+
)
|
|
8
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
9
|
+
from openpyxl.styles import Color
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ChartsheetProperties(Serialisable):
|
|
13
|
+
tagname = "sheetPr"
|
|
14
|
+
|
|
15
|
+
published = Bool(allow_none=True)
|
|
16
|
+
codeName = String(allow_none=True)
|
|
17
|
+
tabColor = Typed(expected_type=Color, allow_none=True)
|
|
18
|
+
|
|
19
|
+
__elements__ = ('tabColor',)
|
|
20
|
+
|
|
21
|
+
def __init__(self,
|
|
22
|
+
published=None,
|
|
23
|
+
codeName=None,
|
|
24
|
+
tabColor=None,
|
|
25
|
+
):
|
|
26
|
+
self.published = published
|
|
27
|
+
self.codeName = codeName
|
|
28
|
+
self.tabColor = tabColor
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import hashlib
|
|
2
|
+
|
|
3
|
+
from openpyxl.descriptors import (Bool, Integer, String)
|
|
4
|
+
from openpyxl.descriptors.excel import Base64Binary
|
|
5
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
6
|
+
|
|
7
|
+
from openpyxl.worksheet.protection import (
|
|
8
|
+
hash_password,
|
|
9
|
+
_Protected
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ChartsheetProtection(Serialisable, _Protected):
|
|
14
|
+
tagname = "sheetProtection"
|
|
15
|
+
|
|
16
|
+
algorithmName = String(allow_none=True)
|
|
17
|
+
hashValue = Base64Binary(allow_none=True)
|
|
18
|
+
saltValue = Base64Binary(allow_none=True)
|
|
19
|
+
spinCount = Integer(allow_none=True)
|
|
20
|
+
content = Bool(allow_none=True)
|
|
21
|
+
objects = Bool(allow_none=True)
|
|
22
|
+
|
|
23
|
+
__attrs__ = ("content", "objects", "password", "hashValue", "spinCount", "saltValue", "algorithmName")
|
|
24
|
+
|
|
25
|
+
def __init__(self,
|
|
26
|
+
content=None,
|
|
27
|
+
objects=None,
|
|
28
|
+
hashValue=None,
|
|
29
|
+
spinCount=None,
|
|
30
|
+
saltValue=None,
|
|
31
|
+
algorithmName=None,
|
|
32
|
+
password=None,
|
|
33
|
+
):
|
|
34
|
+
self.content = content
|
|
35
|
+
self.objects = objects
|
|
36
|
+
self.hashValue = hashValue
|
|
37
|
+
self.spinCount = spinCount
|
|
38
|
+
self.saltValue = saltValue
|
|
39
|
+
self.algorithmName = algorithmName
|
|
40
|
+
if password is not None:
|
|
41
|
+
self.password = password
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
from openpyxl.descriptors import (
|
|
4
|
+
Bool,
|
|
5
|
+
Integer,
|
|
6
|
+
String,
|
|
7
|
+
Set,
|
|
8
|
+
Sequence
|
|
9
|
+
)
|
|
10
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class WebPublishItem(Serialisable):
|
|
14
|
+
tagname = "webPublishItem"
|
|
15
|
+
|
|
16
|
+
id = Integer()
|
|
17
|
+
divId = String()
|
|
18
|
+
sourceType = Set(values=(['sheet', 'printArea', 'autoFilter', 'range', 'chart', 'pivotTable', 'query', 'label']))
|
|
19
|
+
sourceRef = String()
|
|
20
|
+
sourceObject = String(allow_none=True)
|
|
21
|
+
destinationFile = String()
|
|
22
|
+
title = String(allow_none=True)
|
|
23
|
+
autoRepublish = Bool(allow_none=True)
|
|
24
|
+
|
|
25
|
+
def __init__(self,
|
|
26
|
+
id=None,
|
|
27
|
+
divId=None,
|
|
28
|
+
sourceType=None,
|
|
29
|
+
sourceRef=None,
|
|
30
|
+
sourceObject=None,
|
|
31
|
+
destinationFile=None,
|
|
32
|
+
title=None,
|
|
33
|
+
autoRepublish=None,
|
|
34
|
+
):
|
|
35
|
+
self.id = id
|
|
36
|
+
self.divId = divId
|
|
37
|
+
self.sourceType = sourceType
|
|
38
|
+
self.sourceRef = sourceRef
|
|
39
|
+
self.sourceObject = sourceObject
|
|
40
|
+
self.destinationFile = destinationFile
|
|
41
|
+
self.title = title
|
|
42
|
+
self.autoRepublish = autoRepublish
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class WebPublishItems(Serialisable):
|
|
46
|
+
tagname = "WebPublishItems"
|
|
47
|
+
|
|
48
|
+
count = Integer(allow_none=True)
|
|
49
|
+
webPublishItem = Sequence(expected_type=WebPublishItem, )
|
|
50
|
+
|
|
51
|
+
__elements__ = ('webPublishItem',)
|
|
52
|
+
|
|
53
|
+
def __init__(self,
|
|
54
|
+
count=None,
|
|
55
|
+
webPublishItem=None,
|
|
56
|
+
):
|
|
57
|
+
self.count = len(webPublishItem)
|
|
58
|
+
self.webPublishItem = webPublishItem
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
from openpyxl.descriptors import (
|
|
4
|
+
Integer,
|
|
5
|
+
Alias
|
|
6
|
+
)
|
|
7
|
+
from openpyxl.descriptors.excel import Relation
|
|
8
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SheetBackgroundPicture(Serialisable):
|
|
12
|
+
tagname = "picture"
|
|
13
|
+
id = Relation()
|
|
14
|
+
|
|
15
|
+
def __init__(self, id):
|
|
16
|
+
self.id = id
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class DrawingHF(Serialisable):
|
|
20
|
+
id = Relation()
|
|
21
|
+
lho = Integer(allow_none=True)
|
|
22
|
+
leftHeaderOddPages = Alias('lho')
|
|
23
|
+
lhe = Integer(allow_none=True)
|
|
24
|
+
leftHeaderEvenPages = Alias('lhe')
|
|
25
|
+
lhf = Integer(allow_none=True)
|
|
26
|
+
leftHeaderFirstPage = Alias('lhf')
|
|
27
|
+
cho = Integer(allow_none=True)
|
|
28
|
+
centerHeaderOddPages = Alias('cho')
|
|
29
|
+
che = Integer(allow_none=True)
|
|
30
|
+
centerHeaderEvenPages = Alias('che')
|
|
31
|
+
chf = Integer(allow_none=True)
|
|
32
|
+
centerHeaderFirstPage = Alias('chf')
|
|
33
|
+
rho = Integer(allow_none=True)
|
|
34
|
+
rightHeaderOddPages = Alias('rho')
|
|
35
|
+
rhe = Integer(allow_none=True)
|
|
36
|
+
rightHeaderEvenPages = Alias('rhe')
|
|
37
|
+
rhf = Integer(allow_none=True)
|
|
38
|
+
rightHeaderFirstPage = Alias('rhf')
|
|
39
|
+
lfo = Integer(allow_none=True)
|
|
40
|
+
leftFooterOddPages = Alias('lfo')
|
|
41
|
+
lfe = Integer(allow_none=True)
|
|
42
|
+
leftFooterEvenPages = Alias('lfe')
|
|
43
|
+
lff = Integer(allow_none=True)
|
|
44
|
+
leftFooterFirstPage = Alias('lff')
|
|
45
|
+
cfo = Integer(allow_none=True)
|
|
46
|
+
centerFooterOddPages = Alias('cfo')
|
|
47
|
+
cfe = Integer(allow_none=True)
|
|
48
|
+
centerFooterEvenPages = Alias('cfe')
|
|
49
|
+
cff = Integer(allow_none=True)
|
|
50
|
+
centerFooterFirstPage = Alias('cff')
|
|
51
|
+
rfo = Integer(allow_none=True)
|
|
52
|
+
rightFooterOddPages = Alias('rfo')
|
|
53
|
+
rfe = Integer(allow_none=True)
|
|
54
|
+
rightFooterEvenPages = Alias('rfe')
|
|
55
|
+
rff = Integer(allow_none=True)
|
|
56
|
+
rightFooterFirstPage = Alias('rff')
|
|
57
|
+
|
|
58
|
+
def __init__(self,
|
|
59
|
+
id=None,
|
|
60
|
+
lho=None,
|
|
61
|
+
lhe=None,
|
|
62
|
+
lhf=None,
|
|
63
|
+
cho=None,
|
|
64
|
+
che=None,
|
|
65
|
+
chf=None,
|
|
66
|
+
rho=None,
|
|
67
|
+
rhe=None,
|
|
68
|
+
rhf=None,
|
|
69
|
+
lfo=None,
|
|
70
|
+
lfe=None,
|
|
71
|
+
lff=None,
|
|
72
|
+
cfo=None,
|
|
73
|
+
cfe=None,
|
|
74
|
+
cff=None,
|
|
75
|
+
rfo=None,
|
|
76
|
+
rfe=None,
|
|
77
|
+
rff=None,
|
|
78
|
+
):
|
|
79
|
+
self.id = id
|
|
80
|
+
self.lho = lho
|
|
81
|
+
self.lhe = lhe
|
|
82
|
+
self.lhf = lhf
|
|
83
|
+
self.cho = cho
|
|
84
|
+
self.che = che
|
|
85
|
+
self.chf = chf
|
|
86
|
+
self.rho = rho
|
|
87
|
+
self.rhe = rhe
|
|
88
|
+
self.rhf = rhf
|
|
89
|
+
self.lfo = lfo
|
|
90
|
+
self.lfe = lfe
|
|
91
|
+
self.lff = lff
|
|
92
|
+
self.cfo = cfo
|
|
93
|
+
self.cfe = cfe
|
|
94
|
+
self.cff = cff
|
|
95
|
+
self.rfo = rfo
|
|
96
|
+
self.rfe = rfe
|
|
97
|
+
self.rff = rff
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
from openpyxl.descriptors import (
|
|
4
|
+
Bool,
|
|
5
|
+
Integer,
|
|
6
|
+
Typed,
|
|
7
|
+
Sequence
|
|
8
|
+
)
|
|
9
|
+
from openpyxl.descriptors.excel import ExtensionList
|
|
10
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ChartsheetView(Serialisable):
|
|
14
|
+
tagname = "sheetView"
|
|
15
|
+
|
|
16
|
+
tabSelected = Bool(allow_none=True)
|
|
17
|
+
zoomScale = Integer(allow_none=True)
|
|
18
|
+
workbookViewId = Integer()
|
|
19
|
+
zoomToFit = Bool(allow_none=True)
|
|
20
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
21
|
+
|
|
22
|
+
__elements__ = ()
|
|
23
|
+
|
|
24
|
+
def __init__(self,
|
|
25
|
+
tabSelected=None,
|
|
26
|
+
zoomScale=None,
|
|
27
|
+
workbookViewId=0,
|
|
28
|
+
zoomToFit=True,
|
|
29
|
+
extLst=None,
|
|
30
|
+
):
|
|
31
|
+
self.tabSelected = tabSelected
|
|
32
|
+
self.zoomScale = zoomScale
|
|
33
|
+
self.workbookViewId = workbookViewId
|
|
34
|
+
self.zoomToFit = zoomToFit
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class ChartsheetViewList(Serialisable):
|
|
38
|
+
tagname = "sheetViews"
|
|
39
|
+
|
|
40
|
+
sheetView = Sequence(expected_type=ChartsheetView, )
|
|
41
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
42
|
+
|
|
43
|
+
__elements__ = ('sheetView',)
|
|
44
|
+
|
|
45
|
+
def __init__(self,
|
|
46
|
+
sheetView=None,
|
|
47
|
+
extLst=None,
|
|
48
|
+
):
|
|
49
|
+
if sheetView is None:
|
|
50
|
+
sheetView = [ChartsheetView()]
|
|
51
|
+
self.sheetView = sheetView
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
5
|
+
from openpyxl.descriptors import (
|
|
6
|
+
Sequence,
|
|
7
|
+
Alias
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AuthorList(Serialisable):
|
|
12
|
+
|
|
13
|
+
tagname = "authors"
|
|
14
|
+
|
|
15
|
+
author = Sequence(expected_type=str)
|
|
16
|
+
authors = Alias("author")
|
|
17
|
+
|
|
18
|
+
def __init__(self,
|
|
19
|
+
author=(),
|
|
20
|
+
):
|
|
21
|
+
self.author = author
|