红加黄是什么颜色| 月牙代表什么意思| 443是什么意思| 焦虑症吃什么药| 心脏不舒服吃什么药最好| 神龙摆尾什么意思| 优势卵泡是什么意思| 为什么晚上血压比白天高| 什么名字最好听| 肠胃不好经常拉肚子吃什么药| 董承和董卓什么关系| 秋天有什么景物| 浅蓝色是什么颜色| 放风是什么意思| 总打嗝是什么原因| 眼屎多用什么眼药水好| 亲亲抱抱举高高什么意思| 高锰酸钾是什么| 扁平疣用什么药膏除根| 骑乘是什么意思| 做提肛运动有什么好处| 喉咙有白点是什么原因| 利妥昔单抗是治什么病| romoss是什么牌子| 见异思迁什么意思| 2020年是什么命| 褐色是什么颜色| 勃起困难吃什么药| 燊字五行属什么| 为什么会吐血| 取缔役什么意思| 现在是什么时间| 金牛座跟什么星座最配| 狗尾巴草的花语是什么| pacu是什么意思| 胃动力不足吃什么中成药| 杜甫被后人称为什么| 耳机降噪是什么意思| 菊花什么时候扦插最好| 老是想拉尿是什么原因| 灰什么| 睡不着是什么原因| 潮热是什么症状| 品牌是什么意思| 干咳挂什么科| 笔什么龙什么| 5月19号是什么星座| 做什么菜好吃又简单| 06是什么生肖| 吃虫草有什么好处| 籍贯填什么| 肝郁气滞吃什么药| 1954年出生属什么| 二十四节气分别是什么| 什么除湿气效果最好| 什么专业就业前景好| 羊经后半边读什么| 子宫糜烂有什么症状| 镰刀菌用什么杀菌剂| 那好吧是什么意思| veromoda是什么牌子| 上次闰六月是什么时候| 学英语先从什么学起| 姐姐的老公叫什么| 异常的异是什么意思| 什么是强迫症| 红苋菜不能和什么一起吃| 乔丹是什么品牌| 产品标准号是什么| 防疫站属于什么单位| 什么是腺癌| 补钙什么时间段最好| 什么的关系| 属鸡是什么命| 首战告捷什么意思| 为什么会下雨| 头孢和阿莫西林有什么区别| 7月29号是什么星座| 歼31为什么没消息了| 宫颈异常是什么意思| 胰腺的作用和功能是什么| 唐氏综合征是什么原因造成的| 甲状腺饱满是什么意思| 宝是什么意思| 麻雀为什么跳着走| 望闻问切是什么意思| 手心脚心发热吃什么药| 高血压是什么引起的| 狗懒子是什么意思| 爷俩是什么意思| 房颤是什么症状| 蓬头垢面是什么意思| mcg是什么意思| 鼻子长痘是什么原因| 梦见洗澡是什么意思| 24节气是什么| 黄痰是什么原因| 大便想拉又拉不出来是什么原因| 拉屎酸臭是什么原因| 一什么狮子| 今年什么时候进入伏天| 什么什么不生| 视力模糊是什么原因| 1月26是什么星座| 早上醒来手麻是什么原因| 大战三百回合是什么意思| 内能与什么有关| 宝石蓝是什么颜色| 天美时手表什么档次| 膝盖怕冷是什么原因| 月经期间可以喝什么茶| 力不从心的意思是什么| 伪善是什么意思| 小孩满月送什么礼物好| 立秋日有什么禁忌| 看病人带什么水果| who是什么意思| 牙龈发炎吃什么药| 鬼剃头是什么原因| 吃完芒果后不能吃什么食物| 霉菌性阴炎是什么原因引起的女| 女人胯骨疼是什么原因| 死胎有什么症状| 人生只剩归途什么意思| 蛇怕什么东西| 蜈蚣泡酒有什么功效| 疤痕增生是什么引起的| 丘疹是什么| 耳朵痒用什么药最有效| 奶粉结块是什么原因| 女人蜕变是什么意思| 脚背有痣代表什么| 为什么会下冰雹| 周年祭日有什么讲究| 五色土有什么风水作用| 财神爷供奉什么供品| 黄疸严重会造成什么后果| 宫腔回声不均匀什么原因| ex是什么| 1972年出生属什么生肖| 柳仙是什么仙| 男人眉毛短是什么面相| 特派员是什么级别| 膀胱癌早期是什么症状| 除湿气吃什么好| 喝醉是什么感觉| 鼻基底用什么填充最好| 真菌性外耳道炎用什么药| 喝什么茶降血压最好最快| 虾皮不能和什么一起吃| 血糖高什么原因引起| 煎饼卷什么菜好吃| 血红蛋白什么意思| 什么是激素类药物| 破日是什么意思| 布朗是什么水果| 日本天皇姓什么| 腿上出汗是什么原因| 为什么老是梦见一个人| 指疣是什么病| 龙涎香是什么东西| mrna是什么| 晚上睡觉多梦是什么原因| 蟋蟀喜欢吃什么| ha什么意思| 什么东西放进去是硬的拿出来是软的| 在农村做什么生意好| 脾胃虚弱吃什么食物| 梨子什么时候成熟| 戊肝抗体igg阳性是什么意思| 乳腺钙化灶是什么意思| 优柔寡断是什么意思| 考教师编制需要什么条件| 指腹为婚是什么意思| imao什么意思| 上唇肿胀是什么原因| 冰箱双变频是什么意思| 覆水难收是什么意思| 痈肿疮疖是什么意思| 看月经挂什么科| s是什么化学元素| 水疱疹什么药最快能治好| 血清载脂蛋白b偏高是什么意思| 生殖疱疹用什么药效果好| 佝偻病是什么意思| 什么是消融手术| 似曾相识是什么意思| 硫是什么颜色| 营卫是什么意思| 1月29日什么星座| 低压低是什么原因| 8.14是什么星座| 御字五行属什么| 右胸痛什么原因| 旗袍穿什么鞋子好看图| 斗牛为什么用红色的布| 紫色是什么颜色调出来的| 乾隆和康熙是什么关系| 急性阑尾炎可以吃什么| 什么叫平仓| 拉稀肚子疼吃什么药| 什么是色拉油| 什么时候测量血压最准确| 脉冲是什么| 什么病会引起皮肤瘙痒| 长沙有什么山| 夜里12点是什么时辰| 阳萎早谢吃什么药最好| 晕车的读音是什么| 法国的货币叫什么| 哪吒代表什么生肖| 挂号是什么意思| 指鹿为马的反义词是什么| 更年期是什么| 双花红棍什么意思| 血粘稠吃什么药最好| 玉米须煮水喝有什么好处| 团长转业到地方是什么职务| 妇科做活检是什么意思| 玳瑁是什么| 发福是什么意思| 鼻窦炎长什么样图片| 虎鲸为什么对人类友好| 碱性磷酸酶高吃什么药| 乘字五行属什么| 水瓶座和什么座最配对| 肩膀疼痛挂什么科| 驳是什么动物| 尿毒症什么症状| 五味子有什么功效| 老年人适合喝什么茶| 孕期不能吃什么| 什么可以美白牙齿| 小孩瘦小不长肉是什么原因| 肌炎有什么症状| 文理分科什么时候开始| 鹅蛋有什么好处| 腹部ct平扫能检查出什么| 三顾茅庐是什么意思| 女大四岁有什么说法| 解惑是什么意思| 肌红蛋白高是什么原因| 陆代表什么数字| 椰子和椰青有什么区别| 舌头麻木是什么原因| 午睡后头疼是什么原因| 做梦梦到很多蛇是什么意思| 被利用的信任是什么歌| 小便黄吃什么药| na是什么牌子| 悦字属于五行属什么| 嗔是什么意思| 心梗是什么原因引起的| 左心房增大是什么原因| 孕早期失眠是什么原因| 青金石蓝是什么颜色| 陶渊明是什么先生| 六月份什么星座| lcu是什么意思| 球蛋白高是什么意思| 足勺念什么| 家庭油炸用什么油好| 人为什么要工作| 梨子和什么一起榨汁好喝| 百度
Skip to content
/ precis Public

