diff -r blogpost-0.9.1-patched-post/blogpost.py blogpost-0.9.1-patched/blogpost.py 559a560,577 > def set_categories_from_blog_file(self): > """ > Set categories from the categories attribute in blog file. > """ > if not self.is_html(): > # asciidoc blog file. > for line in open(self.blog_file): > line.strip() > match = re.match( r':categories: (.*)', line ) > if ( match ): > ## set the catories, by faking the command line > OPTIONS.categories = match.group( 1 ) > self.set_categories() > return > die('unable to find blog categories, as requested to in %s' %self.blog_file) > else: > die('unable to find blog categories in HTML, as requested for %s' %self.blog_file) > 676a695,697 > parser.add_option('-a', '--read-categories', action='store_true', > dest='read_categories', default=False, > help='Read categories as attribute from asciidoc file') 717a739,743 > if OPTIONS.read_categories: > if command not in ('create', 'update', 'categories', 'post'): > parser.error('--read-categories is inappropriate') > if not blog_file: > parser.error('must specify blog file with --read-categories') 795d820 < 798d822 < 802d825 < 806,807d828 < < 809a831,832 > if OPTIONS.read_categories: > blog.set_categories_from_blog_file() diff -r blogpost-0.9.1-patched-post/doc/blogpost.1.txt blogpost-0.9.1-patched/doc/blogpost.1.txt 126a127,134 > *-a, --read-categories > Read the categories from the asciidoc file, set as the 'categories' > attribute. Prefixing 'CATEGORIES' with a plus or minus character > adds or removes the categories from an existing post. Category names > are case insensitive. If an assigned category does not already exist > it will be created. > Applicable to 'categories', 'create, 'update' or 'post' commands. >