@@ -76,16 +76,6 @@ def __init__(self, id_names=None, in_file_name=None, out_file_name=None):
76
76
if in_file_name is not None :
77
77
self ._id_names += self ._read_ids_from_file (in_file_name )
78
78
79
- @staticmethod
80
- def _rfc_key_function (name ):
81
- """Turn RFC32 into RFC00032 for sorting. This needs to be a staticmethod because it is called as a function from sorted()."""
82
- try :
83
- if name .upper ().startswith ('RFC' ):
84
- return "RFC{:05d}" .format ( int (name [3 :]))
85
- except (ValueError ,TypeError ) as e :
86
- raise BadRFCNumberException (name )
87
- return name
88
-
89
79
@property
90
80
def bibtex_entries (self ):
91
81
# remove Nones (errors returned by urllib), so that they're not printed
@@ -96,19 +86,13 @@ def _read_ids_from_plain_file(self, filename):
96
86
return [line .strip () for line in f ]
97
87
98
88
def _read_ids_from_aux_file (self , filename ):
99
- sort_entries = False # TODO: not yet implemented
100
89
with open (filename , 'r' ) as f :
101
90
rfcs = list ([m .group (1 ) for line in f for m in [self .AUX_CITATION_RE .search (line )] if m ])
102
- if sort_entries :
103
- rfcs = sorted (rfcs , key = self ._rfc_key_function )
104
91
return rfcs
105
92
106
93
def _read_ids_from_tex_file (self , filename ):
107
- sort_entries = False # TODO: not yet implemented
108
94
with open (filename , 'r' ) as f :
109
95
rfcs = list ([m .group (1 ) for line in f for m in [self .TEX_CITATION_RE .search (line )] if m ])
110
- if sort_entries :
111
- rfcs = sorted (rfcs , key = self ._rfc_key_function )
112
96
return rfcs
113
97
114
98
def _read_ids_from_file (self , filename ):
0 commit comments