From ebb9bbda6dcee3e99bb1672b7c91f8f6173937c2 Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Mon, 12 Nov 2012 10:49:59 +0000 Subject: [PATCH] HTMLParser comentado --- bin/UPC_NEWS_v0.apk | Bin 175757 -> 0 bytes bin/classes.dex | Bin 333028 -> 0 bytes bin/classes/com/upc/pbe/upcnews/HTMLParser.class | Bin 1155 -> 0 bytes bin/classes/com/upc/pbe/upcnews/Parser.class | Bin 857 -> 0 bytes bin/classes/com/upc/pbe/upcnews/Playlist.class | Bin 289 -> 0 bytes bin/jarlist.cache | 3 --- bin/res/drawable-hdpi/ic_action_search.png | Bin 409 -> 0 bytes bin/res/drawable-hdpi/ic_launcher.png | Bin 8528 -> 0 bytes bin/res/drawable-ldpi/ic_launcher.png | Bin 3147 -> 0 bytes bin/res/drawable-mdpi/ic_action_search.png | Bin 311 -> 0 bytes bin/res/drawable-mdpi/ic_launcher.png | Bin 4651 -> 0 bytes bin/res/drawable-xhdpi/ic_action_search.png | Bin 491 -> 0 bytes bin/res/drawable-xhdpi/ic_launcher.png | Bin 12959 -> 0 bytes bin/resources.ap_ | Bin 36458 -> 0 bytes gen/com/upc/pbe/upcnews/R.java | 35 ++++++++++++++++------------------- src/com/upc/pbe/upcnews/HTMLParser.java | 8 ++++++-- 16 files changed, 22 insertions(+), 24 deletions(-) delete mode 100644 bin/UPC_NEWS_v0.apk delete mode 100644 bin/classes.dex delete mode 100644 bin/classes/com/upc/pbe/upcnews/HTMLParser.class delete mode 100644 bin/classes/com/upc/pbe/upcnews/Parser.class delete mode 100644 bin/classes/com/upc/pbe/upcnews/Playlist.class delete mode 100644 bin/jarlist.cache delete mode 100644 bin/res/drawable-hdpi/ic_action_search.png delete mode 100644 bin/res/drawable-hdpi/ic_launcher.png delete mode 100644 bin/res/drawable-ldpi/ic_launcher.png delete mode 100644 bin/res/drawable-mdpi/ic_action_search.png delete mode 100644 bin/res/drawable-mdpi/ic_launcher.png delete mode 100644 bin/res/drawable-xhdpi/ic_action_search.png delete mode 100644 bin/res/drawable-xhdpi/ic_launcher.png delete mode 100644 bin/resources.ap_ diff --git a/bin/UPC_NEWS_v0.apk b/bin/UPC_NEWS_v0.apk deleted file mode 100644 index 493aebc..0000000 Binary files a/bin/UPC_NEWS_v0.apk and /dev/null differ diff --git a/bin/classes.dex b/bin/classes.dex deleted file mode 100644 index 1e0b1c4..0000000 Binary files a/bin/classes.dex and /dev/null differ diff --git a/bin/classes/com/upc/pbe/upcnews/HTMLParser.class b/bin/classes/com/upc/pbe/upcnews/HTMLParser.class deleted file mode 100644 index d9c4969..0000000 Binary files a/bin/classes/com/upc/pbe/upcnews/HTMLParser.class and /dev/null differ diff --git a/bin/classes/com/upc/pbe/upcnews/Parser.class b/bin/classes/com/upc/pbe/upcnews/Parser.class deleted file mode 100644 index 1b81138..0000000 Binary files a/bin/classes/com/upc/pbe/upcnews/Parser.class and /dev/null differ diff --git a/bin/classes/com/upc/pbe/upcnews/Playlist.class b/bin/classes/com/upc/pbe/upcnews/Playlist.class deleted file mode 100644 index a7b9d4b..0000000 Binary files a/bin/classes/com/upc/pbe/upcnews/Playlist.class and /dev/null differ diff --git a/bin/jarlist.cache b/bin/jarlist.cache deleted file mode 100644 index 1b5ec3f..0000000 --- a/bin/jarlist.cache +++ /dev/null @@ -1,3 +0,0 @@ -# cache for current jar dependecy. DO NOT EDIT. -# format is -# Encoding is UTF-8 diff --git a/bin/res/drawable-hdpi/ic_action_search.png b/bin/res/drawable-hdpi/ic_action_search.png deleted file mode 100644 index ffec9be..0000000 Binary files a/bin/res/drawable-hdpi/ic_action_search.png and /dev/null differ diff --git a/bin/res/drawable-hdpi/ic_launcher.png b/bin/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index d42d873..0000000 Binary files a/bin/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/bin/res/drawable-ldpi/ic_launcher.png b/bin/res/drawable-ldpi/ic_launcher.png deleted file mode 100644 index e813987..0000000 Binary files a/bin/res/drawable-ldpi/ic_launcher.png and /dev/null differ diff --git a/bin/res/drawable-mdpi/ic_action_search.png b/bin/res/drawable-mdpi/ic_action_search.png deleted file mode 100644 index ce9399c..0000000 Binary files a/bin/res/drawable-mdpi/ic_action_search.png and /dev/null differ diff --git a/bin/res/drawable-mdpi/ic_launcher.png b/bin/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index de5a408..0000000 Binary files a/bin/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/bin/res/drawable-xhdpi/ic_action_search.png b/bin/res/drawable-xhdpi/ic_action_search.png deleted file mode 100644 index b2d7b2d..0000000 Binary files a/bin/res/drawable-xhdpi/ic_action_search.png and /dev/null differ diff --git a/bin/res/drawable-xhdpi/ic_launcher.png b/bin/res/drawable-xhdpi/ic_launcher.png deleted file mode 100644 index b471ffb..0000000 Binary files a/bin/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/bin/resources.ap_ b/bin/resources.ap_ deleted file mode 100644 index 39735a8..0000000 Binary files a/bin/resources.ap_ and /dev/null differ diff --git a/gen/com/upc/pbe/upcnews/R.java b/gen/com/upc/pbe/upcnews/R.java index 21f38c8..a30263c 100644 --- a/gen/com/upc/pbe/upcnews/R.java +++ b/gen/com/upc/pbe/upcnews/R.java @@ -15,33 +15,30 @@ public final class R { public static final int ic_launcher=0x7f020001; } public static final class id { - public static final int AbsoluteLayout1=0x7f080000; - public static final int button=0x7f080003; - public static final int itemprefs=0x7f080004; - public static final int textViewRoute=0x7f080002; - public static final int textViewXml=0x7f080001; + public static final int AbsoluteLayout1=0x7f070000; + public static final int button=0x7f070003; + public static final int menu_settings=0x7f070004; + public static final int textViewRoute=0x7f070002; + public static final int textViewXml=0x7f070001; } public static final class layout { public static final int main_activity=0x7f030000; } public static final class menu { - public static final int menu=0x7f070000; + public static final int activity_main=0x7f060000; } public static final class string { - public static final int app_name=0x7f050000; - public static final int descarregar=0x7f050004; - public static final int hello_world=0x7f050001; - public static final int hint=0x7f050005; - public static final int menu_settings=0x7f050002; - public static final int prefs=0x7f050008; - public static final int title_activity_main=0x7f050003; - public static final int url=0x7f050006; - public static final int urlhint=0x7f050007; + public static final int app_name=0x7f040000; + public static final int descarregar=0x7f040004; + public static final int hello_world=0x7f040001; + public static final int hint=0x7f040005; + public static final int menu_settings=0x7f040002; + public static final int prefs=0x7f040008; + public static final int title_activity_main=0x7f040003; + public static final int url=0x7f040006; + public static final int urlhint=0x7f040007; } public static final class style { - public static final int AppTheme=0x7f060000; - } - public static final class xml { - public static final int prefs=0x7f040000; + public static final int AppTheme=0x7f050000; } } diff --git a/src/com/upc/pbe/upcnews/HTMLParser.java b/src/com/upc/pbe/upcnews/HTMLParser.java index 246cab8..61119ba 100644 --- a/src/com/upc/pbe/upcnews/HTMLParser.java +++ b/src/com/upc/pbe/upcnews/HTMLParser.java @@ -12,8 +12,12 @@ public class HTMLParser { } public ArrayList parse(){ - String[] split = code.split("\n"); - for(int i = 0; i < split.length; i++){ + //Separem el codi en linies + String[] split = code.split("\n"); + //Anem mirant cada linia. Si comença amb el tag
  • és un apartat de l'index i ens interessa. Els directoris en + //HTML contenen una barra "/" seguida d'unes cometes, per tant, busquem la combinació en la linia. Si la conté, + //la linia conté un directori. Tallem la linia on toca per treure'n el nom i l'afegim a la llista de directoris. + for(int i = 0; i < split.length; i++){ if(split[i].startsWith("
  • ")){ if(split[i].contains("/\"")){ directoris.add(split[i].substring(split[i].indexOf('>', 5), split[i].indexOf('<', 5)-1)); -- libgit2 0.22.2