Precis is an extensible self-hosted AI-enabled RSS reader with a focus on notifications and support for theming

License

Notifications You must be signed in to change notification settings

leozqin/precis

Repository files navigation

The Precis logo... for now

Precis (properly Précis, pronounced "pray-see") is a extensibility-oriented RSS reader that can use LLMs to summarize and synthesize information from numerous different sources, with an emphasis on timely delivery of information via notifications.

The following components of the app are extensible:

  1. LLMs - LLMs including Ollama and OpenAI, used for functions such as summarization
  2. Content Retrieval - requests or playwright
  3. Notification - matrix, slack, jira, and ntfy
  4. Storage - At this time, we support two reasonable embedded DBs - tinydb or lmdb - defaults to tinydb. We also support a hybrid storage handler that uses LDMB for most things, but stores entry content offline, in the filesystem, as pickled objects (which helps to keep the database size manageable). You can add support for your database of choice if you can implement about 20 shared transactions.

For production use, I recommend the hybrid storage handler.

The LLM and Notification handlers also support a null handler that does nothing. Good for testing or if you don't care about notifications and summaries. The null handler is the default.

Precis also supports themes.

For an extended overview of why this project exists, see my blog.

Architecture

Precis is a FastAPI monolith that serves fully static pages styled by Tailwind CSS using DaisyUI components. It uses some query-parameter and redirect chicanery to fake interactivity. We'll probably add actual interactivity at some point.

