Skip to content

Commit

Permalink
More print strings (#52)
Browse files Browse the repository at this point in the history
* changed line 132 to have str.format()

* Adjusted lines 41-47

* Changed line 52 to str.format()

* Revert "changed line 132 to have str.format()"

This reverts commit 05c17f9.

* Revert "Adjusted lines 41-47"

This reverts commit 5fd6367.

* added more str.format() to feed.py

* changed dictionary to list on lines 43 and 46

* Added new version number (0.30.0) and minor upates to project.zip
  • Loading branch information
ianpaul authored Jul 31, 2021
1 parent 26cf13f commit 1db0bcf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


setup(name='flashbake',
version='0.27.1',
version='0.30.0',
author="Thomas Gideon",
author_email="[email protected]",
maintainer="Thomas Gideon",
Expand Down
2 changes: 1 addition & 1 deletion src/flashbake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import sys #@Reimport
import builtins

__version__ = '0.27.1'
__version__ = '0.30.0'

class ConfigError(Exception):
pass
Expand Down
12 changes: 6 additions & 6 deletions src/flashbake/plugins/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ def addcontext(self, message_file, config):

if len(last_items) > 0:
if self.author == None:
message_file.write('Last %(item_count)d entries from %(feed_title)s:\n'\
% {'item_count' : len(last_items), 'feed_title' : title})
message_file.write('Last {} entries from {}:\n'\
.format(*[len(last_items), title]))
else:
message_file.write('Last %(item_count)d entries from %(feed_title)s by %(author)s:\n'\
% {'item_count' : len(last_items), 'feed_title' : title, 'author' or 'dc:creator' : self.author})
message_file.write('Last {} entries from {} by {}:\n'\
.format(*[len(last_items), title, self.author]))
for item in last_items:
# edit the '%s' if you want to add a label, like 'Title %s' to the output

message_file.write(f'{item["title"]}\n')
message_file.write(f'{item["link"]}\n')
else:
message_file.write('Couldn\'t fetch entries from feed, %s.\n' % self.url)
message_file.write('Couldn\'t fetch entries from feed, {}\n'.format(self.url))

return len(last_items) > 0

Expand Down
Binary file modified test/project.zip
Binary file not shown.

0 comments on commit 1db0bcf

Please sign in to comment.