tumblrbot 1.4.2__tar.gz → 1.4.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tumblrbot
3
- Version: 1.4.2
3
+ Version: 1.4.3
4
4
  Summary: An updated bot that posts to Tumblr, based on your very own blog!
5
5
  Requires-Python: >= 3.13
6
6
  Description-Content-Type: text/markdown
@@ -9,6 +9,7 @@ Requires-Dist: keyring
9
9
  Requires-Dist: more-itertools
10
10
  Requires-Dist: niquests[speedups, http3]
11
11
  Requires-Dist: openai
12
+ Requires-Dist: pwinput
12
13
  Requires-Dist: pydantic
13
14
  Requires-Dist: pydantic-settings
14
15
  Requires-Dist: requests
@@ -64,6 +65,7 @@ Features:
64
65
  1. Provides cost estimates if the currently saved examples are used to fine-tune the [configured][config] model.
65
66
  1. [Uploads examples][Fine-Tune] to [OpenAI] and begins the fine-tuning process.
66
67
  - Resumes monitoring the same fine-tuning process when restarted.
68
+ - Deletes the uploaded examples file if fine-tuning does not succeed (optional).
67
69
  - Stores the output model automatically when fine-tuning is completed.
68
70
  1. [Generates and uploads posts][Generate] to the [configured][config] [Tumblr] blog using the [configured][config] fine-tuned model.
69
71
  - Creates tags by extracting keywords at the [configured][config] frequency using the [configured][config] model.
@@ -43,6 +43,7 @@ Features:
43
43
  1. Provides cost estimates if the currently saved examples are used to fine-tune the [configured][config] model.
44
44
  1. [Uploads examples][Fine-Tune] to [OpenAI] and begins the fine-tuning process.
45
45
  - Resumes monitoring the same fine-tuning process when restarted.
46
+ - Deletes the uploaded examples file if fine-tuning does not succeed (optional).
46
47
  - Stores the output model automatically when fine-tuning is completed.
47
48
  1. [Generates and uploads posts][Generate] to the [configured][config] [Tumblr] blog using the [configured][config] fine-tuned model.
48
49
  - Creates tags by extracting keywords at the [configured][config] frequency using the [configured][config] model.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tumblrbot"
3
- version = "1.4.2"
3
+ version = "1.4.3"
4
4
  description = "An updated bot that posts to Tumblr, based on your very own blog!"
5
5
  readme = "README.md"
6
6
  requires-python = ">= 3.13"
@@ -10,6 +10,7 @@ dependencies = [
10
10
  "more-itertools",
11
11
  "niquests[speedups,http3]",
12
12
  "openai",
13
+ "pwinput",
13
14
  "pydantic",
14
15
  "pydantic-settings",
15
16
  "requests",
@@ -4,11 +4,12 @@ from typing import Annotated, Any, ClassVar, Literal, Self, override
4
4
  import rich
5
5
  from keyring import get_password, set_password
6
6
  from openai import BaseModel
7
+ from pwinput import pwinput
7
8
  from pydantic import ConfigDict, PlainSerializer, SecretStr
8
9
  from pydantic.json_schema import SkipJsonSchema
9
10
  from requests_oauthlib import OAuth1Session
10
11
  from rich.panel import Panel
11
- from rich.prompt import Confirm, Prompt
12
+ from rich.prompt import Confirm
12
13
 
13
14
  type SerializableSecretStr = Annotated[
14
15
  SecretStr,
@@ -44,13 +45,11 @@ class Tokens(FullyValidatedModel):
44
45
 
45
46
  @staticmethod
46
47
  def online_token_prompt(url: str, *tokens: str) -> Generator[SecretStr]:
47
- formatted_tokens = [f"[cyan]{token}[/]" for token in tokens]
48
- formatted_token_string = " and ".join(formatted_tokens)
48
+ formatted_token_string = " and ".join(f"[cyan]{token}[/]" for token in tokens)
49
49
 
50
50
  rich.print(f"Retrieve your {formatted_token_string} from: {url}")
51
- for token in formatted_tokens:
52
- prompt = f"Enter your {token} [yellow](hidden)"
53
- yield SecretStr(Prompt.ask(prompt, password=True).strip())
51
+ for token in tokens:
52
+ yield SecretStr(pwinput(f"Enter your {token} (masked): ").strip())
54
53
 
55
54
  rich.print()
56
55
 
File without changes
File without changes