Skip to content

Instantly share code, notes, and snippets.

@pije76
Forked from pmarkun/astrogenerator.py
Created August 28, 2017 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pije76/2cd9d4eeb2e1615b9340c43b975f0730 to your computer and use it in GitHub Desktop.
Save pije76/2cd9d4eeb2e1615b9340c43b975f0730 to your computer and use it in GitHub Desktop.
import random
from flatlib.datetime import Datetime
from flatlib.geopos import GeoPos
from flatlib.chart import Chart
from flatlib.aspects import getAspect
from flatlib import const
wise_connective = ['in', 'with', 'for', 'as']
aspects = {}
aspects['applicative'] = {
0 : ['favors', 'benefits', 'helps'],
180 : ['challenges', 'threats', 'impairs'],
120 : ['facilitates', 'smooths'],
90 : ['conflicts', 'creates tension with', 'strugles with'],
60 : ['facilitates', 'smooths']
}
aspects['separative'] = {
0 : ['favored', 'benefited', 'helped'],
180 : ['challenged', 'threated', 'impaired'],
120 : ['facilitated', 'smoothed'],
90 : ['conflicted', 'created tension with', 'strugled with'],
60 : ['facilitated', 'smoothed']
}
aspects['exact'] = aspects['applicative']
planets = {
'sun' : ['self-expression', 'will', 'assertion'],
'moon' : ['response', 'intuition', 'feeling'],
'mercury' : ['communication', 'thought', 'movement'],
'venus' : ['harmony', 'love', 'beauty'],
'mars' : ['energy', 'impulse', 'aggresion'],
'jupiter' : ['expansion', 'achievement', 'excess'],
'saturn' : ['limitation', 'structure', 'containment'],
'uranus' : ['change', 'liberation', 'rebellion'],
'neptune' : ['nebulousness', 'illusion', 'imagination'],
'pluto' : ['renewal', 'deepening', 'transformation'],
'chiron' : ['wounding', 'healing', 're-integration'],
'north node' : ['joining'],
'south node' : ['separating'],
'pars fortuna' : [''],
'syzygy' : ['']
}
signs = {
'capricorn' : ['pratical', 'ambitious', 'masterful', 'over-serious'],
'aquarius' : ['revolutionary', 'inventive', 'humanitarian', 'abstract'],
'pisces' : ['mystical', 'visionary', 'compassionate', 'escapist'],
'aries' : ['fierce', 'forceful', 'courageous', 'impulsive'],
'taurus' : ['sensuous', 'peaceful', 'stable', 'obstinate'],
'gemini' : ['mental', 'communicative', 'perceptive', 'superficial'],
'cancer' : ['feelingful', 'intuitive', 'emphatic', 'moody'],
'leo' : ['kingly', 'expressive',' self-confident', 'ego-centered'],
'virgo' : ['chaste', 'detail-oriented', 'serving', 'perfectionist'],
'libra' : ['balanced', 'harmonious', 'reconciling', 'indecisive'],
'scorpio' : ['intense', 'instinctual', 'sexual', 'secretive'],
'sagittarius' : ['friendly', 'open-minded', 'philosophical', 'imprudent']
}
houses = {
'house1' : ['personality', 'physical body', 'early enviroment', 'appearance'],
'house2' : ['money', 'possessions', 'earning ability', 'self-esteem'],
'house3' : ['communication', 'lower mind', 'short journeys', 'siblings'],
'house4' : ['home', 'family lands', 'unconscious', 'past'],
'house5' : ['pleasures', 'social life', 'children', 'creativity'],
'house6' : ['service', 'health', 'work', 'competence', 'skill'],
'house7' : ['partnership', 'identification with others', 'counseling', 'open enemies'],
'house8' : ['death', 'instinct', 'sexuality', 'regeneration', 'others money'],
'house9' : ['long trips', 'adventure', 'higher mind', 'philosophy', 'religion'],
'house10' : ['career', 'status', 'reputation', 'destiny'],
'house11' : ['friends', 'groups',' future', 'wishes', 'goals'],
'house12' : ['limitiations', 'repreession', 'karma', 'self-unfolding', 'secret enemies']
}
disabled = ['syzygy', 'pars fortuna']
class SolarChart(object):
def __init__(self, moment, position):
self.chart = Chart(moment, position, IDs=const.LIST_OBJECTS)
self.objects = [x for x in self.chart.objects]
def tell(self):
for this_planet in self.chart.objects:
that_other_planet = random.choice(self.objects)
if this_planet.id.lower() in disabled:
continue
x = getAspect(this_planet, that_other_planet, const.MAJOR_ASPECTS)
if x.type in aspects['applicative'] and that_other_planet.id.lower not in disabled:
print('{} {} {} {} {} {} {} {} {}'.format(
random.choice(houses[self.chart.houses.getObjectHouse(this_planet).id.lower()]),
random.choice(wise_connective),
random.choice(signs[this_planet.sign.lower()]),
random.choice(planets[this_planet.id.lower()]),
random.choice(aspects[x.movement().lower()][x.type]),
random.choice(houses[self.chart.houses.getObjectHouse(that_other_planet).id.lower()]),
random.choice(wise_connective),
random.choice(signs[that_other_planet.sign.lower()]),
random.choice(planets[that_other_planet.id.lower()])
))
else:
print('{} {} {} {}'.format(
random.choice(houses[self.chart.houses.getObjectHouse(this_planet).id.lower()]),
random.choice(wise_connective),
random.choice(signs[this_planet.sign.lower()]),
random.choice(planets[this_planet.id.lower()])
))
if __name__ == '__main__':
date = Datetime('1986/01/13', '13:46', '-02:00')
pos = GeoPos('-23:32', '-46:38')
a = SolarChart(date, pos)
a.tell()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment