DEV Community

Cover image for Come join me in being judgy about my first project! Welcome to Simpletarot!
Oku-Jo
Oku-Jo

Posted on

Come join me in being judgy about my first project! Welcome to Simpletarot!

It means a lot that you would take the time to check out my little python project!

I am in the beginning stages of my coding competency, and I have been tasked with creating a python-based terminal game. I wanted to keep it simple to make sure I could complete the task, but also leave it open enough that I could iterate on it and introduce more user options and more complex code.

For my project I have created a simple tarot reader. This tarot reader contains two tarot decks, each comprised of only the major arcana cards to keep things manageable. The user is given the option to choose between a deck that does consider card orientation and one that doesn't. After choosing the type of deck, the user is then asked to choose either a single card draw (think magic 8-ball), or a three card spread, representing past, present, and future, as well as supplemental information to aid in interpretation.

I scraped a couple different tarot sites to gather the data, did a bit of manual cleaning-up of the data in google tables, and exported each deck to a csv file, both of which are included in the repository. In the script itself I turned the csv files into dictionaries in order to more easily present the data when a card (key) was drawn. To ensure no duplicates might be drawn, I wrote this program to create the deck dictionaries upon initialization, and then modify the dictionaries to remove key/value sets as cards were 'drawn.' This allowed me to keep things incredibly simple and functional, as my goal is to have a fully working product (and a learning experience).

Please feel free to share this, it is pure flattery that anyone might enjoy my work. Please also feel free to offer more elegant solutions as notes, but keep in mind that I am new to this. I may not yet be able to wrap my head around the more esoteric structures.

https://github.com/Oku-Jo/simpletarot

  • Also don't judge my readme too harshly. I intend to make it into an actual readme.

  • Special thanks to Nova for helping/teaching me the basics of data scraping!

Top comments (0)