A simple blogger library
Project description
PythonSimpleBlogger library (simple_blogger)
This is simple library to make simple blog project with Python. The library is distributed under the MIT license and can be downloaded and used by anyone.
How to install
To install, you can use the command:
pip3 install simple_blogger
Or download the repository from GitHub
Initialization
Just start with a simple code.
blogger = simple_blogger.CommonBlogger(PUT-YOUR-TELEGRAM-PRIVATE-CHAT-ID-IN-HERE)
blogger.init_project()
It initalizes folder structure of your own blog project in the working directory.
Blog topics
Find project ideas json-file in files/ideas folder. Fill it with topics and categories of your blog.
Creating tasks
Call push.
blogger.push()
It creates tasks json-file in files folder with dates of publications and prompts to AI that generate image and text for topics.
Adding Tasks
Put any json-file in files/ideas folder. It has to be idea-structured. You can put as many idea-files in idea folder as you want.
Call revert to put unhandled tasks back in backlog.
blogger.revert()
Call push again. Now all backloged tasks and new ideas are in progress.
Publication Review
Call review to send tommorow's publication to your private telegram channel.
blogger.review()
Publication
Call send to send today's publication to your public telegram channel.
blogger.send()
Note: call review before send or call send with image_gen=True(to produce image) and text_gen=True(to produce text).
Error handling
If something goes wrong method sends Exception text to your private telegram channel.
Default parameters
Library uses working directory name as project name and production telegram channel name by default.
Environment variables
Library uses dall-e-3 model to generate images and deepseek-chat to generate texts by default and sends publications to telegram channels.
It needs following environment variables:
- BLOGGER_BOT_TOKEN
- OPENAI_API_KEY
- DEEPSEEK_API_KEY
Yandex generators needs following environment variables:
- YC_API_KEY
- YC_FOLDER_ID
From the developer
There are(or will be) more examples of using this library in sibling repos on GitHub
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simple_blogger-0.2.15.tar.gz.
File metadata
- Download URL: simple_blogger-0.2.15.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b402e7936178b621aaf8c6669007ccc0a47621668220110c8ab120dec084f495
|
|
| MD5 |
08a1f7e685759c94a4804ea0433278bc
|
|
| BLAKE2b-256 |
f03752e96e91ed17334851cca9e69bb12d5c1b7dfbe6d4f5bf6270d395cfb78e
|
Provenance
The following attestation bundles were made for simple_blogger-0.2.15.tar.gz:
Publisher:
publish-to-pypi.yml on athenova/simple_blogger
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_blogger-0.2.15.tar.gz -
Subject digest:
b402e7936178b621aaf8c6669007ccc0a47621668220110c8ab120dec084f495 - Sigstore transparency entry: 974154653
- Sigstore integration time:
-
Permalink:
athenova/simple_blogger@d39fb40f8eccf76730bf1729ae2f18b4e6393cf1 -
Branch / Tag:
refs/tags/0.2.15 - Owner: https://github.com/athenova
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@d39fb40f8eccf76730bf1729ae2f18b4e6393cf1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file simple_blogger-0.2.15-py3-none-any.whl.
File metadata
- Download URL: simple_blogger-0.2.15-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df78880afb702627ad0f4334d489caad70bce8ef7a90b5e82da9aa1cb8be8b40
|
|
| MD5 |
879d1b49597e6ed31cbfd49b4e2db723
|
|
| BLAKE2b-256 |
3be36db0553aebffc0c9c4d0f89cfe833db5d974f0ed6b2bc6ea975263c4ed3a
|
Provenance
The following attestation bundles were made for simple_blogger-0.2.15-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on athenova/simple_blogger
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_blogger-0.2.15-py3-none-any.whl -
Subject digest:
df78880afb702627ad0f4334d489caad70bce8ef7a90b5e82da9aa1cb8be8b40 - Sigstore transparency entry: 974154828
- Sigstore integration time:
-
Permalink:
athenova/simple_blogger@d39fb40f8eccf76730bf1729ae2f18b4e6393cf1 -
Branch / Tag:
refs/tags/0.2.15 - Owner: https://github.com/athenova
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@d39fb40f8eccf76730bf1729ae2f18b4e6393cf1 -
Trigger Event:
push
-
Statement type: