Compare commits

..

No commits in common. "163975f837b41aaaa867ba46e319ba6e5153db27" and "29833803ee77f62cc4bc21407d7b58d73a2ead56" have entirely different histories.

14 changed files with 43 additions and 127 deletions

View file

@ -1,90 +0,0 @@
# 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.
<img alt="Chat: Search" src="documentation/screenshots/chat_search.jpg" width="200px"/>
<img alt="Ad-Hoc: Commands" src="documentation/screenshots/adhoc_commands.jpg" width="200px"/>
<img alt="Ad-Hoc: Browse" src="documentation/screenshots/adhoc_browse.jpg" width="200px"/>
<img alt="Ad-Hoc: Add" src="documentation/screenshots/adhoc_add.jpg" width="200px"/>
<img alt="Ad-Hoc: Edit bookmark" src="documentation/screenshots/adhoc_edit.jpg" width="200px"/>
<img alt="Ad-Hoc: Seach" width="200px" src="documentation/screenshots/adhoc_search.jpg"/>
## 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

View file

@ -6,10 +6,10 @@
# See the file LICENSE for copying permission. # See the file LICENSE for copying permission.
import buku import buku
from bukubot.about import Documentation from bukuxmpp.about import Documentation
from bukubot.config import Configuration from bukuxmpp.config import Configuration
from bukubot.xmpp.chat import Chat from bukuxmpp.xmpp.chat import Chat
from bukubot.xmpp.client import Client from bukuxmpp.xmpp.client import Client
from getpass import getpass from getpass import getpass
from argparse import ArgumentParser from argparse import ArgumentParser
import logging import logging
@ -63,4 +63,4 @@ def main():
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View file

