Skip to content

Instantly share code, notes, and snippets.

@zverok
Created September 5, 2013 12:54
Show Gist options
  • Save zverok/6449709 to your computer and use it in GitHub Desktop.
Save zverok/6449709 to your computer and use it in GitHub Desktop.
sheet "Обзор" do
cell 'C2', report_meta
cell 'C7', @mentions.summary['value']
cell 'D7', @mentions.summary['change_pct']
cell 'C9', @mentioners.summary['value']
cell 'D9', @mentioners.summary['change_pct']
cell 'C11', @reputation_index.summary['value']
cell 'D11', @reputation_index.summary['change_pct']
end
sheet "Кол-во упоминаний" do
cell 'C2', report_meta
range 'D12',
@mentions.platforms.map{|platform|
[platform['name'],
platform['value'],
platform['value_pct']]
},
1 #num of rows to skip between data rows
end
sheet "Тональность упоминаний" do
cell 'C2', report_meta
cell 'E16', @mentions.meta['positive']
cell 'E18', @mentions.meta['negative']
cell 'E20', @mentions.meta['total'] - @mentions.meta['positive'] - @mentions.meta['negative']
end
sheet "Люди" do
cell 'D2', report_meta
range 'B8', @mentioners.top_10.to_enum(:each_with_index).map{|person, i|
[i+1,
person['profile']['name'],
person['mentions']['total'],
tonality_sign(person['last_mention']['tonality']),
person['profile']['readers_count'] || '—',
person['profile']['url']
]},
1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment