File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -23,4 +23,5 @@ def load_config():
23
23
INCLUDE_LINK_THUMBNAIL = cfg ["include_link_thumbnail" ]
24
24
USE_PRIVACY_FRONTENDS = cfg ["use_privacy_frontends" ]
25
25
USE_SHORTLINK = cfg ["use_shortlink" ]
26
+ MONETISE_LINKS = cfg .get ("monetise_links" , True )
26
27
MAXIMUM_TOOTS_COUNT = cfg ["maximum_toots_count" ]
Original file line number Diff line number Diff line change 21
21
INCLUDE_LINK_THUMBNAIL ,
22
22
USE_PRIVACY_FRONTENDS ,
23
23
USE_SHORTLINK ,
24
+ MONETISE_LINKS ,
24
25
MAXIMUM_TOOTS_COUNT ,
25
26
)
26
27
@@ -247,8 +248,10 @@ def parse_args():
247
248
feed_entry_link = re .sub ('\\ ?utm.*$' , '' , feed_entry_link )
248
249
feed_entry_link = re .sub ('/$' , '' , feed_entry_link )
249
250
250
- toot_body += '\n \n 🔗 ' + feed_entry_link
251
-
251
+ if MONETISE_LINKS :
252
+ toot_body += '\n \n 🔗 ' + 'https://shrinkme.io/st?api=81ad7e29077269bcae6dc1773d87abbabeaa9aa8&url=' + feed_entry_link
253
+ else :
254
+ toot_body += '\n \n 🔗 ' + feed_entry_link
252
255
if INCLUDE_AUTHOR and 'authors' in feed_entry :
253
256
toot_body += '\n by ' + feed_entry .authors [0 ].name
254
257
Original file line number Diff line number Diff line change 4
4
"include_link_thumbnail" : true ,
5
5
"use_privacy_frontends" : true ,
6
6
"use_shortlink" : true ,
7
+ "monetise_links" : true ,
7
8
"maximum_toots_count" : 1
8
9
}
You can’t perform that action at this time.
0 commit comments