~ihabunek

Zagreb, Croatia

~ihabunek/toot-discuss

Last active 2 months ago

~ihabunek/hub3-announce

Last active 2 months ago

~ihabunek/triglav-discuss

Last active 1 year, 8 months ago
View more

Recent activity

Re: Replying to a toot by toot-id 2 months ago

From Ivan Habunek to ~ihabunek/toot-discuss

On Sat, 16 Jul 2022, at 12:45, unpopop wrote:
> Is the toot id being shown different if the toot is from another server?

The toot ID shown in TUI is the ID from your home server, not the ID of the toot on the origin server. That's the ID you want to use to reply to the toot. If you need to see the ID on the origin server, press "v" to view it in the browser, or "u" to view the JSON source which includes the url of the toot on the origin server.

Regards,
Ivan

Re: Replying to a toot by toot-id 2 months ago

From Ivan Habunek to ~ihabunek/toot-discuss

On Fri, 15 Jul 2022, at 09:37, unpopop wrote:
> I got a reply to a post that I made earlier via TUI. How can I respond
> to that?
>
> The original message was posted long time ago that would've to keep
> scrolling forever to get to that one in the TUI.
>
> But I can see the id of the reply toot.
>
> How can we respond if we know the toot-id of a message?

There's no way to do that in the TUI at the moment.

You can use the CLI:

Re: Password manager 5 months ago

From Ivan Habunek to ~ihabunek/toot-discuss

On Sat, 30 Apr 2022, at 15:32, Dimitris Kardarakos wrote:
> At the moment, the access token is saved into the config.json file. I 
> suppose there is no way to read the token from a password manager, e.g. 
> using a terminal command or any plan to integrate with the freedesktop 
> secrets API?

Hi Dimitris,

You're right. Toot does not integrate with password managers / secrets API currently. I'm not convinced this something that belongs in toot since there are so many options for storing secrets we can't possibly support them all.

Regards,
Ivan

Re: Mutable default function argument 9 months ago

From Ivan Habunek to ~ihabunek/toot-discuss

On Fri, 10 Dec 2021, at 06:47, Abhiseck Paira wrote:
> While reading the file toot/http.py, I noticed that the function `post'
> specifies a dictionary as the default value of the `headers' parameter.
>
>   def post(app, user, url, data=None, files=None, allow_redirects=True, 
> headers={})
>
> Since Python Tutorial section 4.7.1 recommends against using mutable
> objects as default value 'cause default value gets mutated every time
> the function gets called, I was wondering if this `post' definition
> mentioned above is intentional or by mistake.

Hi Abhiseck,

[PATCH sr.ht-docs v3] todo.sr.ht: Document sorting 1 year, 23 days ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

---
 todo.sr.ht/index.md | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/todo.sr.ht/index.md b/todo.sr.ht/index.md
index 2ba29c7..e781488 100644
--- a/todo.sr.ht/index.md
+++ b/todo.sr.ht/index.md
@@ -32,14 +32,37 @@ include:
- `status:open` or `status:closed`
- `label`: an optional label that is assigned to a ticket for organizational
  purposes
- `order`: the order in which tickets are displayed. By default this is by
  time of last update
[message trimmed]

[PATCH todo.sr.ht v4 2/3] Store ticket comment counts in the database 1 year, 23 days ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

This saves a query when rendering the tracker page, and allows sorting
by comment count which can be given as a sorting option.
---
 .../6099fe670392_add_ticket_comment_count.py  | 32 +++++++++++++++++++
 todosrht/blueprints/tracker.py                |  8 ++---
 todosrht/templates/tracker.html               |  7 ++--
 todosrht/tickets.py                           | 15 +++++----
 todosrht/types/ticket.py                      |  1 +
 5 files changed, 46 insertions(+), 17 deletions(-)
 create mode 100644 todosrht/alembic/versions/6099fe670392_add_ticket_comment_count.py

diff --git a/todosrht/alembic/versions/6099fe670392_add_ticket_comment_count.py b/todosrht/alembic/versions/6099fe670392_add_ticket_comment_count.py
new file mode 100644
index 0000000..4bbd20b
[message trimmed]

[PATCH todo.sr.ht v4 3/3] Allow sorting by number of comments 1 year, 23 days ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

---
 todosrht/search.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/todosrht/search.py b/todosrht/search.py
index d1aa98f..1ca28a0 100644
--- a/todosrht/search.py
+++ b/todosrht/search.py
@@ -107,6 +107,7 @@ def apply_search(query, search_string, current_user):
    return apply_sort(query, sort_terms, {
        "created": Ticket.created,
        "updated": Ticket.updated,
        "comments": Ticket.comment_count,
    })
[message trimmed]

[PATCH todo.sr.ht v4 1/3] Implement sorting in ticket search 1 year, 23 days ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

By default tickets are sorted by updated DESC, if not otherwise defined.

Sort order is defined by entering `sort:<term>` in the search box where
`<term>` can be one of `updated` or `created`. More terms can be added
later.

Sort order is descending by default, it can be reversed by specifying
`rsort:<term>` instead.
---
 tests/test_search.py            | 112 ++++++++++++++++++++++----------
 todosrht/blueprints/tracker.py  |   3 +-
 todosrht/search.py              |  38 ++++++++++-
 todosrht/templates/tracker.html |   2 +-
 4 files changed, 113 insertions(+), 42 deletions(-)
[message trimmed]

[sr.ht-docs v2] todo.sr.ht: Document sorting 1 year, 23 days ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

---
v2 changes how reverse sort is applied - `rsort:term` replaces
`sort:-term`.

 todo.sr.ht/index.md | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/todo.sr.ht/index.md b/todo.sr.ht/index.md
index 2ba29c7..e781488 100644
--- a/todo.sr.ht/index.md
+++ b/todo.sr.ht/index.md
@@ -32,14 +32,37 @@ include:
- `status:open` or `status:closed`
- `label`: an optional label that is assigned to a ticket for organizational
[message trimmed]

[todo.sr.ht v3 3/3] Allow sorting by number of comments 1 year, 23 days ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

---
 todosrht/search.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/todosrht/search.py b/todosrht/search.py
index d1aa98f..1ca28a0 100644
--- a/todosrht/search.py
+++ b/todosrht/search.py
@@ -107,6 +107,7 @@ def apply_search(query, search_string, current_user):
    return apply_sort(query, sort_terms, {
        "created": Ticket.created,
        "updated": Ticket.updated,
        "comments": Ticket.comment_count,
    })
[message trimmed]