keeptabs.tools#
The operations of keeptabs, as plain functions: JSON-able arguments in, a JSON-ready dict out.
This module is the single list every surface is built from (TOOLS). It
knows nothing about the command line, MCP or HTTP; a wrapper references
keeptabs.tools:tick and gets a dict back.
Module Attributes
The single list every surface is built from. |
Functions
|
Record something only the human can do (subscribe to a newsletter, provide a key). |
|
Track a named thing (a model, library, company, lab, person, dataset) in a watch. |
|
Add comma-separated keywords to a watch, or to one of its subtopics (created if missing). |
|
Add a source to a watch, or replace the one with the same id. |
|
What every tool runs with: the stores, the matcher, the summarizer, the senders. |
|
Write a digest now and deliver it to the watch's channels. |
|
What the next tick would fetch, and when each other source is next due. |
|
Change top-level fields of a watch. |
|
The tracked things of a watch, with how often and when each was last seen. |
|
The example watch specifications shipped with the package. |
|
Create a watch from a vague idea ( |
|
Search the stored items of a watch: words in the title or summary, a subtopic, an entity, a source, a time. |
|
Everything that waits on the human, across all watches. |
|
Remove a source from a watch. |
|
Mark a human action as done (or dropped), which unblocks the sources that waited on it. |
|
The scheduler entry that runs |
|
Run everything that is due: fetch, match, store, and write the digests that are due. |
|
Show one watch specification in full. |
|
List the watches: id, title, number of sources, and how many human actions are open. |
|
What a watch acquired since |
- keeptabs.tools.TOOLS = [<function examples>, <function watches>, <function watch>, <function init_watch>, <function edit_watch>, <function add_source>, <function remove_source>, <function add_keywords>, <function add_entity>, <function add_action>, <function resolve_action>, <function pending>, <function due>, <function tick>, <function whats_new>, <function items>, <function entities>, <function digest>, <function schedule>]#
The single list every surface is built from.
- keeptabs.tools.add_action(watch_id, action, *, why='', blocks=None, rootdir=None)[source]#
Record something only the human can do (subscribe to a newsletter, provide a key).
blocksis a comma-separated list of source ids that must not run until it is done.- Return type:
- keeptabs.tools.add_entity(watch_id, name, *, kind='thing', url=None, aliases=None, note=None, rootdir=None)[source]#
Track a named thing (a model, library, company, lab, person, dataset) in a watch. Items that mention it, or one of its comma-separated
aliases, are linked to it.- Return type:
- keeptabs.tools.add_keywords(watch_id, keywords, *, subtopic=None, priority=None, rootdir=None)[source]#
Add comma-separated keywords to a watch, or to one of its subtopics (created if missing).
- Return type:
- keeptabs.tools.add_source(watch_id, kind, target, *, title=None, cadence=None, keep_all=False, source_id=None, rootdir=None)[source]#
Add a source to a watch, or replace the one with the same id.
targetis the feed URL, the search query, theowner/namerepository or the newsletter sender address, bykind(feed, arxiv, github_releases, hackernews, news_search, email; any other kind needs its own fetcher at run time).keep_allkeeps every item without a keyword match, for a source already dedicated to the topic.- Return type:
- keeptabs.tools.components(rootdir=None)[source]#
What every tool runs with: the stores, the matcher, the summarizer, the senders.
This is the one place to change when a surface should run on other stores or with a model-based matcher or summarizer: every tool below reads it.
- Return type:
- keeptabs.tools.digest(watch_id, *, since=None, send=False, mark_reported=False, rootdir=None)[source]#
Write a digest now and deliver it to the watch’s channels. Without
sendit is a dry run that changes nothing: show the text and the channels to the user first, because a real send reaches people and cannot be unsent.mark_reportedcounts the items as reported without sending, for a digest that was only read here.- Return type:
- keeptabs.tools.due(*, rootdir=None)[source]#
What the next tick would fetch, and when each other source is next due.
- Return type:
- keeptabs.tools.edit_watch(watch_id, patch, *, rootdir=None)[source]#
Change top-level fields of a watch.
patchis a JSON object; each key replaces that field (a null removes it). Use it for title, intent, scope, keywords, min_score, digest and enabled.- Return type:
- keeptabs.tools.entities(watch_id, *, rootdir=None)[source]#
The tracked things of a watch, with how often and when each was last seen.
- Return type:
- keeptabs.tools.examples()[source]#
The example watch specifications shipped with the package.
- Return type:
- keeptabs.tools.init_watch(title, *, intent='', example=None, spec_file=None, watch_id=None, overwrite=False, rootdir=None)[source]#
Create a watch from a vague idea (
titleandintent), from a shippedexample, or from a YAML or JSONspec_file. Refine it afterwards with the add-* commands or edit-watch.- Return type:
- keeptabs.tools.items(watch_id, *, query=None, subtopic=None, entity=None, source=None, since=None, limit=20, rootdir=None)[source]#
Search the stored items of a watch: words in the title or summary, a subtopic, an entity, a source, a time. Newest first.
- Return type:
- keeptabs.tools.pending(*, rootdir=None)[source]#
Everything that waits on the human, across all watches.
- Return type:
- keeptabs.tools.remove_source(watch_id, source_id, *, rootdir=None)[source]#
Remove a source from a watch. What it already acquired is kept.
- Return type:
- keeptabs.tools.resolve_action(watch_id, action_id, *, status='done', rootdir=None)[source]#
Mark a human action as done (or dropped), which unblocks the sources that waited on it.
- Return type:
- keeptabs.tools.schedule(*, kind=None, every_minutes=30)[source]#
The scheduler entry that runs
keeptabs tickregularly: a launchd property list (macOS), a cron line, or a systemd timer. It is returned, not installed;installsays how.- Return type:
- keeptabs.tools.tick(*, watch=None, force=False, rootdir=None)[source]#
Run everything that is due: fetch, match, store, and write the digests that are due. Safe to run as often as you like; this is what the scheduler calls.
watchlimits it to comma-separated watch ids;forceignores the schedule.- Return type:
- keeptabs.tools.watch(watch_id, *, rootdir=None)[source]#
Show one watch specification in full.
- Return type: