more fixes for tags
This commit is contained in:
@ -25,8 +25,7 @@ def main():
|
|||||||
|
|
||||||
for feed in config['feeds']:
|
for feed in config['feeds']:
|
||||||
for entry in get_feed(feed['url'], config['updated']):
|
for entry in get_feed(feed['url'], config['updated']):
|
||||||
print(feed['template'].format(**entry))
|
masto.status_post(get_text(entry))
|
||||||
#masto.status_post(get_text(entry))
|
|
||||||
|
|
||||||
save_config(config, config_file)
|
save_config(config, config_file)
|
||||||
|
|
||||||
@ -66,7 +65,8 @@ def get_feed(feed_url, last_update):
|
|||||||
def get_entry(entry):
|
def get_entry(entry):
|
||||||
hashtags = []
|
hashtags = []
|
||||||
for tag in entry.get('tags', []):
|
for tag in entry.get('tags', []):
|
||||||
hashtags.append('#{}'.format(tag.value))
|
for t in tag['term'].split(' '):
|
||||||
|
hashtags.append('#{}'.format(t))
|
||||||
return {
|
return {
|
||||||
'url': entry.id,
|
'url': entry.id,
|
||||||
'title': entry.title,
|
'title': entry.title,
|
||||||
|
|||||||
2
setup.py
2
setup.py
@ -5,7 +5,7 @@ with open("README.md") as f:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='feediverse',
|
name='feediverse',
|
||||||
version='0.0.3',
|
version='0.0.6',
|
||||||
python_requires='>=2.7',
|
python_requires='>=2.7',
|
||||||
url='https://github.com/edsu/feediverse',
|
url='https://github.com/edsu/feediverse',
|
||||||
author='Ed Summers',
|
author='Ed Summers',
|
||||||
|
|||||||
Reference in New Issue
Block a user