feat: 피드 노을 카드도 결론·가장 붉을 때·쉬운 이유로, 노을 이유를 숫자 없는 쉬운 말로, 자세히에서 예보 모델 수 빼고 점수 뜻 설명, 노을 탭 오늘·주소 중복 칩 제거
This commit is contained in:
1 parent
c30fac20a6
commit
f5575711fe
10 files changed
+53
-42
No files matched your search
@@ -28,7 +28,7 @@ from services.air_service import pm10_grade, pm25_grade
|
||||
from services.calc.day_slot import NIGHT_AFTER_SUNSET, slot_of
|
||||
from services.calc.index_calc import rank_score
|
||||
from services.calc.moon import MoonNight, nearest, night, view_line
|
||||
from services.calc.sky_score import GRADE_LABEL, SITUATION_LINE, air_note
|
||||
from services.calc.sky_score import GRADE_LABEL
|
||||
from services.calc.sun import sun_times
|
||||
from services.hero_stats import UV_HIGH, HeroInput, hero_stats, uv_label
|
||||
from services.index_service import IndexBoard, IndexItem, IndexService
|
||||
@@ -663,8 +663,8 @@ class FeedService:
|
||||
target, when, rise = plan.target, plan.when, plan.kind is SkyType.SUNRISE
|
||||
word, icon = ("일출", "sun") if rise else ("노을", "sunset")
|
||||
sit = SkySituation(target.situation) if target.situation else None
|
||||
# 공기가 뿌예 결론이 낮아졌으면 그 이유를, 아니면 하늘 상황을
|
||||
line = "공기가 뿌예 색이 흐려요" if air_note(target.air) else SITUATION_LINE[sit] if sit else GRADE_LABEL[SkyGrade(target.grade)]
|
||||
# 노을 탭 히어로와 같은 쉬운 말 한 줄 (공기가 뿌예 결론이 낮아졌으면 그 이유까지)
|
||||
line = plan.situation_label or GRADE_LABEL[SkyGrade(target.grade)]
|
||||
better = plan.outlook
|
||||
sun = next((b for b in target.best_times if b["kind"] == "sun"), target.best_times[0])
|
||||
sun_at = datetime.fromisoformat(sun["at"]).astimezone(KST)
|
||||
@@ -673,7 +673,8 @@ class FeedService:
|
||||
slides=[], share_messages=[f"{when} {word}은 쉬어요, {line}"])
|
||||
cuts = [Cut(**b) for b in target.best_times if b["kind"] != "peak"]
|
||||
slides = [SunsetSlide(kind="sunset", eyebrow=f"{when} {word} · {c.region.name}", line=line, score=target.score,
|
||||
grade_label=GRADE_LABEL[SkyGrade(target.grade)], cuts=cuts, situation=sit)]
|
||||
grade_label=GRADE_LABEL[SkyGrade(target.grade)], cuts=cuts, situation=sit,
|
||||
headline=plan.headline, peak_at=plan.best_at)]
|
||||
if c.sky.spots and not rise:
|
||||
slides.append(RowsSlide(kind="rows", eyebrow="가까운 노을 명소", line=f"해 지는 {compass(c.sky.sunset_azimuth)}쪽", icon="sunset",
|
||||
rows=[Row(label=f"{n + 1} {x.spot.name}", value=f"{compass(x.direction)} {x.distance_km}km", place=x.spot.name) for n, x in enumerate(c.sky.spots)]))
|
||||
|
||||
Reference in new issue
Block a user