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():
2323INCLUDE_LINK_THUMBNAIL = cfg ["include_link_thumbnail" ]
2424USE_PRIVACY_FRONTENDS = cfg ["use_privacy_frontends" ]
2525USE_SHORTLINK = cfg ["use_shortlink" ]
26+ MONETISE_LINKS = cfg .get ("monetise_links" , True )
2627MAXIMUM_TOOTS_COUNT = cfg ["maximum_toots_count" ]
Original file line number Diff line number Diff line change 2121 INCLUDE_LINK_THUMBNAIL ,
2222 USE_PRIVACY_FRONTENDS ,
2323 USE_SHORTLINK ,
24+ MONETISE_LINKS ,
2425 MAXIMUM_TOOTS_COUNT ,
2526)
2627
@@ -247,8 +248,10 @@ def parse_args():
247248 feed_entry_link = re .sub ('\\ ?utm.*$' , '' , feed_entry_link )
248249 feed_entry_link = re .sub ('/$' , '' , feed_entry_link )
249250
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
252255 if INCLUDE_AUTHOR and 'authors' in feed_entry :
253256 toot_body += '\n by ' + feed_entry .authors [0 ].name
254257
Original file line number Diff line number Diff line change 44 "include_link_thumbnail" : true ,
55 "use_privacy_frontends" : true ,
66 "use_shortlink" : true ,
7+ "monetise_links" : true ,
78 "maximum_toots_count" : 1
89}
You can’t perform that action at this time.
0 commit comments