Ignore:
Timestamp:
2012-07-14T10:58:04+02:00 (12 years ago)
Author:
simon04
Message:

JOSM/wikipedia: hide subcategories

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java

    r28485 r28486  
    7474            final List<WikipediaEntry> entries = new ArrayList<WikipediaEntry>();
    7575            while (scanner.hasNext()) {
    76                 final String article = scanner.next().split("\t")[1].replace("_", " ");
    77                 entries.add(new WikipediaEntry(article, wikipediaLang, article));
     76                // TODO ignore redirects
     77                final String[] x = scanner.next().split("\t");
     78                if ("0".equals(x[0].trim())) { // denotes article
     79                    final String article = x[1].replace("_", " ");
     80                    entries.add(new WikipediaEntry(article, wikipediaLang, article));
     81                }
    7882            }
    7983            return entries;
Note: See TracChangeset for help on using the changeset viewer.