@ -4,21 +4,21 @@
class Documentation: class Documentation:
def about(): def about():
return ('BukuBot' return ('Slixmark'
'\n' '\n'
'Jabber/XMPP Bookmark Manager' 'Jabber/XMPP Bookmark Manager'
'\n\n' '\n\n'
'BukuBot is an XMPP bot that facilitates accessing and ' 'Slixmark is an XMPP bot that facilitates accessing and '
'managing bookmarks remotely.' 'managing bookmarks remotely.'
'\n\n' '\n\n'
'BukuBot is written in Python' 'Slixmark is written in Python'
'\n\n' '\n\n'
'It is utilizing buku to handle bookmarks, and slixmpp to ' 'It is utilizing buku to handle bookmarks, and slixmpp to '
'communicate in the XMPP telecommunication network.' 'communicate in the XMPP telecommunication network.'
'\n\n' '\n\n'
'https://git.xmpp-it.net/sch/BukuBot' 'https://gitgud.io/sjehuda/slixmark'
'\n\n' '\n\n'
'Copyright 2024 Schimon Jehudah Zackary' 'Copyright 2024 Schimon Zackary'
'\n\n' '\n\n'
'Made in Switzerland' 'Made in Switzerland'
'\n\n' '\n\n'
@ -73,7 +73,7 @@ class Documentation:
"\n") "\n")
def notice(): def notice():
return ('Copyright 2024 Schimon Jehudah Zackary' return ('Copyright 2024 Schimon Zackary Jehudah'
'\n\n' '\n\n'
'Permission is hereby granted, free of charge, to any person ' 'Permission is hereby granted, free of charge, to any person '
'obtaining a copy of this software and associated ' 'obtaining a copy of this software and associated '

View file

@ -17,11 +17,11 @@ class Configuration:
def get_db_directory(): def get_db_directory():
if os.environ.get('HOME'): if os.environ.get('HOME'):
data_home = os.path.join(os.environ.get('HOME'), '.local', 'share') data_home = os.path.join(os.environ.get('HOME'), '.local', 'share')
return os.path.join(data_home, 'bukubot') return os.path.join(data_home, 'bukuxmpp')
elif sys.platform == 'win32': elif sys.platform == 'win32':
data_home = os.environ.get('APPDATA') data_home = os.environ.get('APPDATA')
if data_home is None: if data_home is None:
return os.path.join( return os.path.join(
os.path.dirname(__file__) + '/bukubot_data') os.path.dirname(__file__) + '/bukuxmpp_data')
else: else:
return os.path.join(os.path.dirname(__file__) + '/bukubot_data') return os.path.join(os.path.dirname(__file__) + '/bukuxmpp_data')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

View file

@ -3,13 +3,13 @@ requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[project] [project]
name = "BukuBot" name = "bukuxmpp"
version = "0.1" version = "1.0"
description = "A bookmark bot powered by buku" description = "buku bot for XMPP"
authors = [{name = "Schimon Zachary", email = "sch@fedora.email"}] authors = [{name = "Schimon Zachary", email = "sch@fedora.email"}]
license = {text = "MIT"} license = {text = "MIT"}
classifiers = [ classifiers = [
"Framework :: slixmpp", "Framework :: bukuxmpp",
"Intended Audience :: End Users/Desktop", "Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",
@ -25,26 +25,32 @@ classifiers = [
] ]
keywords = [ keywords = [
"bot", "bot",
"bookmark",
"buku", "buku",
"chat", "chat",
"im", "im",
"jabber", "jabber",
"search",
"xmpp", "xmpp",
] ]
# urls = {Homepage = "https://git.xmpp-it.net/sch/BukuBot"} # urls = {Homepage = "https://gitgud.io/sjehuda/buku-xmpp"}
dependencies = [ dependencies = [
"buku", "buku",
"tomli", # Python 3.10 "tomli", # Python 3.10
"tomli_w", "tomli_w",
"slixmpp", "slixmpp",
# Optional dependencies
# listed here (testing)
"html2text",
"pdfkit",
# "pysocks",
"readability-lxml",
"xml2epub",
] ]
[project.urls] [project.urls]
Homepage = "http://bukubot.i2p/" Homepage = "http://bukuxmpp.i2p/"
Repository = "https://git.xmpp-it.net/sch/BukuBot" Repository = "https://gitgud.io/sjehuda/buku-xmpp"
Issues = "https://codeberg.org/sch/BukuBot/issues" Issues = "https://gitgud.io/sjehuda/buku-xmpp/issues"
[project.optional-dependencies] [project.optional-dependencies]
@ -59,10 +65,10 @@ readability = ["readability-lxml"]
# "readable html" = ["readability-lxml"] # "readable html" = ["readability-lxml"]
# [project.readme] # [project.readme]
# text = "BukuBot is a bookmark manager bot using buku. This program is primarily designed for XMPP" # text = "buku-xmpp is a bookmark manager bot using buku. This program is primarily designed for XMPP"
[project.scripts] [project.scripts]
bukubot = "bukubot.__main__:main" bukuxmpp = "bukuxmpp.__main__:main"
[tool.setuptools] [tool.setuptools]
platforms = ["any"] platforms = ["any"]

View file

@ -1,2 +1,2 @@
__version__ = '0.0.3' __version__ = '0.0.2'
__version_info__ = (0, 0, 3) __version_info__ = (0, 0, 2)

View file

@ -1,8 +1,8 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from bukubot.about import Documentation from bukuxmpp.about import Documentation
from bukubot.config import Configuration from bukuxmpp.config import Configuration
try: try:
import tomllib import tomllib

View file

@ -2,12 +2,12 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import slixmpp import slixmpp
from bukubot.xmpp.chat import Chat from bukuxmpp.xmpp.chat import Chat
from bukubot.config import Configuration from bukuxmpp.config import Configuration
from bukubot.about import Documentation from bukuxmpp.about import Documentation
from bukubot.log import Logger from slixfeed.log import Logger
from bukubot.version import __version__ from slixfeed.version import __version__
try: try:
import tomllib import tomllib
@ -29,8 +29,8 @@ logger = Logger(__name__)
class Client(slixmpp.ClientXMPP): class Client(slixmpp.ClientXMPP):
""" """
bukubot - Bookmark manager chat bot for Jabber/XMPP. bukuxmpp - Bookmark manager bot for Jabber/XMPP.
bukubot is a bookmark manager bot based on buku and slixmpp. bukuxmpp is a bookmark manager bot based on buku and slixmpp.
""" """
def __init__(self, jid, password): def __init__(self, jid, password):