fix filenames on windows
This commit is contained in:
parent
471edca66c
commit
b54b9fcbd2
|
@ -1155,7 +1155,7 @@
|
|||
"\n",
|
||||
"!if [ $(dpkg-query -W -f='${Status}' p7zip-full 2>/dev/null | grep -c \"ok installed\") = 0 ]; then sudo apt update && sudo apt install -y p7zip-full; fi # install 7z if it isn't already installed\n",
|
||||
"from datetime import datetime\n",
|
||||
"datetime_str = datetime.now().strftime('%m-%d-%Y_%H:%M:%S')\n",
|
||||
"datetime_str = datetime.now().strftime('%m-%d-%Y_%H-%M-%S')\n",
|
||||
"%cd \"{export_storage_dir}\"\n",
|
||||
"!mkdir -p \"{datetime_str}/log\"\n",
|
||||
"!cd \"{repo_storage_dir / 'stable-diffusion-webui' / 'log'}\" && mv * \"{export_storage_dir / datetime_str / 'log'}\"\n",
|
||||
|
@ -1453,8 +1453,8 @@
|
|||
" if content_disp:\n",
|
||||
" filename = Path(re.match(r'attachment; filename=\"(.*?)\"', content_disp)[1]).stem\n",
|
||||
" with open(Path(model_storage_dir, f'{filename}.md'), 'w') as file:\n",
|
||||
" file.write(f\"# {model_data['name']} \\n\")\n",
|
||||
" file.write(f'Original CivitAI URL: {model_uri} \\n\\n <br> \\nhttps://civitai.com/models/3950/art-and-eros-aeros-a-tribute-to-beauty\\n')\n",
|
||||
" file.write(f\"# {model_data['name']}\\n\")\n",
|
||||
" file.write(f'Original CivitAI URL: {model_uri}\\n\\n<br>\\n\\n')\n",
|
||||
" file.write(desc)\n",
|
||||
" else:\n",
|
||||
" print('Failed to get filename of checkpoint for markdown file')\n",
|
||||
|
|
Loading…
Reference in New Issue