{"id":4846,"date":"2021-05-26T19:05:17","date_gmt":"2021-05-26T10:05:17","guid":{"rendered":"https:\/\/www.sambuichi.jp\/?p=4846"},"modified":"2021-05-26T19:14:51","modified_gmt":"2021-05-26T10:14:51","slug":"__init__-py%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.sambuichi.jp\/?p=4846","title":{"rendered":"\u5171\u901a\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306e__init__.py\u30d5\u30a1\u30a4\u30eb"},"content":{"rendered":"<p>Views: 70<\/p><h1>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210\u3068__init__.py\u30d5\u30a1\u30a4\u30eb<\/h1>\n<p>genInvoice\u53ca\u3073invoice2tsv\u3067\u5171\u901a\u3057\u3066\u30e2\u30b8\u30e5\u30fc\u30ebdic2tree\u3092\u4f7f\u7528\u3059\u308b\u306e\u305f\u3081\u306bdic2etree\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u6b21\u306e\u5185\u5bb9\u3067__init__.py\u30d5\u30a1\u30a4\u30eb\u3092\u5b9a\u7fa9\u3057\u305f\u3002<br \/>\n\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210\u3092\u6b21\u306b\u793a\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" >.\r\n\u251c\u2500\u2500 LICENSE\r\n\u251c\u2500\u2500 README.md\r\n\u251c\u2500\u2500 data\r\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 common\r\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 xpath.txt\r\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 in\r\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 ubl-tc434-example1.xml\r\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 ubl-tc434-example2.xml\r\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 ubl-tc434-example3.xml\r\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 out\r\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 ubl-tc434-example1.tsv\r\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 ubl-tc434-example1.xml\r\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 ubl-tc434-example2.tsv\r\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 ubl-tc434-example2.xml\r\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 ubl-tc434-example3.tsv\r\n\u2502\u00a0\u00a0     \u2514\u2500\u2500 ubl-tc434-example3.xml\r\n\u251c\u2500\u2500 dic2etree\r\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\r\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 dic2etree.py\r\n\u251c\u2500\u2500 doc\r\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 dic2etree.md\r\n\u251c\u2500\u2500 genInvoice\r\n\u2514\u2500\u2500 invoice2tsv<\/pre>\n<pre class=\"lang:python decode:true \" title=\"__init__.py\" >from .dic2etree import dict_to_etree\r\nfrom .dic2etree import etree_to_dict\r\nfrom .dic2etree import get_path_value\r\nfrom .dic2etree import set_path_value\r\n\r\nns = {\r\n  '': 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2',\r\n  'xsi': 'http:\/\/www.w3.org\/2001\/XMLSchema-instance',\r\n  'cac': 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2',\r\n  'cbc': 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2',\r\n  'qdt': 'urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2',\r\n  'udt': 'urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2',\r\n  'ccts': 'urn:un:unece:uncefact:documentation:2'\r\n}\r\n\r\n__all__ = ['dict_to_etree', 'etree_to_dict', 'get_path_value', 'set_path_value', 'ns']<\/pre>\n<p>\u4e21\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u5171\u901a\u3057\u3066\u4f7f\u7528\u3059\u308b\u540d\u524d\u7a7a\u9593\u5b9a\u7fa9\u306ens\u3092\u3053\u3053\u3067\u5b9a\u7fa9\u3059\u308b\u3068\u540c\u6642\u306b\u3001dic2etree.py\u3067\u5b9a\u7fa9\u3057\u305f\uff14\u3064\u306e\u95a2\u6570\u3092import\u3057\u3066\u3044\u308b\u3002\u3053\u308c\u3089\u306e\u5171\u6709\u95a2\u6570\u3092__all__\u3067\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u4e21\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4e2d\u3067\u3001<br \/>\nfrom dic2etree import *<br \/>\n\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u5229\u7528\u53ef\u80fd\u3068\u3057\u3066\u3044\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>genInvoice\u53ca\u3073invoice2tsv\u3067\u5171\u901a\u3057\u3066\u30e2\u30b8\u30e5\u30fc\u30ebdic2tree\u3092\u4f7f\u7528\u3059\u308b\u306e\u305f\u3081\u306bdic2etree\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u6b21\u306e\u5185\u5bb9\u3067__init__.py\u30d5\u30a1\u30a4\u30eb\u3092\u5b9a\u7fa9\u3057\u305f\u3002<\/p>\n","protected":false},"author":2,"featured_media":4851,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[50],"tags":[],"_links":{"self":[{"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/posts\/4846"}],"collection":[{"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4846"}],"version-history":[{"count":6,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/posts\/4846\/revisions"}],"predecessor-version":[{"id":4854,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/posts\/4846\/revisions\/4854"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/media\/4851"}],"wp:attachment":[{"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}