diff --git a/README.md b/README.md new file mode 100644 index 0000000..70221df --- /dev/null +++ b/README.md @@ -0,0 +1,90 @@ +# Bookmarks bot for XMPP + +## BukuBot + +BukuBot is a bookmarks bot for the XMPP communication network. + +BukuBot is a powered by [buku](https://github.com/jarun/buku) and [slixmpp](https://codeberg.org/poezio/slixmpp). + +## XMPP + +XMPP is the Extensible Messaging and Presence Protocol, a set of open technologies for instant messaging, presence, multi-party chat, voice and video calls, collaboration, lightweight middleware, content syndication, and generalized routing of XML data. + +Visit [XMPP](https://xmpp.org/) for more information [about](https://xmpp.org/about/) the XMPP protocol and check the [list](https://xmpp.org/software/) of XMPP clients. + +BukuBot is primarily designed for XMPP (aka Jabber), yet it is built to be extended to other protocols. + +## Features + +- **Search** - Filter and search bookmarks by keywords and tags. +- **Portable** - Export and import bookmarks to buku database, HTML, Markdown, Orgfile, or XBEL. +- **Simultaneous** - BukuBot is designed to handle multiple contacts, including groupchats, Simultaneously. +- **Visual interface** - Interactive interface for XMPP using Ad-Hoc Commands, + +## Preview + +BukuBot as appears with Cheogram. + +Chat: Search +Ad-Hoc: Commands +Ad-Hoc: Browse +Ad-Hoc: Add +Ad-Hoc: Edit bookmark +Ad-Hoc: Seach + +## Getting Started + +### Install + +It is possible to install BukuBot using pip and pipx. + +#### pip inside venv + +``` +$ python3 -m venv .venv +$ source .venv/bin/activate +$ pip install git+https://git.xmpp-it.net/sch/BukuBot +``` + +#### pipx + +##### Install + +``` +$ pipx install git+https://git.xmpp-it.net/sch/BukuBot +``` + +##### Update + +``` +$ pipx uninstall bukubot +$ pipx install git+https://git.xmpp-it.net/sch/BukuBot +``` + +### Start + +``` +$ bukubot +``` + +## Recommended Clients + +BukuBot works with any XMPP chat client; if you want to make use of the visual interface which BukuBot has to offer (i.e. Ad-Hoc Commands), then you are advised to use [Cheogram](https://cheogram.com), [Converse](https://conversejs.org), [Gajim](https://gajim.org), [monocles chat](https://monocles.chat), [Movim](https://mov.im), [Poezio](https://poez.io), [Profanity](https://profanity-im.github.io), [Psi](https://psi-im.org) or [Psi+](https://psi-plus.com). + +### Support + +Please join our support groupchat whether you want help, discuss new features or just greet us. + +- [Main Groupchat](xmpp:bukubot@chat.woodpeckersnest.space?join) (International) + +## Authors + +[Schimon](xmpp:sch@pimux.de?message) (Author). + +## License + +MIT license. + +## Copyright + +Schimon Zackary, 2024 diff --git a/__main__.py b/__main__.py index 2add40b..5f66aee 100644 --- a/__main__.py +++ b/__main__.py @@ -6,10 +6,10 @@ # See the file LICENSE for copying permission. import buku -from bukuxmpp.about import Documentation -from bukuxmpp.config import Configuration -from bukuxmpp.xmpp.chat import Chat -from bukuxmpp.xmpp.client import Client +from bukubot.about import Documentation +from bukubot.config import Configuration +from bukubot.xmpp.chat import Chat +from bukubot.xmpp.client import Client from getpass import getpass from argparse import ArgumentParser import logging @@ -63,4 +63,4 @@ def main(): if __name__ == '__main__': - main() \ No newline at end of file + main() diff --git a/about.py b/about.py index 4f7262d..d696806 100644 --- a/about.py +++ b/about.py @@ -4,21 +4,21 @@ class Documentation: def about(): - return ('Slixmark' + return ('BukuBot' '\n' 'Jabber/XMPP Bookmark Manager' '\n\n' - 'Slixmark is an XMPP bot that facilitates accessing and ' + 'BukuBot is an XMPP bot that facilitates accessing and ' 'managing bookmarks remotely.' '\n\n' - 'Slixmark is written in Python' + 'BukuBot is written in Python' '\n\n' 'It is utilizing buku to handle bookmarks, and slixmpp to ' 'communicate in the XMPP telecommunication network.' '\n\n' - 'https://gitgud.io/sjehuda/slixmark' + 'https://git.xmpp-it.net/sch/BukuBot' '\n\n' - 'Copyright 2024 Schimon Zackary' + 'Copyright 2024 Schimon Jehudah Zackary' '\n\n' 'Made in Switzerland' '\n\n' @@ -73,7 +73,7 @@ class Documentation: "\n") def notice(): - return ('Copyright 2024 Schimon Zackary Jehudah' + return ('Copyright 2024 Schimon Jehudah Zackary' '\n\n' 'Permission is hereby granted, free of charge, to any person ' 'obtaining a copy of this software and associated ' diff --git a/config.py b/config.py index 108fcd4..7366f61 100644 --- a/config.py +++ b/config.py @@ -17,11 +17,11 @@ class Configuration: def get_db_directory(): if os.environ.get('HOME'): data_home = os.path.join(os.environ.get('HOME'), '.local', 'share') - return os.path.join(data_home, 'bukuxmpp') + return os.path.join(data_home, 'bukubot') elif sys.platform == 'win32': data_home = os.environ.get('APPDATA') if data_home is None: return os.path.join( - os.path.dirname(__file__) + '/bukuxmpp_data') + os.path.dirname(__file__) + '/bukubot_data') else: - return os.path.join(os.path.dirname(__file__) + '/bukuxmpp_data') + return os.path.join(os.path.dirname(__file__) + '/bukubot_data') diff --git a/documentation/screenshots/adhoc_add.jpg b/documentation/screenshots/adhoc_add.jpg new file mode 100644 index 0000000..08e95fa Binary files /dev/null and b/documentation/screenshots/adhoc_add.jpg differ diff --git a/documentation/screenshots/adhoc_browse.jpg b/documentation/screenshots/adhoc_browse.jpg new file mode 100644 index 0000000..36abaf7 Binary files /dev/null and b/documentation/screenshots/adhoc_browse.jpg differ diff --git a/documentation/screenshots/adhoc_commands.jpg b/documentation/screenshots/adhoc_commands.jpg new file mode 100644 index 0000000..2135385 Binary files /dev/null and b/documentation/screenshots/adhoc_commands.jpg differ diff --git a/documentation/screenshots/adhoc_edit.jpg b/documentation/screenshots/adhoc_edit.jpg new file mode 100644 index 0000000..0d68830 Binary files /dev/null and b/documentation/screenshots/adhoc_edit.jpg differ diff --git a/documentation/screenshots/adhoc_search.jpg b/documentation/screenshots/adhoc_search.jpg new file mode 100644 index 0000000..d4bcf03 Binary files /dev/null and b/documentation/screenshots/adhoc_search.jpg differ diff --git a/documentation/screenshots/chat_search.jpg b/documentation/screenshots/chat_search.jpg new file mode 100644 index 0000000..f8300fa Binary files /dev/null and b/documentation/screenshots/chat_search.jpg differ diff --git a/pyproject.toml b/pyproject.toml index 37be736..8522b7c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,13 +3,13 @@ requires = ["setuptools>=61.2"] build-backend = "setuptools.build_meta" [project] -name = "bukuxmpp" -version = "1.0" -description = "buku bot for XMPP" +name = "BukuBot" +version = "0.1" +description = "A bookmark bot powered by buku" authors = [{name = "Schimon Zachary", email = "sch@fedora.email"}] license = {text = "MIT"} classifiers = [ - "Framework :: bukuxmpp", + "Framework :: slixmpp", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "License :: OSI Approved :: MIT License", @@ -25,32 +25,26 @@ classifiers = [ ] keywords = [ "bot", + "bookmark", "buku", "chat", "im", "jabber", + "search", "xmpp", ] -# urls = {Homepage = "https://gitgud.io/sjehuda/buku-xmpp"} +# urls = {Homepage = "https://git.xmpp-it.net/sch/BukuBot"} dependencies = [ "buku", "tomli", # Python 3.10 "tomli_w", "slixmpp", - - # Optional dependencies - # listed here (testing) - "html2text", - "pdfkit", - # "pysocks", - "readability-lxml", - "xml2epub", ] [project.urls] -Homepage = "http://bukuxmpp.i2p/" -Repository = "https://gitgud.io/sjehuda/buku-xmpp" -Issues = "https://gitgud.io/sjehuda/buku-xmpp/issues" +Homepage = "http://bukubot.i2p/" +Repository = "https://git.xmpp-it.net/sch/BukuBot" +Issues = "https://codeberg.org/sch/BukuBot/issues" [project.optional-dependencies] @@ -65,10 +59,10 @@ readability = ["readability-lxml"] # "readable html" = ["readability-lxml"] # [project.readme] -# text = "buku-xmpp is a bookmark manager bot using buku. This program is primarily designed for XMPP" +# text = "BukuBot is a bookmark manager bot using buku. This program is primarily designed for XMPP" [project.scripts] -bukuxmpp = "bukuxmpp.__main__:main" +bukubot = "bukubot.__main__:main" [tool.setuptools] platforms = ["any"] diff --git a/version.py b/version.py index d5f14d3..05585a8 100644 --- a/version.py +++ b/version.py @@ -1,2 +1,2 @@ -__version__ = '0.0.2' -__version_info__ = (0, 0, 2) +__version__ = '0.0.3' +__version_info__ = (0, 0, 3) diff --git a/xmpp/chat.py b/xmpp/chat.py index 86d46be..3884be3 100644 --- a/xmpp/chat.py +++ b/xmpp/chat.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -from bukuxmpp.about import Documentation -from bukuxmpp.config import Configuration +from bukubot.about import Documentation +from bukubot.config import Configuration try: import tomllib diff --git a/xmpp/client.py b/xmpp/client.py index c274a71..f704dbb 100644 --- a/xmpp/client.py +++ b/xmpp/client.py @@ -2,12 +2,12 @@ # -*- coding: utf-8 -*- import slixmpp -from bukuxmpp.xmpp.chat import Chat -from bukuxmpp.config import Configuration -from bukuxmpp.about import Documentation +from bukubot.xmpp.chat import Chat +from bukubot.config import Configuration +from bukubot.about import Documentation -from slixfeed.log import Logger -from slixfeed.version import __version__ +from bukubot.log import Logger +from bukubot.version import __version__ try: import tomllib @@ -29,8 +29,8 @@ logger = Logger(__name__) class Client(slixmpp.ClientXMPP): """ - bukuxmpp - Bookmark manager bot for Jabber/XMPP. - bukuxmpp is a bookmark manager bot based on buku and slixmpp. + bukubot - Bookmark manager chat bot for Jabber/XMPP. + bukubot is a bookmark manager bot based on buku and slixmpp. """ def __init__(self, jid, password):