summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-06-20 09:51:57 +0000
committerCoprDistGit <infra@openeuler.org>2023-06-20 09:51:57 +0000
commita226168fc17b2867a4acf6ec7233b52508d17e4f (patch)
tree852f88437df19e3924333e0930e6c61318261191
parent02725eaeaea4bfc0d42097afb526959a1e79d831 (diff)
automatic import of python-whatsappy-pyopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-whatsappy-py.spec561
-rw-r--r--sources1
3 files changed, 563 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..d0b01bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/whatsappy-py-4.0.0.tar.gz
diff --git a/python-whatsappy-py.spec b/python-whatsappy-py.spec
new file mode 100644
index 0000000..2e7c205
--- /dev/null
+++ b/python-whatsappy-py.spec
@@ -0,0 +1,561 @@
+%global _empty_manifest_terminate_build 0
+Name: python-whatsappy-py
+Version: 4.0.0
+Release: 1
+Summary: Whatsappy is a Python library for creating whatsapp bots
+License: MIT License
+URL: https://github.com/italoseara/whatsappy
+Source0: https://mirrors.aliyun.com/pypi/web/packages/40/f0/66ce6aed4c34deedc451b4bf4286eb4135d8808122be8c344bbe6a43a1f6/whatsappy-py-4.0.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-selenium
+Requires: python3-webdriver-manager
+Requires: python3-qrcode
+Requires: python3-pillow
+Requires: python3-beautifulsoup4
+Requires: python3-datefinder
+
+%description
+# Whatsappy 4.0.0
+
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+[![Downloads](https://pepy.tech/badge/whatsappy-py)](https://pepy.tech/project/whatsappy-py)
+
+## Overview
+
+Whatsappy is a Python library for interacting with WhatsApp Web using Selenium. With this library, you can automate WhatsApp tasks such as sending messages, creating groups, and more.
+
+## Requirements
+
+- Python 3.11+
+- Chrome 94+
+
+## Installation
+
+You can install Whatsappy using pip:
+
+```bash
+pip install whatsappy-py
+```
+
+## Usage
+
+Here's an example of how you can use Whatsappy to send a message:
+
+```python
+from whatsappy import Whatsapp
+
+# Create a new instance of Whatsapp
+whatsapp = Whatsapp()
+
+# Create event handlers
+@whatsapp.event
+def on_ready():
+ print("WhatsApp Web is ready!")
+
+@whatsapp.event
+def on_message(chat):
+ print(f"New message from {chat.name}: {chat.message}")
+
+# Open WhatsApp Web in Chrome
+whatsapp.run()
+
+# Select the chat you want to send a message to
+chat = whatsapp.open("John Smith")
+
+# Send a message
+chat.send("Hello, John!")
+
+# Close WhatsApp Web
+whatsapp.close()
+```
+
+## API Reference
+
+### Whatsapp
+
+#### Properties
+
+- `driver: webdriver.Chrome`: The Chrome driver.
+- `unread_messages: List[UnreadMessage]`: List of unread messages.
+- `me: Me`: The current user.
+- `current_chat: str | None`: The name of the current chat. Returns `None` if no chat is selected.
+
+#### Methods
+
+- `run()`: Opens WhatsApp Web in Chrome.
+- `close()`: Closes the Chrome window.
+- `open(chat: str) -> (Chat | Group | None)`: Selects a chat by name and returns a `Chat` or `Group` instance. Returns `None` if the chat does not exist.
+
+### Me
+
+#### Properties
+
+- `name: str`: The name of the user.
+- `about: str`: The about of the user.
+- `profile_picture: JpegImageFile`: The profile picture of the user.
+
+### Chat
+
+#### Properties
+
+- `name: str`: The name of the chat.
+- `number: str`: The number of the chat.
+- `about: str`: The about of the chat.
+- `profile_picture: JpegImageFile`: The profile picture of the chat.
+- `last_message: Message | None`: The last message of the chat.
+- `is_muted: bool`: Whether the chat is muted or not.
+- `is_blocked: bool`: Whether the chat is blocked or not.
+- `is_pinned: bool`: Whether the chat is pinned or not.
+
+#### Methods
+
+- `send(message: str, attachments: Optional[List[str]] = None, type: Optional[str] = "auto")`: Sends a message to the chat.
+- `mute()`: Mutes the chat.
+- `unmute()`: Unmutes the chat.
+- `block()`: Blocks the chat.
+- `unblock()`: Unblocks the chat.
+- `clear(keep_starred: bool = False)`: Clears the chat messages.
+- `delete()`: Deletes the chat.
+- `pin()`: Pins the chat.
+- `unpin()`: Unpins the chat.
+
+### Group
+
+#### Properties
+
+- `subject: str`: The subject of the group.
+- `description: str`: The description of the group.
+- `profile_picture: Optional[JpegImageFile]`: The profile picture of the group.
+- `participants: int`: The number of participants of the group.
+- `last_message: Message | None`: The last message of the group.
+- `is_muted: bool`: Whether the group is muted or not.
+- `is_pinned: bool`: Whether the group is pinned or not.
+
+#### Methods
+
+- `send(message: str, attachments: Optional[List[str]] = None, type: Optional[str] = "auto")`: Sends a message to the group.
+- `mute()`: Mutes the group.
+- `unmute()`: Unmutes the group.
+- `leave()`: Leaves the group.
+- `clear(keep_starred: bool = False)`: Clears the group messages.
+- `pin()`: Pins the group.
+- `unpin()`: Unpins the group.
+
+### Message
+
+#### Properties
+
+- `chat: Chat | Group`: The chat the message belongs to.
+- `author: str`: The author of the message.
+- `content: str`: The content of the message.
+- `timestamp: datetime.datetime`: The timestamp of the message.
+- `attachments: List[str]`: The attachments of the message.
+- `is_forwarded: bool`: Whether the message is forwarded or not.
+- `is_reply: bool`: Whether the message is a reply or not.
+
+#### Methods
+
+- `reply(message: str, attachments: Optional[List[str]] = None, type: Optional[str] = "auto")`: Replies to the message.
+
+### UnreadMessage
+
+#### Properties
+
+- `name: str`: The name of the chat.
+- `count: int`: The number of unread messages in the chat.
+- `message: Optional[str]`: The last message in the chat.
+
+#### Methods
+
+- `reply(message: str, attachments: Optional[List[str]] = None, type: Optional[str] = "auto")`: Replies to the unread chat with a message. and returns a `Chat` or `Group` instance.
+
+## Contributing
+
+Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
+
+## License
+
+Whatsappy is licensed under the [MIT License](LICENSE)
+
+
+%package -n python3-whatsappy-py
+Summary: Whatsappy is a Python library for creating whatsapp bots
+Provides: python-whatsappy-py
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-whatsappy-py
+# Whatsappy 4.0.0
+
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+[![Downloads](https://pepy.tech/badge/whatsappy-py)](https://pepy.tech/project/whatsappy-py)
+
+## Overview
+
+Whatsappy is a Python library for interacting with WhatsApp Web using Selenium. With this library, you can automate WhatsApp tasks such as sending messages, creating groups, and more.
+
+## Requirements
+
+- Python 3.11+
+- Chrome 94+
+
+## Installation
+
+You can install Whatsappy using pip:
+
+```bash
+pip install whatsappy-py
+```
+
+## Usage
+
+Here's an example of how you can use Whatsappy to send a message:
+
+```python
+from whatsappy import Whatsapp
+
+# Create a new instance of Whatsapp
+whatsapp = Whatsapp()
+
+# Create event handlers
+@whatsapp.event
+def on_ready():
+ print("WhatsApp Web is ready!")
+
+@whatsapp.event
+def on_message(chat):
+ print(f"New message from {chat.name}: {chat.message}")
+
+# Open WhatsApp Web in Chrome
+whatsapp.run()
+
+# Select the chat you want to send a message to
+chat = whatsapp.open("John Smith")
+
+# Send a message
+chat.send("Hello, John!")
+
+# Close WhatsApp Web
+whatsapp.close()
+```
+
+## API Reference
+
+### Whatsapp
+
+#### Properties
+
+- `driver: webdriver.Chrome`: The Chrome driver.
+- `unread_messages: List[UnreadMessage]`: List of unread messages.
+- `me: Me`: The current user.
+- `current_chat: str | None`: The name of the current chat. Returns `None` if no chat is selected.
+
+#### Methods
+
+- `run()`: Opens WhatsApp Web in Chrome.
+- `close()`: Closes the Chrome window.
+- `open(chat: str) -> (Chat | Group | None)`: Selects a chat by name and returns a `Chat` or `Group` instance. Returns `None` if the chat does not exist.
+
+### Me
+
+#### Properties
+
+- `name: str`: The name of the user.
+- `about: str`: The about of the user.
+- `profile_picture: JpegImageFile`: The profile picture of the user.
+
+### Chat
+
+#### Properties
+
+- `name: str`: The name of the chat.
+- `number: str`: The number of the chat.
+- `about: str`: The about of the chat.
+- `profile_picture: JpegImageFile`: The profile picture of the chat.
+- `last_message: Message | None`: The last message of the chat.
+- `is_muted: bool`: Whether the chat is muted or not.
+- `is_blocked: bool`: Whether the chat is blocked or not.
+- `is_pinned: bool`: Whether the chat is pinned or not.
+
+#### Methods
+
+- `send(message: str, attachments: Optional[List[str]] = None, type: Optional[str] = "auto")`: Sends a message to the chat.
+- `mute()`: Mutes the chat.
+- `unmute()`: Unmutes the chat.
+- `block()`: Blocks the chat.
+- `unblock()`: Unblocks the chat.
+- `clear(keep_starred: bool = False)`: Clears the chat messages.
+- `delete()`: Deletes the chat.
+- `pin()`: Pins the chat.
+- `unpin()`: Unpins the chat.
+
+### Group
+
+#### Properties
+
+- `subject: str`: The subject of the group.
+- `description: str`: The description of the group.
+- `profile_picture: Optional[JpegImageFile]`: The profile picture of the group.
+- `participants: int`: The number of participants of the group.
+- `last_message: Message | None`: The last message of the group.
+- `is_muted: bool`: Whether the group is muted or not.
+- `is_pinned: bool`: Whether the group is pinned or not.
+
+#### Methods
+
+- `send(message: str, attachments: Optional[List[str]] = None, type: Optional[str] = "auto")`: Sends a message to the group.
+- `mute()`: Mutes the group.
+- `unmute()`: Unmutes the group.
+- `leave()`: Leaves the group.
+- `clear(keep_starred: bool = False)`: Clears the group messages.
+- `pin()`: Pins the group.
+- `unpin()`: Unpins the group.
+
+### Message
+
+#### Properties
+
+- `chat: Chat | Group`: The chat the message belongs to.
+- `author: str`: The author of the message.
+- `content: str`: The content of the message.
+- `timestamp: datetime.datetime`: The timestamp of the message.
+- `attachments: List[str]`: The attachments of the message.
+- `is_forwarded: bool`: Whether the message is forwarded or not.
+- `is_reply: bool`: Whether the message is a reply or not.
+
+#### Methods
+
+- `reply(message: str, attachments: Optional[List[str]] = None, type: Optional[str] = "auto")`: Replies to the message.
+
+### UnreadMessage
+
+#### Properties
+
+- `name: str`: The name of the chat.
+- `count: int`: The number of unread messages in the chat.
+- `message: Optional[str]`: The last message in the chat.
+
+#### Methods
+
+- `reply(message: str, attachments: Optional[List[str]] = None, type: Optional[str] = "auto")`: Replies to the unread chat with a message. and returns a `Chat` or `Group` instance.
+
+## Contributing
+
+Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
+
+## License
+
+Whatsappy is licensed under the [MIT License](LICENSE)
+
+
+%package help
+Summary: Development documents and examples for whatsappy-py
+Provides: python3-whatsappy-py-doc
+%description help
+# Whatsappy 4.0.0
+
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+[![Downloads](https://pepy.tech/badge/whatsappy-py)](https://pepy.tech/project/whatsappy-py)
+
+## Overview
+
+Whatsappy is a Python library for interacting with WhatsApp Web using Selenium. With this library, you can automate WhatsApp tasks such as sending messages, creating groups, and more.
+
+## Requirements
+
+- Python 3.11+
+- Chrome 94+
+
+## Installation
+
+You can install Whatsappy using pip:
+
+```bash
+pip install whatsappy-py
+```
+
+## Usage
+
+Here's an example of how you can use Whatsappy to send a message:
+
+```python
+from whatsappy import Whatsapp
+
+# Create a new instance of Whatsapp
+whatsapp = Whatsapp()
+
+# Create event handlers
+@whatsapp.event
+def on_ready():
+ print("WhatsApp Web is ready!")
+
+@whatsapp.event
+def on_message(chat):
+ print(f"New message from {chat.name}: {chat.message}")
+
+# Open WhatsApp Web in Chrome
+whatsapp.run()
+
+# Select the chat you want to send a message to
+chat = whatsapp.open("John Smith")
+
+# Send a message
+chat.send("Hello, John!")
+
+# Close WhatsApp Web
+whatsapp.close()
+```
+
+## API Reference
+
+### Whatsapp
+
+#### Properties
+
+- `driver: webdriver.Chrome`: The Chrome driver.
+- `unread_messages: List[UnreadMessage]`: List of unread messages.
+- `me: Me`: The current user.
+- `current_chat: str | None`: The name of the current chat. Returns `None` if no chat is selected.
+
+#### Methods
+
+- `run()`: Opens WhatsApp Web in Chrome.
+- `close()`: Closes the Chrome window.
+- `open(chat: str) -> (Chat | Group | None)`: Selects a chat by name and returns a `Chat` or `Group` instance. Returns `None` if the chat does not exist.
+
+### Me
+
+#### Properties
+
+- `name: str`: The name of the user.
+- `about: str`: The about of the user.
+- `profile_picture: JpegImageFile`: The profile picture of the user.
+
+### Chat
+
+#### Properties
+
+- `name: str`: The name of the chat.
+- `number: str`: The number of the chat.
+- `about: str`: The about of the chat.
+- `profile_picture: JpegImageFile`: The profile picture of the chat.
+- `last_message: Message | None`: The last message of the chat.
+- `is_muted: bool`: Whether the chat is muted or not.
+- `is_blocked: bool`: Whether the chat is blocked or not.
+- `is_pinned: bool`: Whether the chat is pinned or not.
+
+#### Methods
+
+- `send(message: str, attachments: Optional[List[str]] = None, type: Optional[str] = "auto")`: Sends a message to the chat.
+- `mute()`: Mutes the chat.
+- `unmute()`: Unmutes the chat.
+- `block()`: Blocks the chat.
+- `unblock()`: Unblocks the chat.
+- `clear(keep_starred: bool = False)`: Clears the chat messages.
+- `delete()`: Deletes the chat.
+- `pin()`: Pins the chat.
+- `unpin()`: Unpins the chat.
+
+### Group
+
+#### Properties
+
+- `subject: str`: The subject of the group.
+- `description: str`: The description of the group.
+- `profile_picture: Optional[JpegImageFile]`: The profile picture of the group.
+- `participants: int`: The number of participants of the group.
+- `last_message: Message | None`: The last message of the group.
+- `is_muted: bool`: Whether the group is muted or not.
+- `is_pinned: bool`: Whether the group is pinned or not.
+
+#### Methods
+
+- `send(message: str, attachments: Optional[List[str]] = None, type: Optional[str] = "auto")`: Sends a message to the group.
+- `mute()`: Mutes the group.
+- `unmute()`: Unmutes the group.
+- `leave()`: Leaves the group.
+- `clear(keep_starred: bool = False)`: Clears the group messages.
+- `pin()`: Pins the group.
+- `unpin()`: Unpins the group.
+
+### Message
+
+#### Properties
+
+- `chat: Chat | Group`: The chat the message belongs to.
+- `author: str`: The author of the message.
+- `content: str`: The content of the message.
+- `timestamp: datetime.datetime`: The timestamp of the message.
+- `attachments: List[str]`: The attachments of the message.
+- `is_forwarded: bool`: Whether the message is forwarded or not.
+- `is_reply: bool`: Whether the message is a reply or not.
+
+#### Methods
+
+- `reply(message: str, attachments: Optional[List[str]] = None, type: Optional[str] = "auto")`: Replies to the message.
+
+### UnreadMessage
+
+#### Properties
+
+- `name: str`: The name of the chat.
+- `count: int`: The number of unread messages in the chat.
+- `message: Optional[str]`: The last message in the chat.
+
+#### Methods
+
+- `reply(message: str, attachments: Optional[List[str]] = None, type: Optional[str] = "auto")`: Replies to the unread chat with a message. and returns a `Chat` or `Group` instance.
+
+## Contributing
+
+Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
+
+## License
+
+Whatsappy is licensed under the [MIT License](LICENSE)
+
+
+%prep
+%autosetup -n whatsappy-py-4.0.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-whatsappy-py -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 4.0.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..9c3bb7f
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+5dbca8124b2920f721fafaa7a034df57 whatsappy-py-4.0.0.tar.gz