morss.py: remove "useless" functions
Have to keep the code clean
This commit is contained in:
		@@ -98,9 +98,6 @@ The arguments are:
 | 
				
			|||||||
	- `item_title`: entry's title
 | 
						- `item_title`: entry's title
 | 
				
			||||||
	- `item_content`: entry's description
 | 
						- `item_content`: entry's description
 | 
				
			||||||
	- `item_time`: entry's date & time (accepts a wide range of time formats)
 | 
						- `item_time`: entry's date & time (accepts a wide range of time formats)
 | 
				
			||||||
- Completely useless
 | 
					 | 
				
			||||||
	- `strip`: remove all description and content from feed items
 | 
					 | 
				
			||||||
	- `empty`: remove all feed items
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Use cases
 | 
					## Use cases
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -255,10 +255,6 @@ def ItemFill(item, options, feedurl='/', fast=False):
 | 
				
			|||||||
def ItemBefore(item, options):
 | 
					def ItemBefore(item, options):
 | 
				
			||||||
    # return None if item deleted
 | 
					    # return None if item deleted
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if options.empty:
 | 
					 | 
				
			||||||
        item.remove()
 | 
					 | 
				
			||||||
        return None
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if options.search:
 | 
					    if options.search:
 | 
				
			||||||
        if options.search not in item.title:
 | 
					        if options.search not in item.title:
 | 
				
			||||||
            item.remove()
 | 
					            item.remove()
 | 
				
			||||||
@@ -268,10 +264,6 @@ def ItemBefore(item, options):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def ItemAfter(item, options):
 | 
					def ItemAfter(item, options):
 | 
				
			||||||
    if options.strip:
 | 
					 | 
				
			||||||
        del item.desc
 | 
					 | 
				
			||||||
        del item.content
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if options.clip and item.desc and item.content:
 | 
					    if options.clip and item.desc and item.content:
 | 
				
			||||||
        item.content = item.desc + "<br/><br/><center>* * *</center><br/><br/>" + item.content
 | 
					        item.content = item.desc + "<br/><br/><center>* * *</center><br/><br/>" + item.content
 | 
				
			||||||
        del item.desc
 | 
					        del item.desc
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user