mirror of
https://codeberg.org/sch/BukuBot
synced 2024-12-22 18:05:24 +01:00
Compare commits
2 commits
29833803ee
...
163975f837
Author | SHA1 | Date | |
---|---|---|---|
|
163975f837 | ||
|
320bd98d7a |
14 changed files with 127 additions and 43 deletions
90
README.md
Normal file
90
README.md
Normal file
|
@ -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.
|
||||||
|
|
||||||
|
<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
|
10
__main__.py
10
__main__.py
|
@ -6,10 +6,10 @@
|
||||||
# See the file LICENSE for copying permission.
|
# See the file LICENSE for copying permission.
|
||||||
|
|
||||||
import buku
|
import buku
|
||||||
from bukuxmpp.about import Documentation
|
from bukubot.about import Documentation
|
||||||
from bukuxmpp.config import Configuration
|
from bukubot.config import Configuration
|
||||||
from bukuxmpp.xmpp.chat import Chat
|
from bukubot.xmpp.chat import Chat
|
||||||
from bukuxmpp.xmpp.client import Client
|
from bukubot.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()
|
||||||
|
|
12
about.py
12
about.py
|
@ -4,21 +4,21 @@
|
||||||
class Documentation:
|
class Documentation:
|
||||||
|
|
||||||
def about():
|
def about():
|
||||||
return ('Slixmark'
|
return ('BukuBot'
|
||||||
'\n'
|
'\n'
|
||||||
'Jabber/XMPP Bookmark Manager'
|
'Jabber/XMPP Bookmark Manager'
|
||||||
'\n\n'
|
'\n\n'
|
||||||
'Slixmark is an XMPP bot that facilitates accessing and '
|
'BukuBot is an XMPP bot that facilitates accessing and '
|
||||||
'managing bookmarks remotely.'
|
'managing bookmarks remotely.'
|
||||||
'\n\n'
|
'\n\n'
|
||||||
'Slixmark is written in Python'
|
'BukuBot 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://gitgud.io/sjehuda/slixmark'
|
'https://git.xmpp-it.net/sch/BukuBot'
|
||||||
'\n\n'
|
'\n\n'
|
||||||
'Copyright 2024 Schimon Zackary'
|
'Copyright 2024 Schimon Jehudah 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 Zackary Jehudah'
|
return ('Copyright 2024 Schimon Jehudah Zackary'
|
||||||
'\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 '
|
||||||
|
|
|
@ -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, 'bukuxmpp')
|
return os.path.join(data_home, 'bukubot')
|
||||||
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__) + '/bukuxmpp_data')
|
os.path.dirname(__file__) + '/bukubot_data')
|
||||||
else:
|
else:
|
||||||
return os.path.join(os.path.dirname(__file__) + '/bukuxmpp_data')
|
return os.path.join(os.path.dirname(__file__) + '/bukubot_data')
|
||||||
|
|
BIN
documentation/screenshots/adhoc_add.jpg
Normal file
BIN
documentation/screenshots/adhoc_add.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 87 KiB |
BIN
documentation/screenshots/adhoc_browse.jpg
Normal file
BIN
documentation/screenshots/adhoc_browse.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
BIN
documentation/screenshots/adhoc_commands.jpg
Normal file
BIN
documentation/screenshots/adhoc_commands.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
BIN
documentation/screenshots/adhoc_edit.jpg
Normal file
BIN
documentation/screenshots/adhoc_edit.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 104 KiB |
BIN
documentation/screenshots/adhoc_search.jpg
Normal file
BIN
documentation/screenshots/adhoc_search.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
BIN
documentation/screenshots/chat_search.jpg
Normal file
BIN
documentation/screenshots/chat_search.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 116 KiB |
|
@ -3,13 +3,13 @@ requires = ["setuptools>=61.2"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "bukuxmpp"
|
name = "BukuBot"
|
||||||
version = "1.0"
|
version = "0.1"
|
||||||
description = "buku bot for XMPP"
|
description = "A bookmark bot powered by buku"
|
||||||
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 :: bukuxmpp",
|
"Framework :: slixmpp",
|
||||||
"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,32 +25,26 @@ classifiers = [
|
||||||
]
|
]
|
||||||
keywords = [
|
keywords = [
|
||||||
"bot",
|
"bot",
|
||||||
|
"bookmark",
|
||||||
"buku",
|
"buku",
|
||||||
"chat",
|
"chat",
|
||||||
"im",
|
"im",
|
||||||
"jabber",
|
"jabber",
|
||||||
|
"search",
|
||||||
"xmpp",
|
"xmpp",
|
||||||
]
|
]
|
||||||
# urls = {Homepage = "https://gitgud.io/sjehuda/buku-xmpp"}
|
# urls = {Homepage = "https://git.xmpp-it.net/sch/BukuBot"}
|
||||||
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://bukuxmpp.i2p/"
|
Homepage = "http://bukubot.i2p/"
|
||||||
Repository = "https://gitgud.io/sjehuda/buku-xmpp"
|
Repository = "https://git.xmpp-it.net/sch/BukuBot"
|
||||||
Issues = "https://gitgud.io/sjehuda/buku-xmpp/issues"
|
Issues = "https://codeberg.org/sch/BukuBot/issues"
|
||||||
|
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
|
@ -65,10 +59,10 @@ readability = ["readability-lxml"]
|
||||||
# "readable html" = ["readability-lxml"]
|
# "readable html" = ["readability-lxml"]
|
||||||
|
|
||||||
# [project.readme]
|
# [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]
|
[project.scripts]
|
||||||
bukuxmpp = "bukuxmpp.__main__:main"
|
bukubot = "bukubot.__main__:main"
|
||||||
|
|
||||||
[tool.setuptools]
|
[tool.setuptools]
|
||||||
platforms = ["any"]
|
platforms = ["any"]
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
__version__ = '0.0.2'
|
__version__ = '0.0.3'
|
||||||
__version_info__ = (0, 0, 2)
|
__version_info__ = (0, 0, 3)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from bukuxmpp.about import Documentation
|
from bukubot.about import Documentation
|
||||||
from bukuxmpp.config import Configuration
|
from bukubot.config import Configuration
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import tomllib
|
import tomllib
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import slixmpp
|
import slixmpp
|
||||||
from bukuxmpp.xmpp.chat import Chat
|
from bukubot.xmpp.chat import Chat
|
||||||
from bukuxmpp.config import Configuration
|
from bukubot.config import Configuration
|
||||||
from bukuxmpp.about import Documentation
|
from bukubot.about import Documentation
|
||||||
|
|
||||||
from slixfeed.log import Logger
|
from bukubot.log import Logger
|
||||||
from slixfeed.version import __version__
|
from bukubot.version import __version__
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import tomllib
|
import tomllib
|
||||||
|
@ -29,8 +29,8 @@ logger = Logger(__name__)
|
||||||
class Client(slixmpp.ClientXMPP):
|
class Client(slixmpp.ClientXMPP):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
bukuxmpp - Bookmark manager bot for Jabber/XMPP.
|
bukubot - Bookmark manager chat bot for Jabber/XMPP.
|
||||||
bukuxmpp is a bookmark manager bot based on buku and slixmpp.
|
bukubot is a bookmark manager bot based on buku and slixmpp.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, jid, password):
|
def __init__(self, jid, password):
|
||||||
|
|
Loading…
Reference in a new issue