Deployment and Development

Environment

Precis uses the following environment variables to define its instance. It is, therefore, possible to have multiple instances of Precis running at the same time, as long as you maintain separation between their storage and config directories.

These are expected to be set as environment variables.

CONFIG_DIR - the directory where config files live, if you use them
DATA_DIR - the directory where the database should live
RSS_BASE_URL - the base url (without trailing slash of the Precis application - used for linking)
PRECIS_STORAGE_HANDLER - the name of the storage handler to use.

Different features may require different environment variables. Developers should strive to set reasonable defaults and document the full range of them in the docker-compose.yml

Deployment via Docker-Compose:

The easiest way to run Precis is via docker-compose:

docker compose up

Feel free to edit the docker-compose.yml as needed to fit your environment.

Pre-Requisites

  • Python 3.11 (for dev, we recommend you use pyenv)
  • Node 20 or higher (use nvm)

Development Instructions

Application

To install the RSS application, create a fresh venv and then:

make dev

Then to develop, in one terminal start tailwind by doing make tw. Then, in other start the main app by doing make run.

If you use nix or nixos, do nix develop to assumme a dev shell and then follow the install instructions above (including creating and activating the venv).

Unit Tests

Precis has unit tests written against pytest. They are automated to run during the pull request pipeline, but you can also run them locally.

Simply do make unit-test to run unit tests.

Integration Tests

Precis has integration tests that are written in Go. They are automated to run during the pull request pipeline, but they also be run locally.

First, install the version of Go specified in go.mod. I recommend to use a Golang version manager such as gvm or g.

Then, start the application using make run. Finally, run the integration tests with make integration-test.

Features

OPML Import/Export

Precis supports exporting your current set of feeds as OPML, as well as importing feeds from other OPML files. You can find options on the /feeds/ page, or use the CLI as described below.

A couple caveats:

  1. When importing an OPML file, if the feed already exists then it will be upserted. Any properties that differ from the OPML file will change to match.
  2. When importing an OPML file, Precis will take the first category as the category of the feed. You may always change the category at a later time.
  3. When importing and exporting, we the map the feed name, feed url, and category to the outline item text, xml_url, and categories[0] attributes, respectively. Please ensure that your input file uses the same conventions.

Backups

Precis supports exporting and importing point-in-time backups of the entire application state. You can find these options on the /about/ page, or use the CLI as described below. One of the design goals of this functionality is supporting the ability to combine two different Precis instances, so the default behavior of the import functionality is to upsert.

Users should be careful about potentially importing the same backup twice, and importing backups that have overlapping content may cause unexpected behavior.

Finally - the backups will contain any API keys or other secrets that you've configured Precis to use, so they should themselves be treated as secrets.

Composable Configurations

Precis supports reading configurations from YML files that are stored in the CONFIG_DIR as an alternative to manually configuring them in the UI. This lets you bootstrap your configuration and/or manage configurations in source control. Of course, even if you use composable configurations, you can still add additional feeds or change settings in the UI.

