-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from etherealxx/sdless
🎁🥳Release v3.0.0 - Added `@extract` syntax - Supports for custom hashtags with `@new` syntax - (Almost) Full Windows support - Auto-download config file if available when downloading from CivitAI (SD 2.0+) - Auto-renaming for downloading ckpt/safetensors and pruned model from CivitAI using direct link method - CivitAI direct link now use `curl` to get the filename, and use the chosen download method (from the four) to download. Huge download speed boost. `requests` is no longer needed. - Supports download from Anonfiles, Dropbox, Google Drive, Mediafire, Pixeldrain - Supports download from Github (raw and release files) - Supports for SDless mode (read more [here](https://github.com/etherealxx/batchlinks-webui#sdless-mode)) - UI overhaul: - Now there's a table that shows where does the hashtags points into - Option to stretch the UI, if your monitor is small, or using colab on mobile - Option to hide help text - Option to choose preferred CivitAI models. This will works if you download the model via model page link (https://civitai.com/models/) - Upload txt now use a little button instead of covering half of the screen Fixes: - CivitAI `model page link` no longer randomly download the first model on the json list. - Most of Windows bugs - Renaming problem when using CivitAI model page link method - Warning message when CivitAI download isn't possible (server down)
- Loading branch information
Showing
23 changed files
with
1,339 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#tableofcontentmaker | ||
intro = """ | ||
<details> | ||
<summary>Table of Contents</summary> | ||
<ol> | ||
""" | ||
|
||
outro = """ | ||
</li> | ||
</ol> | ||
</details> | ||
""" | ||
|
||
tableofcontents = """ | ||
- [Installation](#installation) | ||
- [About](#about) | ||
- [Example](#example) | ||
- [Syntax](#syntax) | ||
- [Valid Hashtags](#valid-hashtags) | ||
- [How to get the direct links (Important!)](#how-to-get-the-direct-links-important) | ||
- [Huggingface's download method](#huggingfaces-download-method) | ||
- [Civitai's download method](#civitais-download-method) | ||
- [Rename Downloaded Files](#rename-downloaded-files) | ||
- [Running Shell Commands](#running-shell-commands) | ||
- [Gradio Queue](#gradio-queue) | ||
- [Logging](#logging) | ||
- [Cancel](#cancel) | ||
- [Progress Bar](#progress-bar) | ||
- [Changes if `--gradio-queue` is off](#changes-if---gradio-queue-is-off) | ||
- [Other Features](#other-features) | ||
- [Notification](#notification) | ||
- [SDless mode](#sdless-mode) | ||
- [Local Installation Support](#local-installation-support) | ||
- [Latest release: v2.2.0](#latest-release-v220) | ||
- [Release v2.2.0](#release-v220) | ||
- [Release v2.1.1](#release-v211) | ||
- [Release v2.1.0](#release-v210) | ||
- [Roadmap](#roadmap) | ||
- [Known Bugs](#known-bugs) | ||
- [Contributing](#contributing) | ||
- [Contact](#contact) | ||
- [Acknowledgments](#acknowledgments) | ||
""" | ||
|
||
def mlineprint(toprint): | ||
if toprint[-1] == '\n': | ||
toprint = toprint[:-1] | ||
print(toprint.replace('\n', '', 1)) | ||
|
||
|
||
def writehtmllist(space, namehead, hashtaghead): | ||
spaces = "" | ||
for _ in range(space): | ||
spaces += " " | ||
if initialspace >= 2: | ||
return spaces + f'<ul><li><a href="{hashtaghead}">{namehead}</a></li></ul>' | ||
else: | ||
return spaces + f'<li><a href="{hashtaghead}">{namehead}</a></li>' | ||
|
||
if __name__ == "__main__": | ||
rows = tableofcontents.replace('\n', '', 1).splitlines()#split('\n') # split into a list of rows | ||
mlineprint(intro) | ||
for row in rows: | ||
if not row == '': | ||
initialspace = 0 | ||
for char in row: | ||
if char == ' ': | ||
initialspace += 1 | ||
else: | ||
break | ||
extractedrow = row.split("[") | ||
cuttedrow = extractedrow[1].partition("](") | ||
headingname = cuttedrow[0] | ||
headinghashtag = cuttedrow[2].rstrip(")") | ||
print(writehtmllist(initialspace+4, headingname, headinghashtag)) | ||
# print(cuttedrow[0]) | ||
# print(cuttedrow[2].rstrip(")")) | ||
# hashtagrow = row.partit | ||
mlineprint(outro) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.