Browse Source

Add :resolve to remove (some?) tracking links

master
pictuga 1 week ago
parent
commit
9ecf856f10
3 changed files with 5 additions and 0 deletions
  1. +1
    -0
      README.md
  2. +1
    -0
      morss/cli.py
  3. +3
    -0
      morss/morss.py

+ 1
- 0
README.md View File

@ -102,6 +102,7 @@ action:
--proxy doesn't fill the articles
--newest return the feed items in chronological order (morss ohterwise shows the items by appearing order)
--firstlink pull the first article mentioned in the description instead of the default link
--resolve replace tracking links with direct links to articles (not compatible with --proxy)
custom feeds:
--items XPATH (mandatory to activate the custom feeds function) xpath rule to match all the RSS entries

+ 1
- 0
morss/cli.py View File

@ -44,6 +44,7 @@ def cli_app():
group.add_argument('--proxy', action='store_true', help='doesn\'t fill the articles')
group.add_argument('--newest', action='store_true', help='return the feed items in chronological order (morss ohterwise shows the items by appearing order)')
group.add_argument('--firstlink', action='store_true', help='pull the first article mentioned in the description instead of the default link')
group.add_argument('--resolve', action='store_true', help='replace tracking links with direct links to articles (not compatible with --proxy)')
group = parser.add_argument_group('custom feeds')
group.add_argument('--items', action='store', type=str, metavar='XPATH', help='(mandatory to activate the custom feeds function) xpath rule to match all the RSS entries')

+ 3
- 0
morss/morss.py View File

@ -226,6 +226,9 @@ def ItemFill(item, options, feedurl='/', fast=False):
if out is not None:
item.content = out
if options.resolve:
item.link = req['url']
return True

Loading…
Cancel
Save