Skip to main content

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

From the developer

There are(or will be) more examples of using this library in sibling repos on GitHub

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_blogger-0.0.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_blogger-0.0.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file simple_blogger-0.0.1.tar.gz.

File metadata

  • Download URL: simple_blogger-0.0.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for simple_blogger-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c1ca5d135efa9c5dfbe904e66b222869cb07e9246646c784b3b817b67f6e97a0
MD5 685f5dc90acf05515d255f326190b51c
BLAKE2b-256 35dc1b7369a6aa628d9d84f0d7a3b6524b68459d3809396cbad32b8ff42a58f6

See more details on using hashes here.

File details

Details for the file simple_blogger-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: simple_blogger-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for simple_blogger-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 59bf8aa589b616e09b440d5b3414b1843ef9838faf7cf32b6292632af409b7e5
MD5 2b54760b4e637478953a8ee807098266
BLAKE2b-256 78813ebebfaa4097cd6d8e0e911ce4a21ca9e568cdd4a4b4aca3cddb0d5b4452

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page