Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to set customized config file path #18

Merged
merged 2 commits into from
Jul 30, 2021

Conversation

cczhong11
Copy link
Contributor

In my use case, I would like to save the config file in another path, so I would like have ability to set customized config file path.

@Linusp
Copy link
Owner

Linusp commented Jul 29, 2021

nichijou2

@Linusp
Copy link
Owner

Linusp commented Jul 29, 2021

@cczhong11 Hi,我近期在做比较大的改动,目前有的计划如下:

  1. 实现 https://www.inoreader.com/developers/ 上的每一个接口
  2. 现在有 fetch-unreadfetch-articlesfetch-starred 几个行为不同的命令行工具,每次都会要完整地从 Inoreader 服务端拉取,有比较大的浪费,按照我的设想准备把下载文章这个过程拆分成两个环节:(1) 拉取文章存储到本地数据库(sqlite/mysql);(2) 从本地数据库导出文章为 markdown/json 等不同格式
  3. 增强过滤功能

不知道你有没有别的功能上的建议呢?

@Linusp Linusp merged commit 060ca4e into Linusp:master Jul 30, 2021
@cczhong11
Copy link
Contributor Author

@Linusp 我个人的use case是想批量tag文章所以用的api,目前python的输入需要是Article object,所以我就只能在notebook里操作😂 后面估计自己弄一弄。
对于cache到db的想法我觉得还是很不错的,就是需要注意和inoreader的sync,感觉很容易inconsistent

@Linusp
Copy link
Owner

Linusp commented Jul 30, 2021

@Linusp 我个人的use case是想批量tag文章所以用的api,目前python的输入需要是Article object,所以我就只能在notebook里操作joy 后面估计自己弄一弄。
对于cache到db的想法我觉得还是很不错的,就是需要注意和inoreader的sync,感觉很容易inconsistent

试试 filter 功能,参考 examples/rules.exmaple.yaml:

- name: test
  folders:
    - inbox
  fields: ["title", "content"]
  filter:
    type: include_any           # include_any/include_all/exclude
    rules:
      - 权威认证
      - 值得拥有
      - 潮牌
      - 新款
      - 求助
      - 招聘
      - 免费版
      - 包邮
      - 天猫
      - 淘宝
  actions:
    - type: mark_as_read
    - type: tag
      tags: tag1,tag2,tag3
    - type: like
    - type: star
    - type: broadcast

通过 folders 可以指定目录,通过 filter 可以指定过滤匹配的条件,目前只支持文章的标题和正文,后续我也考虑加上对订阅源的匹配,然后 actions 那里可以指定要执行的操作,支持标记为 star/like/broadcast/read 以及其他自定义标签,不过还没支持删除标签。

写好配置文件(假设配置文件为 rules.yaml)后,在命令行执行:

inoreader filter -r rules.yaml

@cczhong11
Copy link
Contributor Author

看到了这个example 但我不知道怎么用🤣 谢谢指导!

@Linusp
Copy link
Owner

Linusp commented Jul 30, 2021

看到了这个example 但我不知道怎么用rofl 谢谢指导!

嗯,现在文档还很少,之后我会慢慢补充的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants