Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
84590150
Commit
84590150
authored
Jan 20, 2024
by
Arturo Albacete
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skip if headers haven't changed
parent
d0b65e14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
modules/ui_common.py
modules/ui_common.py
+5
-3
No files found.
modules/ui_common.py
View file @
84590150
import
csv
import
dataclasses
import
dataclasses
import
json
import
json
import
html
import
html
...
@@ -37,8 +38,6 @@ def plaintext_to_html(text, classname=None):
...
@@ -37,8 +38,6 @@ def plaintext_to_html(text, classname=None):
def
update_logfile
(
logfile_path
,
fields
):
def
update_logfile
(
logfile_path
,
fields
):
import
csv
with
open
(
logfile_path
,
"r"
,
encoding
=
"utf8"
,
newline
=
""
)
as
file
:
with
open
(
logfile_path
,
"r"
,
encoding
=
"utf8"
,
newline
=
""
)
as
file
:
reader
=
csv
.
reader
(
file
)
reader
=
csv
.
reader
(
file
)
rows
=
list
(
reader
)
rows
=
list
(
reader
)
...
@@ -47,6 +46,10 @@ def update_logfile(logfile_path, fields):
...
@@ -47,6 +46,10 @@ def update_logfile(logfile_path, fields):
if
not
rows
:
if
not
rows
:
return
return
# file is already synced, do nothing
if
len
(
rows
[
0
])
==
len
(
fields
):
return
rows
[
0
]
=
fields
rows
[
0
]
=
fields
# append new fields to each row as empty values
# append new fields to each row as empty values
...
@@ -60,7 +63,6 @@ def update_logfile(logfile_path, fields):
...
@@ -60,7 +63,6 @@ def update_logfile(logfile_path, fields):
def
save_files
(
js_data
,
images
,
do_make_zip
,
index
):
def
save_files
(
js_data
,
images
,
do_make_zip
,
index
):
import
csv
filenames
=
[]
filenames
=
[]
fullfns
=
[]
fullfns
=
[]
parsed_infotexts
=
[]
parsed_infotexts
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment