forked from endorphant/ttbp
		
	moved month printing to chatter
really, time.strftime should probably be used for this, but i got stuck on lowercase month names for consistency and would rather use my internal dict than lowercase the strftime return.
This commit is contained in:
		
							parent
							
								
									1842901ce6
								
							
						
					
					
						commit
						4aa185a9cf
					
				| @ -12,3 +12,6 @@ langfile.close() | ||||
| def say(keyword): | ||||
| 
 | ||||
|   return random.choice(LANG.get(keyword)) | ||||
| 
 | ||||
| def month(num): | ||||
|   return LANG["months"].get(num) | ||||
|  | ||||
							
								
								
									
										17
									
								
								bin/core.py
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								bin/core.py
									
									
									
									
									
								
							| @ -21,21 +21,6 @@ HEADER = "" | ||||
| FOOTER = "" | ||||
| FILES = [] | ||||
| 
 | ||||
| MONTHS = { | ||||
|         "01":"january", | ||||
|         "02":"february", | ||||
|         "03":"march", | ||||
|         "04":"april", | ||||
|         "05":"may", | ||||
|         "06":"june", | ||||
|         "07":"july", | ||||
|         "08":"august", | ||||
|         "09":"september", | ||||
|         "10":"october", | ||||
|         "11":"november", | ||||
|         "12":"december" | ||||
|     } | ||||
| 
 | ||||
| def load(): | ||||
|     global HEADER | ||||
|     global FOOTER | ||||
| @ -114,7 +99,7 @@ def write_entry(filename): | ||||
|     entry = [ | ||||
|         "\t\t<p><a name=\""+date[0]+date[1]+date[2]+"\"></a><br /><br /></p>\n", | ||||
|         "\t\t<div class=\"entry\">\n", | ||||
|         "\t\t\t<h5><a href=\"#"+date[0]+date[1]+date[2]+"\">"+date[2]+"</a> "+MONTHS[date[1]]+" "+date[0]+"</h5>\n" | ||||
|         "\t\t\t<h5><a href=\"#"+date[0]+date[1]+date[2]+"\">"+date[2]+"</a> "+chatter.month(date[1])+" "+date[0]+"</h5>\n" | ||||
|         #"\t\t\t<P>" | ||||
|     ] | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user