This commit is contained in:
512song committed 2024-07-21 23:33:04 +08:00
1 parent 9157174d75
commit 679c9514ea
2 files changed
+204 -223

No files matched your search

+18 -32
View File
@@ -10,16 +10,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 26, "execution_count": null,
"id": "0569e182-b008-4173-ab0d-7f4a2904f72e", "id": "0569e182-b008-4173-ab0d-7f4a2904f72e",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-07-15T15:04:59.632546Z",
"iopub.status.busy": "2024-07-15T15:04:59.631784Z",
"iopub.status.idle": "2024-07-15T15:04:59.665250Z",
"shell.execute_reply": "2024-07-15T15:04:59.664677Z",
"shell.execute_reply.started": "2024-07-15T15:04:59.632477Z"
},
"tags": [] "tags": []
}, },
"outputs": [], "outputs": [],
@@ -39,16 +32,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 27, "execution_count": null,
"id": "44683ca5-166c-4d3a-9447-6fe46ab7c12d", "id": "44683ca5-166c-4d3a-9447-6fe46ab7c12d",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2024-07-15T15:05:02.105399Z",
"iopub.status.busy": "2024-07-15T15:05:02.104659Z",
"iopub.status.idle": "2024-07-15T15:05:02.142813Z",
"shell.execute_reply": "2024-07-15T15:05:02.142274Z",
"shell.execute_reply.started": "2024-07-15T15:05:02.105335Z"
},
"tags": [] "tags": []
}, },
"outputs": [], "outputs": [],
@@ -122,15 +108,15 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 29, "execution_count": 10,
"id": "14696c7a-d44e-4c99-9d28-a810d991ed20", "id": "14696c7a-d44e-4c99-9d28-a810d991ed20",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2024-07-16T00:55:29.553018Z", "iopub.execute_input": "2024-07-20T06:04:52.673744Z",
"iopub.status.busy": "2024-07-16T00:55:29.552281Z", "iopub.status.busy": "2024-07-20T06:04:52.672966Z",
"iopub.status.idle": "2024-07-16T00:55:29.662647Z", "iopub.status.idle": "2024-07-20T06:04:52.992448Z",
"shell.execute_reply": "2024-07-16T00:55:29.662074Z", "shell.execute_reply": "2024-07-20T06:04:52.991874Z",
"shell.execute_reply.started": "2024-07-16T00:55:29.552950Z" "shell.execute_reply.started": "2024-07-20T06:04:52.673671Z"
} }
}, },
"outputs": [ "outputs": [
@@ -138,7 +124,7 @@
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"['1', '10', '100', '101', '102', '103', '104', '105', '106', '107', '108', '109', '11', '110', '111', '112', '113', '114', '115', '116', '117', '118', '119', '12', '120', '121', '122', '123', '124', '125', '126', '127', '128', '129', '13', '130', '131', '132', '133', '134', '135', '136', '137', '138', '139', '14', '140', '141', '142', '143', '144', '145', '146', '147', '148', '149', '15', '150', '151', '152', '153', '154', '155', '157', '158', '159', '16', '160', '161', '162', '163', '164', '165', '166', '167', '168', '169', '17', '170', '171', '172', '173', '174', '175', '176', '177', '178', '179', '18', '180', '181', '182', '183', '184', '185', '186', '187', '188', '19', '190', '191', '192', '193', '195', '196', '197', '198', '199', '2', '20', '200', '202', '203', '204', '205', '206', '207', '209', '21', '210', '212', '213', '214', '215', '216', '217', '218', '219', '22', '220', '221', '222', '223', '224', '227', '228', '229', '23', '230', '231', '233', '237', '238', '24', '241', '242', '243', '244', '25', '250', '253', '255', '258', '259', '26', '260', '266', '268', '269', '27', '270', '271', '274', '276', '277', '278', '279', '28', '281', '283', '286', '29', '297', '298', '3', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '4', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '5', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '6', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '7', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '8', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '9', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99']\n" "['1', '10', '100', '101', '102', '103', '104', '105', '106', '107', '108', '109', '11', '110', '111', '112', '113', '114', '115', '116', '117', '118', '119', '12', '120', '121', '122', '123', '124', '125', '126', '127', '128', '129', '13', '130', '131', '132', '133', '134', '135', '136', '137', '138', '139', '14', '140', '141', '142', '143', '144', '145', '146', '147', '148', '149', '15', '150', '151', '152', '153', '154', '155', '156', '157', '158', '159', '16', '160', '161', '162', '163', '164', '165', '166', '167', '168', '169', '17', '170', '171', '172', '173', '174', '175', '176', '177', '178', '179', '18', '180', '181', '182', '183', '184', '185', '186', '187', '188', '189', '19', '190', '191', '192', '193', '194', '195', '196', '197', '198', '199', '2', '20', '200', '201', '202', '203', '204', '205', '206', '207', '208', '209', '21', '210', '211', '212', '213', '214', '215', '216', '217', '218', '219', '22', '220', '221', '222', '223', '224', '225', '226', '227', '228', '229', '23', '230', '231', '233', '234', '235', '236', '237', '238', '239', '24', '240', '242', '243', '244', '245', '246', '247', '248', '249', '25', '251', '252', '253', '254', '255', '256', '257', '258', '26', '260', '261', '262', '265', '266', '267', '268', '269', '27', '270', '272', '273', '274', '275', '276', '278', '28', '284', '29', '298', '3', '30', '31', '310', '32', '33', '34', '35', '36', '37', '38', '39', '4', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '5', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '6', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '7', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '8', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '9', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99']\n"
] ]
} }
], ],
@@ -189,20 +175,20 @@
" paragraph3.add_run(ss.replace('\\r', ''))\n", " paragraph3.add_run(ss.replace('\\r', ''))\n",
" \n", " \n",
"print(list1)\n", "print(list1)\n",
"doc.save('弈理析疑.docx')" "doc.save('槐荫堂2.docx')"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 30, "execution_count": 11,
"id": "8d3f1a7a-1322-48b5-9b14-c7ba8f38bacb", "id": "8d3f1a7a-1322-48b5-9b14-c7ba8f38bacb",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2024-07-16T00:57:31.079760Z", "iopub.execute_input": "2024-07-20T06:06:38.179808Z",
"iopub.status.busy": "2024-07-16T00:57:31.079034Z", "iopub.status.busy": "2024-07-20T06:06:38.179038Z",
"iopub.status.idle": "2024-07-16T00:57:35.022251Z", "iopub.status.idle": "2024-07-20T06:06:57.642154Z",
"shell.execute_reply": "2024-07-16T00:57:35.021655Z", "shell.execute_reply": "2024-07-20T06:06:57.641700Z",
"shell.execute_reply.started": "2024-07-16T00:57:31.079698Z" "shell.execute_reply.started": "2024-07-20T06:06:38.179737Z"
}, },
"tags": [] "tags": []
}, },
@@ -214,13 +200,13 @@
"\n", "\n",
"dict1 = {}\n", "dict1 = {}\n",
"\n", "\n",
"tpl = DocxTemplate(\"弈理析疑.docx\")\n", "tpl = DocxTemplate(\"槐荫堂2.docx\")\n",
"for item in list1: \n", "for item in list1: \n",
" dict1['img_'+str(item)] = InlineImage(tpl, image_descriptor=f'./img/{str(item)}.jpg',width=Mm(4))\n", " dict1['img_'+str(item)] = InlineImage(tpl, image_descriptor=f'./img/{str(item)}.jpg',width=Mm(4))\n",
"#dict1['img_radar'] = InlineImage(tpl, image_descriptor=dict1['radar'])\n", "#dict1['img_radar'] = InlineImage(tpl, image_descriptor=dict1['radar'])\n",
"\n", "\n",
"tpl.render(dict1)\n", "tpl.render(dict1)\n",
"tpl.save('弈理析疑1.docx')" "tpl.save('槐荫堂第二卷.docx')"
] ]
}, },
{ {
File diff suppressed because it is too large. Load diff