File tree 2 files changed +21
-3
lines changed
2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ enum Modes {
9
9
BEFORE ,
10
10
AFTER ,
11
11
BETWEEN ,
12
- NONE
12
+ NONE ,
13
+ EXCEPT
13
14
}
14
15
15
16
class Program
@@ -111,7 +112,17 @@ public static void Main(string[] args)
111
112
}
112
113
113
114
dates [ 1 ] = ToUnixTime ( new DateTime ( afterT . Ticks , DateTimeKind . Local ) ) ;
114
- }
115
+ }
116
+
117
+
118
+ if ( before && after && dates [ 0 ] < dates [ 1 ] ) {
119
+ mode = Modes . EXCEPT ;
120
+ }
121
+
122
+ ConsoleColor old = Console . ForegroundColor ;
123
+ Console . ForegroundColor = ConsoleColor . Yellow ;
124
+ Console . WriteLine ( "Mode: {0}" , mode ) ;
125
+ Console . ForegroundColor = old ;
115
126
116
127
// if document isn't a netscape bookmarks file, quit
117
128
String file_content = File . ReadAllText ( path , Encoding . UTF8 ) ;
@@ -154,7 +165,14 @@ public static void Main(string[] args)
154
165
Console . WriteLine ( "REMOVED: {0}" , m . Groups [ "title" ] . Value ) ;
155
166
}
156
167
break ;
168
+ case Modes . EXCEPT :
169
+ if ( date < dates [ 0 ] || date > dates [ 1 ] ) {
170
+ result = result . Replace ( m . Value , "" ) ;
171
+ Console . WriteLine ( "REMOVED: {0}" , m . Groups [ "title" ] . Value ) ;
172
+ }
173
+ break ;
157
174
case Modes . NONE :
175
+ default :
158
176
Console . WriteLine ( "An unknown error occured." ) ;
159
177
break ;
160
178
}
Original file line number Diff line number Diff line change 28
28
//
29
29
// You can specify all the values or you can use the default the Revision and
30
30
// Build Numbers by using the '*' as shown below:
31
- [ assembly: AssemblyVersion ( "1.0 .*" ) ]
31
+ [ assembly: AssemblyVersion ( "1.1 .*" ) ]
You can’t perform that action at this time.
0 commit comments