Skip to content

Commit 3fe3dce

Browse files
author
ELY M
committed
55932-elys
1 parent b284981 commit 3fe3dce

8 files changed

Lines changed: 115 additions & 7 deletions

File tree

DOC/Todo.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
## Bugs
44

5+
* [FIX] during recent AS updates
6+
7+
```
8+
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
9+
10+
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
11+
12+
For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
13+
```
14+
515
* [ADD] Color Pal - vel not well developed
616
* [FIX] Color Pal - have to select before delete even though subtitle shows
717
* [FIX] Beam height is truncated

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2424
xmlns:tools="http://schemas.android.com/tools"
25-
android:versionCode="55931"
26-
android:versionName="55931-elys">
25+
android:versionCode="55932"
26+
android:versionName="55932-elys">
2727

2828
<uses-permission android:name="android.permission.INTERNET" />
2929
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

app/src/main/java/joshuatee/wx/settings/UtilityHomeScreen.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ package joshuatee.wx.settings
2424
import android.content.Context
2525
import android.content.Intent
2626
import joshuatee.wx.MyApplication
27+
import joshuatee.wx.misc.ImageShowActivity
2728
import joshuatee.wx.misc.RtmaActivity
2829
import joshuatee.wx.misc.USAlertsActivity
2930
import joshuatee.wx.models.ModelsGenericActivity
@@ -37,6 +38,7 @@ import joshuatee.wx.spc.SpcMesoActivity
3738
import joshuatee.wx.spc.SpcSoundingsActivity
3839
import joshuatee.wx.spc.SpcThunderStormOutlookActivity
3940
import joshuatee.wx.ui.CardHSImage
41+
import joshuatee.wx.util.DownloadImage
4042
import joshuatee.wx.util.SoundingSites
4143
import joshuatee.wx.vis.GoesActivity
4244
import joshuatee.wx.wpc.NationalImagesActivity
@@ -187,6 +189,10 @@ internal object UtilityHomeScreen {
187189
classArgs["RAD_2KM"] = arrayOf("")
188190
classId["RAD_2KM"] = RadarMosaicActivity.URL
189191

192+
// classes["WEATHERSTORY"] = ImageShowActivity::class.java
193+
// classArgs["WEATHERSTORY"] = arrayOf(DownloadImage.byProduct(context, "WEATHERSTORY"), "Weather Story")
194+
// classId["WEATHERSTORY"] = ImageShowActivity.URL
195+
190196
listOf(
191197
"FMAP",
192198
"FMAPD2",

app/src/main/java/joshuatee/wx/util/DownloadImage.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ object DownloadImage {
143143

144144
"WEATHERSTORY" -> {
145145
needsBitmap = false
146-
bitmap =
147-
("https://www.weather.gov/images/" + Location.wfo.lowercase(Locale.US) + "/wxstory/Tab2FileL.png").getImage()
146+
bitmap = WeatherStory.getUrl().getImage()
147+
// bitmap =
148+
// ("https://www.weather.gov/images/" + Location.wfo.lowercase(Locale.US) + "/wxstory/Tab2FileL.png").getImage()
148149
}
149150

150151
"WFOWARNINGS" -> {
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/*
2+
3+
Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 joshua.tee@gmail.com
4+
5+
This file is part of wX.
6+
7+
wX is free software: you can redistribute it and/or modify
8+
it under the terms of the GNU General Public License as published by
9+
the Free Software Foundation, either version 3 of the License, or
10+
(at your option) any later version.
11+
12+
wX is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
GNU General Public License for more details.
16+
17+
You should have received a copy of the GNU General Public License
18+
along with wX. If not, see <http://www.gnu.org/licenses/>.
19+
20+
*/
21+
22+
package joshuatee.wx.util
23+
24+
import joshuatee.wx.settings.Location
25+
26+
object WeatherStory {
27+
28+
fun getUrl(): String {
29+
var productUrl = ""
30+
val site = Location.wfo.lowercase()
31+
var url = "https://www.weather.gov/$site/weatherstory"
32+
val html = UtilityIO.getHtml(url)
33+
var scrapeUrl = UtilityString.parse(
34+
html,
35+
"src=.(https://www.weather.gov//images/.../wxstory/Tab.FileL.png). "
36+
)
37+
if (scrapeUrl.isNotEmpty()) {
38+
productUrl = scrapeUrl
39+
} else {
40+
scrapeUrl =
41+
UtilityString.parse(html, "a href=.(/images/\\w{3}/features/weatherstory.png).")
42+
if (scrapeUrl.isNotEmpty()) {
43+
productUrl = "https://www.weather.gov/$scrapeUrl"
44+
} else {
45+
url = "https://weather.gov/$site"
46+
val html = UtilityIO.getHtml(url)
47+
// <div class="image"><img src="http://www.weather.gov/images//mob/graphicast/image8.png" style="max-width: 100%;"></div>
48+
// <div class="image"><img src="http://www.weather.gov/images/abq/graphicast/image1.gif" style="max-width: 100%;"></div>
49+
var scrapeUrls = UtilityString.parseColumn(
50+
html,
51+
"src=.(https?://www.weather.gov/images/?/.../graphicast/\\S*?[0-9].png). "
52+
)
53+
if (scrapeUrls.isNotEmpty()) {
54+
productUrl = scrapeUrls[0]
55+
} else {
56+
scrapeUrls = UtilityString.parseColumn(
57+
html,
58+
"src=.(https?://www.weather.gov/images/?/.../graphicast/\\S*?[0-9].gif). "
59+
)
60+
if (scrapeUrls.isNotEmpty()) {
61+
productUrl = scrapeUrls[0]
62+
} else {
63+
scrapeUrls = UtilityString.parseColumn(
64+
html,
65+
"src=.(https?://www.weather.gov/?/images/?/.../WxStory/\\S*?[0-9].png). "
66+
)
67+
if (scrapeUrls.isNotEmpty()) {
68+
productUrl = scrapeUrls[0]
69+
}
70+
}
71+
}
72+
}
73+
}
74+
return productUrl
75+
}
76+
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:8.7.3'
11+
classpath 'com.android.tools.build:gradle:8.8.0'
1212
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21"
1414
}

doc/ChangeLog.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,28 @@
22

33
# Developer ChangeLog
44

5-
## 55931 2025_01_05
5+
## 55932 2025_01_10
66

7+
* [ADD]
8+
9+
## 55931 2025_01_10
10+
11+
* [ADD] Better "Weather Story" handling for image in homescreen (if configured and if your WFO
12+
offers it)
713
* [ADD] geographic boundaries for Guam and the Commonwealth of the Northern Mariana Islands (CNMI) (
814
required float size change in CanvasMain.kt and RadarGeomInfo.kt). NOTE: most functions do not
915
work for Guam/CNMI due to insufficient LAT/LON adjustment, it's a WIP
1016
* [ADD] 2 observations points in Guam/CNMI but they are not yet usable within the program, it's a
1117
WIP
18+
* [ADD] tooling update
19+
20+
```
21+
- classpath 'com.android.tools.build:gradle:8.7.3'
22+
+ classpath 'com.android.tools.build:gradle:8.8.0'
23+
24+
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
25+
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
26+
```
1227

1328
## 55930 2025_01_05
1429

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip

0 commit comments

Comments
 (0)