<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# <bitbar.title>Get tweets for the latest iOS releases</bitbar.title>
# <bitbar.version>1.0</bitbar.version>
# <bitbar.author>wwwins</bitbar.author>
# <bitbar.author.github>wwwins</bitbar.author.github>
# <bitbar.desc>Get tweets for the latest iOS releases</bitbar.desc>
# <bitbar.image></bitbar.image>

from lxml import etree

def format_text(xml):
    return (u'%s | href=%s' % (xml[0].text, xml[5].text)).encode('utf-8')

doc = etree.parse("http://twitrss.me/twitter_user_to_rss/?user=iOSReleases")
root = doc.getroot()

print(u'🈶').encode('utf-8')
print('---')
for child in root[0][6:]:
    if "iOS" in child[0].text:
        print format_text(child)
print('---')<commit_msg>Added showing the current version of iOS.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# <bitbar.title>Get tweets for the latest iOS releases</bitbar.title>
# <bitbar.version>1.0</bitbar.version>
# <bitbar.author>wwwins</bitbar.author>
# <bitbar.author.github>wwwins</bitbar.author.github>
# <bitbar.desc>Get tweets for the latest iOS releases</bitbar.desc>
# <bitbar.image></bitbar.image>

from lxml import etree

color = "cadetblue"
ios_version = ""

def format_text(xml):
    return (u'%s | href=%s' % (xml[0].text, xml[5].text)).encode('utf-8')

doc = etree.parse("http://twitrss.me/twitter_user_to_rss/?user=iOSReleases")
root = doc.getroot()

for child in root[0][6:]:
    if "iOS" in child[0].text:
        if not ios_version:
            ios_version = child[0].text.split(' ')[1]
            print(u'iOS:'+ios_version+"|color="+color).encode('utf-8')
            print('---')
        print format_text(child)
print('---')
{'fraction_non_alphanumeric': 0.19607843137254902, 'fraction_numerical': 0.013071895424836602, 'mean_word_length': 4.1030303030303035, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5275697', 'n_tokens_mistral': 637, 'n_tokens_neox': 621, 'n_words': 114}