banner
andrewji8

Being towards death

Heed not to the tree-rustling and leaf-lashing rain, Why not stroll along, whistle and sing under its rein. Lighter and better suited than horses are straw sandals and a bamboo staff, Who's afraid? A palm-leaf plaited cape provides enough to misty weather in life sustain. A thorny spring breeze sobers up the spirit, I feel a slight chill, The setting sun over the mountain offers greetings still. Looking back over the bleak passage survived, The return in time Shall not be affected by windswept rain or shine.
telegram
twitter
github

Pythonの写真犬日記ツール

import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QTextEdit, QPushButton, QMessageBox
from PyQt5.QtGui import QFont, QTextDocument

import requests

class TuanGouDiary(QMainWindow):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("舔狗の日記")
        self.setFixedSize(400, 300)  # 固定サイズを設定
        self.setStyleSheet("background-color: #F5F5F5;")  # 背景色を設定

        self.text_entry = QTextEdit(self)
        self.text_entry.setGeometry(50, 50, 300, 150)
        self.text_entry.setFont(QFont("Arial", 12))  # フォントスタイルを設定
        self.text_entry.setDocument(QTextDocument())  # ドキュメントオブジェクトを設定

        self.request_button = QPushButton("毎日舔狗の日記", self)
        self.request_button.setGeometry(50, 220, 150, 30)
        self.request_button.setStyleSheet("background-color: #FF69B4; color: white; font-size: 12px;")  # ボタンスタイルを設定
        self.request_button.clicked.connect(self.get_tiangou)

        self.copy_button = QPushButton("一键コピー舔狗の日記", self)
        self.copy_button.setGeometry(200, 220, 150, 30)
        self.copy_button.setStyleSheet("background-color: #FF69B4; color: white; font-size: 12px;")  # ボタンスタイルを設定
        self.copy_button.clicked.connect(self.copy_content)

        self.text_entry.document().setDefaultStyleSheet("p { line-height: 1.5; }")  # 行間を設定

    def get_tiangou(self):
        try:
            response = requests.get("https://cloud.qqshabi.cn/api/tiangou/api.php")
            tiangou = response.text
            self.text_entry.clear()
            self.text_entry.insertPlainText(tiangou)
        except requests.exceptions.RequestException as e:
            QMessageBox.critical(self, "Error", str(e))

    def copy_content(self):
        content = self.text_entry.toPlainText()
        QApplication.clipboard().setText(content)

if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = TuanGouDiary()
    window.show()
    sys.exit(app.exec_())
読み込み中...
文章は、創作者によって署名され、ブロックチェーンに安全に保存されています。