Open jarun opened 3 years ago
i just noticed that there is possibility to track user with favicon based on this https://github.com/jonasstrehle/supercookie
i may update bukuserver later to set favicon default to false.
Sure thing!
The bukuserver is an awesome frontend for Buku!
Some new functionality:
@zz5zz are you interested in raising PRs?
@rachmadaniHaryono please review.
@zz5zz
Add a Dark mode and possibility to turn on & off (create a custom CSS) Bootstrap should be updated to minimum "bootstrap 3.4.1" to remove the known vulnerabilities (https://snyk.io/vuln/npm:jquery?lh=3.3.1) jQuery should be updated to minimum "jquery 3.5.0" to remove the known vulnerabilities (https://snyk.io/vuln/npm:bootstrap?lh=3.3.5)
these all depend on flask-admin, but i do hope bukuserver can be updated to use latest flask before updating flask admin
Add group / category to be used together with Tags to create a hierarchy when a lot of bookmarks have been added . That way you can as an example create a group called Newspapers with tags like electronics, legal, sports, economics etc.
bukuserver depend on buku to handle tag so no group and category. but it is actually possible if bukuserver can parser tag and handle part of tag as category/group, for example programming: python
tag will be under programming
category group.
Add year & month when added for both navigation purpose and stats over time (how many bookmarks was created in X)
buku don't record created date
When modal opens, should select the first input field by default
this depend on flask admin and should be tested when flask admin updated
Add mousetrap.js to make keyboard shortcuts available like example CTRL+SHIFT+A to create a new bookmark
that seem to be nice addition, but it should be noted that bukuserver should handle external javascript dependency before adding new one . see also #307
@zz5zz are you interested in raising PRs?
@rachmadaniHaryono please review.
I'll try to contribute by doing a PR. Very long time since I handled python so need to brush up a bit.
Please take your time. Feel free to reach out for any help.
What would it take to integrate the Buku database with Mac Spotlight search ? This strikes me as being a separate project, but its hard to know where to get started with it.
Sorry, I am not a Mac user, no ideas.
@RichardConroy You can use Alfred with a custom workflow. For the script you can use Python (or what you like) to execute the buku CLI command, the filtering of the bookmarks can be done by Alfred.
Please add: Utilizing Bookie https://github.com/bookieio/Bookie
i create #546 but after few new bukuserver issue i decided to convert it to draft and merge possible small issue into this pr
unfortunately i can't start weekend but hopefully next few days i can work on it
and maybe if possible upgrade bukusserver to newer flask version
Buku is a great bookmark manager. I use it daily. I wish some of the related projects also work on windows like the bukubrow server and Oil. Search-as-you-type cli front-end. Maybe also an interface to gvim. Anyway, thank you for the good work you've done.
XMPP bot (also other IM platforms that provide API for bots)
this is current pyproject.toml for buku
[tool.poetry]
name = "buku"
version = "4.6"
description = "Bookmark manager like a text-based mini-web."
authors = ["Arun Prakash Jana <engineerarun@gmail.com>"]
license = "GPLv3"
keywords = ["cli", "bookmarks", "tag", "utility"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
"Topic :: Utilities",
]
homepage = "https://github.com/jarun/buku"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.6,<4"
beautifulsoup4 = ">=4.4.1"
cryptography = ">=1.2.3"
html5lib = ">=1.0.1"
urllib3 = ">=1.23"
certifi = {version = "^2021.10.8", extras = ["ca-certificates"]}
appdirs = {version = ">=1.4.3", extras = ["server"]}
arrow = {version = ">=0.12.1", extras = ["server"]}
cffi = {version = ">=1.9.1", extras = ["server"]}
click = {version = ">=7.0", extras = ["server"]}
Flask-API = {version = ">=0.6.9", extras = ["server"]}
Flask-Bootstrap = {version = ">=3.3.7.1", extras = ["server"]}
flask-paginate = {version = ">=0.5.1", extras = ["server"]}
flask-reverse-proxy-fix = {version = ">=0.2.1", extras = ["server"]}
Flask-WTF = {version = ">=0.14.2", extras = ["server"]}
Flask = {version = ">=1.0.2,<2.0", extras = ["server"]}
idna = {version = ">=2.5", extras = ["server"]}
itsdangerous = {version = ">=0.24", extras = ["server"]}
Jinja2 = {version = ">=2.10.1", extras = ["server"]}
MarkupSafe = {version = ">=1.0", extras = ["server"]}
packaging = {version = ">=16.8", extras = ["server"]}
pyasn1 = {version = ">=0.2.3", extras = ["server"]}
pycparser = {version = ">=2.17", extras = ["server"]}
requests = {version = ">=2.21.0", extras = ["server"]}
six = {version = ">=1.10.0", extras = ["server"]}
Werkzeug = {version = ">=0.11.15,<0.15.0", extras = ["server"]}
flask-admin = {url = "https://github.com/flask-admin/flask-admin/archive/refs/heads/master.zip", extras=["server"]}
twine = {version = "^3.7.1", extras = ["packaging"]}
[tool.poetry.dev-dependencies]
attrs = ">=17.4.0"
flake8 = ">=3.4.1"
hypothesis = ">=6.0.0"
mypy-extensions = "0.4.1"
py = ">=1.5.0"
pylint = ">=1.7.2"
pytest-cov = "^3.0.0"
pytest-vcr = ">=1.0.2"
pytest = ">=6.2.1"
PyYAML = ">=4.2b1"
setuptools = ">=41.0.1"
vcrpy = ">=1.13.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
buku = 'buku:main'
bukuserver='bukuserver.server:cli'
the biggest change should be werkzeug for bukuserver
Werkzeug = {version = ">=0.11.15,<0.15.0", extras = ["server"]}
this is because flask_api require werkzeug._compat
which only exist before v0.15.0
so therefore bukuserver packages that need to be upgraded
i'm still waiting pr for flask-reverse-proxy-fix
https://github.com/antarctica/flask-reverse-proxy-fix/pull/1
if i finished with current bukuserver bugfix pr, i will fork the project and create new version
related issue
https://github.com/jarun/buku/issues/449
why using poetry?
from their website
while there is guideline, there is no entry about virtualenv and handling package requirements
predicted issue
to handle pypi release when this is accepted, maybe release alpha/beta/rc version before final version
there are also several tool that i want to add to project
with any of this tool is accepted, guideline on wiki should be changed as well
python 3.6 just ended on december 2021
e:
follow nep 29 https://numpy.org/neps/nep-0029-deprecation_policy.html
idea: if poetry is accepted, post about recruiting new beginner developer for help on doc, test, and program
most of the time, beginner developer can see what is needed or what is not clear on buku
minimal requirement would be just understand poetry and git
e2:
add doc for using pipx to install buku
@jarun, sorry i think i push a commit accidentally. c09ecfbc2745bcc7f2e70942975bfceb0536075a
can you revert it? i think i can do it, but it is better if you do it.
sorry for this
unrelated to above post
but in this issue i thought we could use yaml for issue form
https://github.com/jarun/buku/issues/558#issuecomment-1011482388
imo i think we can update issue template so user have to fill buku version
but i miss the notification on top of that page
Note: Issue forms are currently in beta for public repositories on GitHub.com only.
i thought buku should update its template because when you go to https://github.com/jarun/buku/blob/master/.github/ISSUE_TEMPLATE.md there is always this notification
You are using an old version of issue templates. Please update to the new issue template workflow. Learn more
so i create new issue template and feature request template from github
results
https://github.com/rachmadaniHaryono/Buku/issues/new/choose
https://github.com/rachmadaniHaryono/Buku/blob/master/.github/ISSUE_TEMPLATE/bug_report.md
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
Before opening an issue, please try to reproduce on [the latest development version](https://github.com/jarun/Buku#from-source) first. The bug you noticed might have already been fixed.
If we need more information and there is no communication from the bug reporter within 7 days from the date of request, we will close the issue. If you have relevant information, resume discussion any time.
**To Reproduce**
Steps to reproduce the behavior:
1. ...
2. ...
3. ...
4. See error
Debug logs using the `-g` option
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- Buku version: [e.g. 4.6, or commit hash]
- OS: [e.g. windows, mac, linux, ubuntu]
- Python version [e.g. 3.9, 3.10]
- Terminal emulator and shell [e.g. "alacritty, zsh" or "gnome-terminal, fish"]
- `locale` output, if relevant [e.g. LANG=en_US.UTF-8]
It's a good idea to set your locale to UFT-8. Please refer to [Buku #131](https://github.com/jarun/Buku/issues/30).
**Additional context**
Add any other context about the problem here.
https://github.com/rachmadaniHaryono/Buku/blob/master/.github/ISSUE_TEMPLATE/feature_request.md
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
Please consider contributing the feature back to `Buku` yourself. Feel free to discuss. We are more than happy to help.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
looking at current template, i don't know if it is worth it to change it
i tried to use poetry for buku not haven't found better configuration yet.
there is still issue to use it without copy buku
to buku.py
i also kinda wary(?) about this because this should discussed with other packager
i also tried to create github page with sphinx on current doc, but it is harder
another possibility is to replace it with mkdocs, but that is last option
i am more familiarized with mkdocs for now, so maybe i will try it (and replace sphinx)
pre commit update pr is accepted, so it should be easier for contributor to automate some task
but contributing.md is not yet updated for this
unfortunately i don't give buku time for now, so no fixes for bukuserver for now
Is there a built-in way to add a new tag from the prompt ?
From what I understand, g
only works with existing tag.
Thanks !
Use w
to edit a bookmark and add a tag. You can add it to more bookmarks after that.
Right, that’s what I’ve been doing. Here are 2 suggestions if other people are interested :
G
option to add/modify/set tags by namebuku
design doesn't allow having a tag that's not linked to at least one bookmark.
current state for bukuserver before new release
bug (important)
feature (lower priority, should add to todo list)
e: 606 already done
…Speaking of running tests locally – one of test_network_handler_with_url runs (corresponding to a Google search query) always fails on my machine due to Google server responding with HTTP 429 Too Many Requests (I get the same response when sending the request with wget).
Not sure why this happens (perhaps it's related to me using a VPN for internet access?), but it certainly results in guaranteed fails every time I run unit tests locally. (…Does it really count as a unit test if the network requests are actually being sent? Normally you'd expect the requests themselves to be mocked or at least extracted to external functionality, in part to avoid such factors from affecting the outcome – after all, I doubt that the goal is to test specifically whether the code can communicate with Google servers.)
Does it really count as a unit test if the network requests are actually being sent?
@LeXofLeviafan
but it kinda also show that this function will not result the same thing on different computer, so it kinda work
but for consistency it is actually bad unit test
several options:
e: related https://github.com/jarun/buku/pull/443
Unit tests are meant to test the code itself – whether the logic works correctly. And for a test to show that it "will not result in the same thing on different computer", it needs to be purposefully run on multiple machines (…also such a thing normally indicates that either the test or the code is broken :sweat_smile:)
The reason it fails is purely incidental and completely external (i.e. this particular request has been blocked by Google for specific IPs or something like that) which has nothing to do with what the code is being tested for, really (unless the purpose is to test how various servers on the internet handle repeating requests or how their DDoS detection works).
…The caching thing looks like the way to go (provided the cache is actually included in the repo), except what you'd want is to cache the network requests instead of tests outputs. Ideally you'd want to generate such a cache file once (and never really need to modify it afterwards), and then mock the network environment in the test by providing stored response instead of live network feedback (or simply separate I/O from logic in the code and test the logic only). It can even be archived/compressed (a tarball?) to avoid having many small files or a large one in the repo (which seems to be the reason why #443 got rejected).
current issue with no active pr
e: i'm sorry network cache pr is late, hopefully i can start tomorrow
e2: remove 644
…#644 does have a pull request though :-)
@LeXofLeviafan you are correct, i will remove that
current issue with no active pr
I just realised that #648 appears to be missing from the list.
added to refactor, thanks @LeXofLeviafan
API changes in #660:
get_rec_all()
& get_rec_by_id()
, now have user-friendly properties (id
, url
, title
, desc
, tags
/taglist
, immutable
; as well as for raw DB fields – tags_raw
, flags
)get_rec_all()
, list_using_id()
, searchdb()
, search_by_tag()
, search_keywords_and_filter_by_tags()
& exclude_results_from_search()
are now guaranteed to return a list (empty if no data is found)get_rec_id()
, get_max_id()
& add_rec()
now return None
as the "no ID" valueadd_rec()
, update_rec()
& edit_update_rec()
now treat the value of immutable
parameter as a boolean (the default/noop value for update calls is None
)FIELD_FILTER
dictionary is introduced that contains fields formatting description; also, in format_json()
(and print_json_safe()
), the output format now matches the one described in CLI helpi just noticed that there is possibility to track user with favicon based on this https://github.com/jonasstrehle/supercookie
For the sake of completeness, I'll mention it here as well: the favicons in the app are downloaded from Google server and are treated as regular images, so their sites are not even aware of the user fetching them, let alone having means to make them individual per-user or persist through cache cleaning.
Suggestion: release this fork on PyPI (seeing as the original repo is stale), and change the [reverse_proxy]
dependency accordingly (possibly reintegrating it back into the [server]
deplist).
support offline bookmark addition
This seems to be done with argument --offline
.
@jarun I've listed all pull-requests as items in the "Cooking" list (grouping when necessary); some might be considered too minor to list in the changelog though (at least individually). Added the in-progress stuff as well (as unchecked items).
…Also, you may want check off some of the "Identified tasks" list items; I think some of them at least are done by now.
Continued from #343.
Notes
Please check the open issues for an area to contribute.
bukuserver
has several open features requests.The list below is a growing one. While suggesting new features please consider contributing to
Buku
. The code is intentionally kept simple and easy to understand with comments. We'll be happy to assist any new contributor. We need your help!Some of the fresh-baked features may not have been released yet. Grab the master branch for those.
Cooking
--url
used with--update
(see #729)<meta name="keywords">
in fetched webpages (see #734)get_rec_all_by_ids()
.rss
(Atom) format (@vagos)<url>
/[[url]]
respectively)/api/tags
query from being spammed due to a Flask-Admin bug--add
(or by--tag
) to override fetched tags (unless started with+
)Identified tasks
--preserve
to ignore specific fields during auto-update [see issue #327]exportdb()
API (@rachmadaniHaryono)importdb()
] (thanks @ckolumbus)-n
with-p
(thanks @jpdasma)--export
HTML <meta> Tag
a
andb
but notc
andd
) (thanks @SaltyCatFish)googler
/ddgr
- omniprompt keyO
profiles.ini
(see #212, thanks @alex-bender)--format
in search results (ref, thanks @mosegontar)importdb()
]