
    R1iL                     2    d Z ddlmZ  edd      Zd Zd Zy)zParse Stellarium data files.    )
namedtupleStarNamezhip namec           
      Z   g }| D ]  }|j                         }|j                  d      r%|j                         }|s8|d   }t        dt	        |      d      D cg c]!  }t        ||         t        ||dz            f# }}|j                  |j                  d      |f        |S c c}w )a?  Return a list of constellation outlines.

    Each constellation outline is a list of edges, each of which is
    drawn between a pair of specific stars::

        [
            (name, [(star1, star2), (star3, star4), ...]),
            (name, [(star1, star2), (star3, star4), ...]),
            ...
        ]

    Each name is a 3-letter constellation abbreviation; each star is an
    integer Hipparcos catalog number.  See :ref:`neowise-chart` for an
    example of how to combine this data with the Hipparcos star catalog
    to draw constellation lines on a chart.

       #r         utf-8)lstrip
startswithsplitrangelenintappenddecode)linesconstellationslinefieldsnameiedgess          \/home/cursorai/projects/iching/venv/lib/python3.12/site-packages/skyfield/data/stellarium.pyparse_constellationsr      s    $ N{{}??4 ay3v;242Q fQi.#fQqSk"232 	 4t{{73U;<  4s   &B(c           	      8   g }| D ]  }|j                         }|dk(  s|j                  d      r*|j                         }|d   j                  d      \  }}|j                  t	        t        |      |j                  d      j                  d                    |S )aJ  Return the names in a Stellarium ``star_names.fab`` file.

    Returns a list of named tuples, each of which offers a ``.hip``
    attribute with a Hipparcos catalog number and a ``.name`` attribute
    with the star name.  Do not depend on the tuple having only length
    two; additional fields may be added in the future.

        r   r      |s   _(")r	   )stripr   r   r   r   r   r   )r   namesr   r   hipr   s         r   parse_star_namesr!   '   s     Ezz|3;$//$/1IOOD)	TXHJJw&&w/
 	  Lr   N)__doc__collectionsr   r   r   r!    r   r   <module>r%      s"    " "j*-@r   