krz/moonrise

Night-sky companion for iPhone, Apple Watch and Vision Pro: what's up tonight, the Moon, planets, launches and missions, and a Library of the solar system. SwiftUI app with a Cloudflare Workers backend. astronomy cloudflare-workers ios night-sky space swiftui visionos watchos

docs/library-content.org

04b2b1d914788057bcd20945b876847386eb8f65
moonrise/docs/library-content.org rendered · source · history · blame · raw

78 lines · 4475 bytes

4 symbols in this file
 1#+title: Library content brief
 2
 3Pages live in =Packages/MoonriseKit/Sources/Library/Resources/pages/<section>.json=,
 4one file per section, each a JSON array of pages.
 5
 6* Page schema
 7#+begin_src json
 8{
 9  "id": "mars",
10  "section": "planets",
11  "title": "Mars",
12  "subtitle": "Fourth planet from the Sun",
13  "facts": [
14    { "label": "Mean distance from the Sun", "value": "1.524 AU (227.9 million km)", "source": 0 }
15  ],
16  "essay": "Plain text, paragraphs separated by a blank line.",
17  "image": {
18    "url": "https://… direct .jpg or .png",
19    "credit": "NASA/JPL-Caltech",
20    "licence": "Public domain",
21    "page": "https://… page the image is published on",
22    "caption": "One sentence on what the image shows."
23  },
24  "drawing": { "kind": "planet", "radiusKm": 3389.5, "rings": false, "axialTiltDeg": 25.19, "color": "#C1440E" },
25  "link": { "body": "mars" },
26  "sources": [
27    { "title": "NASA Mars Fact Sheet", "url": "https://nssdc.gsfc.nasa.gov/planetary/factsheet/marsfact.html" }
28  ]
29}
30#+end_src
31
32- =id=: lowercase, hyphenated, unique across all sections (e.g. =m42=, =ori=, =sirius=, =voyager-1=).
33- =section=: one of =sun=, =planets=, =dwarf-planets=, =moons=, =constellations=, =stars=, =deep-sky=, =missions=, =exoplanets=, =rockets=.
34- =facts=: 4–8 items. Every fact has =source=, an index into =sources=. Units in SI or AU, with conversions where helpful. Use tabular style: "10 h 33 m", "29.4 Earth years".
35- =sources=: 1–5 items, primary or authoritative (NASA NSSDC fact sheets, NASA science pages, JPL, IAU, ESA, NOIRLab, SIMBAD). Every URL must return HTTP 200 when checked.
36- =image=: optional only for constellations, stars, missions and rockets when no verifiable image exists (set to =null=).
37- =drawing=: per section:
38  - planets, dwarf planets, moons, sun: ={"kind": "planet", "radiusKm", "rings", "axialTiltDeg", "color"}=; =color= is a representative hex.
39  - constellations: ={"kind": "constellation"}= (the app draws the figure from its line data).
40  - stars: ={"kind": "star", "spectralType": "A1V", "colorIndex": 0.0}= (B−V).
41  - deep sky: ={"kind": "deep-sky", "type": "galaxy|globular|open|nebula|planetary|supernova-remnant", "sizeArcmin": 90}=.
42  - missions: ={"kind": "mission", "status": "active|complete|lost", "launch": "1977-09-05"}=.
43  - exoplanets: ={"kind": "exoplanet", "radiusEarth": 1.07, "orbitAU": 0.0485, "starTempK": 2566}= (omit a field if no measured value).
44  - rockets: ={"kind": "rocket", "heightM": 70.0, "diameterM": 3.7, "status": "active|retired|in development"}=.
45- =link=: what the page describes in the rest of the app: ={"body": "mars"}=, ={"constellation": "Ori"}= (IAU abbreviation), ={"hr": 2491}= (Bright Star Catalogue number), ={"messier": 42}=, ={"spacecraft": "Voyager 1"}=, or ={}=.
46
47* Essay voice
48- 150–250 words, two or three short paragraphs.
49- Plain, direct English, as a knowledgeable colleague would write. No hype,
50  no dramatic framing, no rhetorical questions, no "fascinating",
51  "stunning", "mysterious", "breathtaking".
52- Concrete facts over adjectives: what it is, how we know, one or two
53  things that make it distinctive, and for observable objects how to find
54  it or what it looks like to the eye or a small telescope.
55- Original wording. Draw on public-domain NASA/JPL text and on facts
56  from other sources, but never copy sentences from Wikipedia (CC BY-SA)
57  or any copyrighted text.
58- Present tense for current facts; dates as "1977", "2034".
59
60* Images and licences
61Allowed, in order of preference:
621. NASA (images-api.nasa.gov, images-assets.nasa.gov, science.nasa.gov,
63   photojournal.jpl.nasa.gov): =licence: "Public domain"=. Skip images
64   whose NASA page credits a third party or says they are copyrighted.
652. ESA/Hubble (esahubble.org), ESA/Webb (esawebb.org), NOIRLab
66   (noirlab.edu), ESO (eso.org): =licence: "CC BY 4.0"=, =credit= copied
67   exactly from the image page. No images showing identifiable people.
683. Historical star atlas plates in the public domain (Library of
69   Congress, Linda Hall Library) for constellations: =licence: "Public domain"=.
70
71Use a direct file URL of a moderate size (roughly 800–2000 px; NASA
72=~medium.jpg= or =~large.jpg=, ESA "large"/"screen" sizes). Check every
73image URL with =curl -sI= and keep only HTTP 200 with an image content type.
74
75* Do not
76- Invent values. If a fact cannot be sourced, leave it out.
77- Use Wikipedia as a =sources= entry.
78- Touch any file other than your own section file. No git commands.