laurel-thomson / Horoscope

2 stars 2 forks source link

The Horoscope

Horoscope is a simple command line program that gives the user their fortune based on their birthday and the current moon phase. Additionally, users can see the current moon phase or the moon phase of their birthday. The program comes with a list of fortunes, but a custom csv file may also be used (see instructions below).

To use this program, compile it on the command line with: gcc -o main main.c

and run with: ./main

The program will give you a list of options: (1)Have your fortune told (2)Get the current moon phase (3)Get the moon phase of your birthday (4)Upload a fortune csv file (5)Quit

Type either 1,2,3,4 or 5, press enter, and follow the directions.


To upload your own fortune CSV file:

Add a CSV file to the Horoscope directory.

The file will need to contain two fortunes for each zodiac sign: one for a new moon and one for a full moon.

The file needs to be exactly 24 lines and in the following format:

<Aquarius,New Moon fortune> <Pisces,New Moon fortune> <Aries,New Moon fortune> <Taurus,New Moon fortune> <Gemini,New Moon fortune> <Cancer,New Moon fortune> <Leo,New Moon fortune> <Virgo,New Moon fortune> <Libra,New Moon fortune> <Scorpio,New Moon fortune> <Sagittarius,New Moon fortune> <Capricorn,New Moon fortune> <Aquarius,Full Moon fortune> <Pisces,Full Moon fortune> <Aries,Full Moon fortune> <Taurus,Full Moon fortune> <Gemini,Full Moon fortune> <Cancer,Full Moon fortune> <Leo,Full Moon fortune> <Virgo,Full Moon fortune> <Libra,Full Moon fortune> <Scorpio,Full Moon fortune> <Sagittarius,Full Moon fortune> <Capricorn,Full Moon fortune>

To use your custom file, select option 4 from the fortune teller menu and enter the name of your file, including the .csv extension.