20221109
This commit is contained in:
1 parent
6e4ecae461
commit
7fdca495ab
1 file changed
+9
-47
+9
-47
@@ -10,27 +10,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 6,
|
"execution_count": null,
|
||||||
"id": "a27e986c-0c40-4792-b24d-03b19df707a9",
|
"id": "a27e986c-0c40-4792-b24d-03b19df707a9",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2022-11-08T12:44:07.296735Z",
|
|
||||||
"iopub.status.busy": "2022-11-08T12:44:07.296180Z",
|
|
||||||
"iopub.status.idle": "2022-11-08T12:44:08.671501Z",
|
|
||||||
"shell.execute_reply": "2022-11-08T12:44:08.670323Z",
|
|
||||||
"shell.execute_reply.started": "2022-11-08T12:44:07.296686Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"ok\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import openpyxl\n",
|
"import openpyxl\n",
|
||||||
"import json\n",
|
"import json\n",
|
||||||
@@ -72,27 +57,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 7,
|
"execution_count": null,
|
||||||
"id": "e5e4145b-d575-46b5-a530-c722668f76f3",
|
"id": "e5e4145b-d575-46b5-a530-c722668f76f3",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2022-11-08T12:45:30.125598Z",
|
|
||||||
"iopub.status.busy": "2022-11-08T12:45:30.125074Z",
|
|
||||||
"iopub.status.idle": "2022-11-08T12:45:30.758312Z",
|
|
||||||
"shell.execute_reply": "2022-11-08T12:45:30.757020Z",
|
|
||||||
"shell.execute_reply.started": "2022-11-08T12:45:30.125550Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"ok\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"import time\n",
|
"import time\n",
|
||||||
@@ -147,16 +117,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 8,
|
"execution_count": null,
|
||||||
"id": "0582bc84-7234-415f-9715-66c27b6b8f91",
|
"id": "0582bc84-7234-415f-9715-66c27b6b8f91",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2022-11-08T12:46:03.182505Z",
|
|
||||||
"iopub.status.busy": "2022-11-08T12:46:03.181985Z",
|
|
||||||
"iopub.status.idle": "2022-11-08T12:46:05.094052Z",
|
|
||||||
"shell.execute_reply": "2022-11-08T12:46:05.092913Z",
|
|
||||||
"shell.execute_reply.started": "2022-11-08T12:46:03.182458Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -289,7 +252,6 @@
|
|||||||
"for k, v in dict1.items():\n",
|
"for k, v in dict1.items():\n",
|
||||||
" m_name = v['name']\n",
|
" m_name = v['name']\n",
|
||||||
" m_depart = v['unit'] \n",
|
" m_depart = v['unit'] \n",
|
||||||
" depart.append(m_depart) \n",
|
|
||||||
" dict2[int(k)] = [m_name,m_depart]\n",
|
" dict2[int(k)] = [m_name,m_depart]\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -303,9 +265,9 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"for n in old: \n",
|
"for n in old: \n",
|
||||||
" o_name = f'{fi_path}/{n}.pdf'\n",
|
" o_name = f'{fi_path}/{n}.pdf'\n",
|
||||||
" if not os.path.exists(f'{fi_path}/new/{dict2[n][1]}'):\n",
|
" if not os.path.exists(f'{fi_path}/new/{dict2[int(n)][1]}'):\n",
|
||||||
" os.mkdir(f'{fi_path}/new/{dict2[n][1]}') \n",
|
" os.mkdir(f'{fi_path}/new/{dict2[int(n)][1]}') \n",
|
||||||
" n_name = f'{fi_path}/new/{dict2[n][1]}/{str(n).rjust(5,\"0\")}-{dict2[n][0]}.pdf'\n",
|
" n_name = f'{fi_path}/new/{dict2[int(n)][1]}/{str(n).rjust(5,\"0\")}-{dict2[int(n)][0]}.pdf'\n",
|
||||||
" if not os.path.exists(n_name):\n",
|
" if not os.path.exists(n_name):\n",
|
||||||
" shutil.copyfile(o_name,n_name)\n",
|
" shutil.copyfile(o_name,n_name)\n",
|
||||||
" print(n_name)"
|
" print(n_name)"
|
||||||
@@ -419,7 +381,7 @@
|
|||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python 3",
|
"display_name": "Python 3 (ipykernel)",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"name": "python3"
|
"name": "python3"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user