Composable configurations can be used to configure feeds, settings, and handlers, and each of these can be ingested from the source file using the cli. Below are links to the example configs off of which you can base your own, as well as the command to import those configurations in the CLI.

  • Settings are configured in ${DATA_DIR}/settings.yml and imported using precis load-settings
  • Handlers are configured in ${DATA_DIR}/handlers.yml and imported using precis load-handlers
  • Feeds are configured in ${DATA_DIR}/feeds.yml and imported using precis load-feeds

CLI

Precis includes a CLI tool that can be used to manage the application. Currently, it supports exporting and importing JSON backups and OPML files and loading Composable Configurations (as described above). It should be available if you start a shell in the docker container, or if you activate the virtualenv where Precis is installed. It respects the DATA_DIR and CONFIG_DIR that you configured, if any.

? precis --help
Usage: precis [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  backup         Write a json-format backup of the current Precis state...
  check-feeds    Check for new entries in the configured feeds
  export-opml    Write a opml-format list of the feeds configured in...
  import-opml    Import an opml-formatted feed list into Precis
  load-feeds     Load feeds from a YML-formatted feeds.yml file in the...
  load-handlers  Load global handlers from a YML-formatted handlers.yml...
  load-settings  Load global settings from a YML-formatted settings.yml...
  restore        Restore a json-format backup of the Precis state

Content Ownership

Precis is meant for use as a personal RSS reader. The content retrieval methodology is basic at best, and I do not have much interest in refining it. So, I think it is unlikely that Precis will become a nuisance content scraper.

Furthermore, we pass a unique user agent of the form Precis/{version} so if as a content owner you feel that Precis is acting disruptively, feel free to block that user agent. It will not have destructive impact on users; Precis should detect the rejection and display a link to your website instead of its content.

Finally:

  1. If you'd like to opt-out of content retrieval by Precis, this file contains a set of globs that should return as banned. Feel free to send a PR with your site, but I reserve final say as to whether your request will be accepted. Expect a more understanding and lenient decision making process for small, independent media/publishers.
  2. If you're of the opinion that Precis should respect robots.txt, please thumbs up this issue

UI Tour

After initial onboarding, you'll be brought to the feeds page. The feeds page

You can then view the feed entries for each feed. The feed entries page

When you read a feed entry you'll get the full text of the article, as well as a summary if you have a LLM handler configured. The read page

Global settings can be configured in the UI The settings page

Configuring individual handlers is as simple as following an JSON Schema spec. (At some point we'll make a real UI) The handler config page

damon英文名什么寓意 梦见一条小蛇是什么意思 小分子肽有什么作用 对酒当歌是什么生肖 碎片是什么意思
麦穗鱼吃什么 蚕豆有什么营养 防微杜渐的意思是什么 营养师属于什么专业 缺钾吃什么水果
门头是什么意思 尿路感染要吃什么药 member是什么意思 表面抗体阳性什么意思 杨梅什么时候上市
哺乳期妈妈感冒了可以吃什么药 牙齿酸胀是什么原因 细菌性阴道炎是什么原因引起的 慢性胃炎吃什么药好 桑葚和什么泡酒壮阳
眼睛红血丝多是什么原因hcv7jop6ns8r.cn 什么马奔腾hanqikai.com 喜欢喝冰水是什么原因hcv9jop2ns3r.cn 杜字五行属什么hcv7jop9ns6r.cn 梦见自己掉河里了是什么意思clwhiglsz.com
如意代表什么数字wzqsfys.com 老打嗝是什么原因hcv7jop9ns5r.cn 血肌酐是什么意思hcv8jop8ns5r.cn 今年66岁属什么生肖的hcv8jop3ns3r.cn 滞纳金是什么意思hcv7jop6ns4r.cn
羊奶和牛奶有什么区别hkuteam.com 扁桃和芒果有什么区别hcv9jop7ns9r.cn 六月十二号是什么星座hcv8jop6ns5r.cn 什么叫化学hcv8jop1ns0r.cn 左边脸长痘痘是什么原因hcv9jop0ns3r.cn
憩是什么意思hcv7jop9ns7r.cn 胃不好吃什么最养胃hcv9jop7ns3r.cn 黄桃什么时候上市hcv7jop9ns9r.cn 肌肉拉伤吃什么药hcv9jop4ns1r.cn 春暖花开是什么生肖hcv8jop8ns9r.cn
百度