{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "July 2056, the Nim population has hit a point of stagnation.\n",
      "My name is 1, I am a proud, yet worn out, nimizen of what is known as the Nimation for now more than five centuries.\n",
      "Since our formation in Europe in 1532 our population has not decreased nor increased.\n",
      "We remain a steady and horrifyingly tiresome sixteen individuals,\n",
      "stuck in what is now a seriously embarrassing hierarchical structure: the pyramid.\n",
      "Our society used to be organised in the following structure\n",
      "1 1 2 3 1 2 3 4 5 1 2 3 4 5 6 7\n",
      "We respond to a very simple set of rules\n",
      "(i) Only one couple is allowed at the time in Nimation\n",
      "(ii) Nimizens are only able to communicate with their immediate neighbour, i.e 1 and 7 can never be in touch\n",
      "(iii) Only Nim’s of an identical position within our pyramid structure can navigate outside of the pyramid together at once\n",
      "As you may imagine, the referral to multiple 1s, 2s, 3s, 4s and 5s was quite unsettling,\n",
      "raised jealousies and could get outsiders confused.\n",
      "The Nim Revolution, 1904, marked a turn in our history as new names were assigned to each nimizen\n",
      "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16.\n",
      "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16\n",
      "Embracing each nimizen as individuals,\n",
      "through distinct names and physical features became the norm.\n",
      "Our diversity had finally become the trope for\n",
      "a fair representation of the self within a co-dependent society.\n",
      "The following year, 1905\n",
      "the L-group composed of 3, 7, 13, 14, 15, 16 and myself\n",
      "wanted to go even further and re-considered our architectural ideologies.\n",
      "We wanted to implement a new set of rules\n",
      "(i) Nimation is opened to groups as much as individuals. It will no longer be a couple only experience.\n",
      "(ii) A nimizen should be able to engage with any other nimizens and not only their immediate neighbour\n",
      "(iii) Identity and social stature is not limited to one’s position in the pyramid\n",
      "(iv) Nimizens should be able to navigate outside the structure with any other nimizens not only the ones of similar structural stature\n",
      "(v) The traditional pyramid structure has to become a structure amongst others, not the default structure\n",
      "(vi) One’s fate shouldn’t be set in stone, one should have agency as to the path one chooses\n",
      "(vii) Nimation should be open to the growth of its nimizens as well as its annihilation, retirement of its nimizens or replacement of its nimizens\n",
      "Unable to convince the others of the necessity of the institution’s rewriting\n",
      "our structure remained the same.\n",
      "1: Psst.\n",
      "Silence.\n",
      "1: Pssst!\n",
      "2: What?!\n",
      "1: I’m not talking to you.\n",
      "2: 3.\n",
      "3: Hm?\n",
      "2: I think 1 is trying to talk to you.\n",
      "3: What is it?\n",
      "1: I’m lonely.\n",
      "3: We already talked about this.\n",
      "1: Well it still hasn’t been solved.\n",
      "3: I’m sorry there is nothing I can do about it at the moment, you could...\n",
      "1: People assume because I’m at the top of the pyramid, everything is great for me!\n",
      "1: Ha, sure is a great bore. Five centuries of solitude, an omnipotent perspective that has no witness.\n",
      "1: No one to share my point of view with.\n",
      "1: To get any mundane experience across I need a waterfall of information\n",
      "1: to slightly hope one will get some kind of input and they might never understand.\n",
      "3: I understand you! Or at least try too.\n",
      "2: Quiet you two I’m practising.\n",
      "1: And when I go, I go alone.\n",
      "3: Well at least you don’t have to suffer the unreasonable ones of this row.\n",
      "1: And when I fear, I fear alone.\n",
      "3: You talk to me, sometimes.\n",
      "7: Is one having a moment again?\n",
      "3: Yes, yes, we’re trying to figure it out.\n",
      "2: Sssh.\n",
      "6: This again?\n",
      "2: 1 is trying to annihilate us again.\n",
      "6: Let them be, they will be picked at soon enough again.\n",
      "2: Hmm.\n",
      "1: And when I dream, I dream alone.\n",
      "7: They got everyone up again.\n",
      "3: Everyone’s up now.\n",
      "1: Well not enough.\n",
      "3: Let’s keep it quiet for now.\n",
      "1: You know?\n",
      "3: Tell me.\n",
      "1: In dreams... I walk with you.\n",
      "3: Roy?\n",
      "1. what are the characteristics of the lootbox?\n",
      "unknown items\n",
      "closed boxes\n",
      "surprise mechanism\n",
      "a gift to yourself\n",
      "emotional response\n",
      "fast-thinking\n",
      "gambling\n",
      "payment - cost\n",
      "progress in the game\n",
      "immediate reward\n",
      "hacks the temporality of a game\n",
      "exploitative\n",
      "designed to be addictive\n",
      "target vulnerable player\n",
      "FOMO\n",
      "interfaces the game and the real world\n",
      "loot box as currency exchange\n",
      "from game-coins or collectible items to real money\n",
      "works within a context\n",
      "Gersande\n",
      "The loot box is a virtual feature players can purchase with real money in free-to-play games or full-price-games.\n",
      "It can be assumed to be a certain item or feature but is random to the player.\n",
      "The element of surprise is a highly appreciated aspect of the loot box.\n",
      "Because of the way this feature has been embedded in games, it has very real addictive mechanisms to it.\n",
      "Some players might even feel cornered into purchasing loot boxes as the game cannot reach its “full potential” without it.\n",
      "This repeated scheme ensures the constant spending of the players into virtual game currencies.\n",
      "The context of the loot box is very demanding to the player.\n",
      "It is what motivates immediate irrational (can be rational in the context of the game) purchases.\n",
      "The urgency of a narrative, quest, social pressure or else can justify any loot boxes.\n",
      "The immediate reward makes it fun, the risk comes with pleasure.\n",
      "This thus combines cost, addictiveness, gambling, reward, fun.\n",
      "Strong emotional reactions are tied to finances.\n",
      "The surprise mechanism and exclusivity of the loot box creates a constant FOMO.\n",
      "The endless collecting potential of loot box creates fantasy needs for people to be exploited by the fun.\n",
      "The benefits for the game platforms are financial, for the player emotional.\n",
      "Carmen\n",
      "The loot box is like a secret treasure that is usually not worth the money you pay for it, or the expectations you have for it\n",
      "but that its somehow exciting\n",
      "I think the addictiveness is very connected to the surprise mechanism, I think that anticipation moment is what is addictive.\n",
      "How that makes you feel.\n",
      "Anything is possible.\n",
      "Of course then you open it and its disappointing.\n",
      "But there is a moment before opening it when ANYTHING is possible.\n",
      "I like that state of being.\n",
      "Is like the cat in the box, is he dead is he alive, he is both until you open the box.\n",
      "In that sense, this feeling of excitement and anticipation could be related to the excitement of gambling.\n",
      "I think the reward is also connected to the collectionable feature.\n",
      "You feel that even if you don't get exactly what you wish you will get something.\n",
      "So you feel somehow rewarded, and the fact that there are more tries available make this reward feeling safe, thus repeteable or collectionable.\n",
      "Jian\n",
      "The lootbox is a digital or physical box that contains random (or unknown) items.\n",
      "The box is embedded in a context (for example in the fictional world of a game).\n",
      "There are 2 main characteristics:\n",
      "Payment\n",
      "Surprise\n",
      "The main characteristics or mechanisms of the lootbox are the payment and the surprise.\n",
      "You don´t get it for free, and you dont know what you get.\n",
      "The combination of payment and surprise can have the following effects:\n",
      "gambling, addiction, pleisure,\n",
      "thrill, excitement, reward,\n",
      "disappointment, risk, ritual,\n",
      "exclusivity, time pressure,\n",
      "social pressure, desire,\n",
      "destiny, exploitation, FOMO\n",
      "etc.\n",
      "Chae\n",
      "In video game the loot box is\n",
      "a virtual object containing randomized items\n",
      "from making your game character more unique to shifting the dynamic of game.\n",
      "1. an entertaining element, keeping the players hooked to the game by using the element of surprise and;\n",
      "2. a money-making mechanism in video game by using real world money to get it.\n",
      "Mitsa\n",
      "A loot box is a virtual box inside video games that provide a player with collectibles or essential items\n",
      "that make them progress inside the game.\n",
      "It derives from the loot\n",
      "a bunch of goodies that a player can get as a reward after they conquer-win a super boss or level up.\n",
      "But the loot box in its more recent and exploitative version is getting purchased with real money from a player.\n",
      "The player never knows what is inside of it.\n",
      "But they know that there is a chance of getting some items that they desire.\n",
      "Many times a loot box appear in the gameplay and it disappears quickly\n",
      "in order to be exclusive and make the player buy them without thinking too much.\n",
      "The loot box are designed for making profit and its latest form are getting purchased directly by the consumer.\n",
      "In order to be really essential for the player/consumer for keeping them more on the game\n",
      "and making them purchasing it again and again they are designed in order to be desirable.\n",
      "They are desirable because they create the chances that a player gets a really rare or powerful item out of them.\n",
      "But they are like gambling because the player doesn't know what is inside of it.\n",
      "They look like real gifts -they are closed boxes- but you purchase them for yourself.\n",
      "And at some point you get them as a reward after accomplishing a really heroic task.\n",
      "Also the fact that the loot boxes are rare makes them again desirable\n",
      "and put the player in a condition for purchasing them without thinking too much.\n",
      "This last characteristic is similar to the discount periods or black friday.\n",
      "Supi\n",
      "a loot box is a virtual box of hidden motives designed to persuade and/or trick players.\n",
      "an alternate reality experience of collecting things you can't own in real life\n",
      "surprise that comes with consequences\n",
      "risk, reward\n",
      "trigger for addictive/toxic behavior\n",
      "surprise mechanism\n",
      "how does exposing the inner workings and real motives of the loot box affect the players' behavior/decision making?\n",
      "looking under the hood\n",
      "time constraint or the lack thereof\n",
      "how this contributes to the risk / pleasure / adrenaline rush that comes with every loot box unlocking experience\n",
      "Flem\n",
      "a virtual box where the user can pay and access products/items that can be useful to go on with the game, or can be collectable.\n",
      "This lottery box is based on a surprise and gambling mechanism\n",
      "in which the user excited for the \"new-things-idea\" would pay weird amounts of money to obtain something.\n",
      "a player pays real money to buy a virtual treasure box\n",
      "HOPING it contains something valuable within the world of the game\n",
      "no limitations (not good both for who is addicted or for children)\n",
      "the idea that you will get better if you buy one\n",
      "rewarding experience\n",
      "you choose, you get something nice (idea of the gift to yourself)\n",
      "you have more power in the game (and in your life?)\n",
      "guaranteed reward in exchange of money\n",
      "the characteristic that worries me the most is:\n",
      "game as escapism from the real life\n",
      "Kamo\n",
      "A loot box is a gambling mechanism, exploitative by design, that promises immediate in-game rewards to the player.\n",
      "Those rewards can affect both the gameplay and the social environment around the game.\n",
      "Grgr\n",
      "The lootbox is a temporalized tool for the distribution and management of resources\n",
      "between the inside of the gameplay and the outside of the gameplay.\n",
      "Lootbox is like a pulse in the circulation of resources between virtual game and the reality ouside of it.\n",
      "Lootbox is temporalized because it sets the beat, it's a repetitive rhythm for the player's temporality.\n",
      "It builds an habit by triggering the attention and the emotional response of the player\n",
      "(surprise element + gambling + reward + it's fun)\n",
      "and ensuring that the player keeps playing potentially forever\n",
      "(from habit to addiction)\n",
      "The lootbox is also a mechanism that focuses on individual engagement, a personalized 1 to 1 interaction, or 1 to machine interaction.\n",
      "an immediately rewarding response preceeded by a generally customized trigger.\n",
      "but these are also the things I would like to change or make them fairer in our lootbox.\n",
      "2. what characteristic do we want to subvert?\n",
      "subvert - /səbˈvəːt/ - verb - gerund or present participle: subverting\n",
      "undermine the power and authority of (an established system or institution).\n",
      "to overturn or overthrow from the foundation : RUIN\n",
      "to pervert or corrupt by an undermining of morals, allegiance, or faith\n",
      "When you subvert something, your words or actions criticize or undermine the usual way of doing something or common values.\n",
      "The girl who wears a tuxedo to the prom might subvert traditional ideas about beauty.\n",
      "To subvert an institution like a school or a government is to overthrow it or stop its normal way of functioning.\n",
      "Subvert comes from the Latin word subvertere, which combines the prefix sub, under, and the suffix vertere, to turn.\n",
      "So you can imagine something that subverts as overturning or flipping the usual way of doing things.\n",
      "Like a student who subverts a teacher's authority, causing chaos in the classroom.\n",
      "Examples of Subvert in a sentence\n",
      "In the movie, the rebels sought to subvert the tribunal’s power and replace the body with a democratic government.\n",
      "My stepmother is slowly changing things in our house in an attempt to subvert my mother’s traditions.\n",
      "Since the prince was in a hurry to become king, he planned to subvert his father’s influence by convincing everyone the leader was  - insane.\n",
      "The dictator ordered the execution of every insurgent who sought to subvert his authority.\n",
      "When the first mate tried to subvert the captain’s position, he was thrown overboard.\n",
      "Our approach to subvertion\n",
      "taking something and making you own but also a bit of not conflictive way\n",
      "if we want to subvert the lootbox, how it is used in a manipulated way\n",
      "make fun of it, change it, turning it around\n",
      "intention to reveal / question the mechanisms of the lootbox\n",
      "part of the loot box is that it keeps a secret\n",
      "chenging the context but not the functionality, it doesn't transform everything\n",
      "There are multiple ways/strategies to subvert something\n",
      "change direction or orientation of something\n",
      "One per week per person :)\n",
      "week 18-24.01.2022\n",
      "you are in an empty room with 13 doors that are portals to 13 different worlds.\n",
      "5 min slow-mo epidemics, visual transmitted\n",
      "every crisis is a simulation of another crisis / every crisis is a preparation for another crisis\n",
      "you receive a point for each moving/floating tile on the street you encounter\n",
      "you sleep and the more you sleep, the more the buildings around the bedroom collapse and the nature starts growing and invading the space\n",
      "thermoSTATE - The state where no citizen has to feel cold\n",
      "The same day is looping over and over, the goal is to figure out which decision will make you move on to the next day.\n",
      "A flat with no floors\n",
      "Hello, where are you, what can you see from there?\n",
      "you give a gift to someone else, that person gives another gift to someone else\n",
      "you meet a person in a corridor, but you're in a supermarket, in Canada <3 :D\n",
      "week 01-07.02.2022\n",
      "Collect fantasy words in a fantasy world by talking to other fantasy characters so you can describe fantasy objects better\n",
      "...and yes...only give a positive answer (or inflection) to any question...\n",
      "A city room without gravity\n",
      "Thank you! No, I thank you! Noo, I thank YOU! No. I really thank you.No I THANK you!\n",
      "you get up and you're a dictator for 5 min.\n",
      "more difficult version: you get up and you're a dictator for 5 min and if you don't change anything in the current status quo you die\n",
      "you have a letal laughter...\n",
      "You have to leave your home to not be late but you start playing a game\n",
      "You change language and you discover how clever you are but you cannot communicate with the others any more.\n",
      "you are in an empty room with 13 doors that are portals to 13 similar worlds. only your character changes.\n",
      "plastic bag in a windy day at the market simulator\n",
      "reality show for cultural workers\n",
      "A portal will take you on the opposite spot on the globe from the one you've picked up\n",
      "You dive into an ocean without an ocean floor but it’s actually the sky\n",
      "a bruschetta and some tomato sauce. but you're not in Italy.\n",
      "you're a flock of birds and you interact with things only collectively\n",
      "you're in a layer of a multilayered world, and you cannot see the effect of you actions unless you change layer.\n",
      "any action could potentially kill the other players (including staying still), the longer all the players are kept alive the more you score.\n",
      "dutch wind vs. human\n",
      "interpret what birds are saying\n",
      "https://hub.xpub.nl/soupboat/~chae/IMG_2458.JPG\n",
      "a game where your problems/real life issues are solved through playing (and you don´t know it´s happening)\n",
      "sometimes things change depending who you tell them to\n",
      "a one sentence games list that never ends.........\n",
      "and keeps growing\n",
      "almost in real time\n",
      "hahaha\n",
      "week 08-14.02.2022\n",
      "You're a Helium Balloon and you just got to the Big City\n",
      "You are stuck in reality and you're trying to get back to your imaginary world but cannot find the door\n",
      "you are a drug addicted (\"choose your poison\" at the beginning) and have to find the money to get high and then you go through trips and abstinence\n",
      "Build the highest high heels in the world so you can traverse the Mariana trench (with a depth of 11,034m) without touching the water\n",
      "it is night with rain and devil wind and you are trying to ride your way home\n",
      "the calories burned while running on the treadmill become actual currency\n",
      "files keep coming in and you have to sort them in your folder system\n",
      "unexpected event and the order changes\n",
      "you get to experience your whole life in reverse\n",
      "There is no gravity, no left or right, no up and down, but you have to indicate someone their way to the treasure.\n",
      "week 15-21.02.2022\n",
      "Life's a game, play the game.\n",
      "You're a door and you have the power to open or close as you wish, sometimes someone tries to go through you, will you let them pass?\n",
      "you enter a room full of obscure items and have to select some of them to curate an exhibition\n",
      "Time is given to each player.\n",
      "During the game, several tasks are given to players, and they need to split their time and accomplish those tasks within those split (limited) time.\n",
      "If you fail to do it in given time, it will affect the whole time sequence.\n",
      "In short, you play the game by splitting your time, rearranging your priority constantly.\n",
      "(i know this game)\n",
      "git commit-push battle :D\n",
      "OH STOP IT\n",
      "noise-inducing headphones so you can hear the electronic magnetic fields around you\n",
      "SI17 class but the sound is really HD\n",
      "harmonizing everything\n",
      "the printer that works is hidden somewhere in a maze\n",
      "Do you want me to tell you the story of Wendy?\n",
      "you enter a room where you meet your friends with whom you play a game where you play a game where you play a game where you play a game\n",
      "https://hub.xpub.nl/soupboat/~flem/is_this_a_friendly_night_.html\n",
      "Hi Student!! So nice to talk to y0u.\n",
      "I was hoping that you're writing is going re4lly well and that you are doing so so good.\n",
      "I really mis34 being your te4cher.\n",
      "All the best, Steve!!!\n",
      "I'm leaving 🍷 Wine Harbour now ;))\n",
      "Who are you, reveal yourself\n",
      "week 01-07.03.2022 [spring break]\n",
      "The rain starts when the meeting stops\n",
      "the rain stops when the meeting starts\n",
      "produce 50 000 post-its\n",
      "week 07-14.03.2022\n",
      "\"guess the guests\" - Miri the Leader thanks for adding hahah\n",
      "Try to eat the hole of a donut\n",
      "Try to find out whether the donut hole is expired it was good\n",
      "each chatroom is a different reality\n",
      "a random age generator which gives you a random age on your bday and your body turns that age as well - Miri the Leader\n",
      "cooking mama\n",
      "the world is literally turned upside down and you must try to cure a hickup!\n",
      "a random ape generator which gives you a random ape on your bday and your body turns that ape as well ahahahaha\n",
      "a random grape generator which gives you a random grape on your bday and your body turns into wine\n",
      "a random random generator which gives you a random random on your bday and your body turns that random as well\n",
      "randominance\n",
      "thank you mitsa for the donut yesterday although it was expired\n",
      "week 14-21.03.2022\n",
      "Steal Jeff Bezo's money and use it for SI17\n",
      "SI17 launch but everyone is being kicked out from FNP for no apparent reason\n",
      "sushi but it tastes like cola\n",
      "cola but it tastes like sushi\n",
      "The exquisite corpse is a multiplayer game invented by the surrealists in which the participants compose a drawing or a story together.\n",
      "Traditionally the game is played on a long sheet of paper, and each player draws a part.\n",
      "The process requires to hide the drawing to the next person, but leaving them some hints to continue.\n",
      "The following fellow keeps draw from there and so on.\n",
      "The result is a weird linear narrative, in which the transition between authors are at the same time smooth and abrupt.\n",
      "The Exquisite Branch is an online take on the game.\n",
      "It questions concepts such as authorship and collaboration in the light of the digital age.\n",
      "The original version is constrained to the single piece of paper and is doomed to be linear.\n",
      "Here we can imagine our drawings forking and branching and go in different directions.\n",
      "The way in which XB works recall the flows of a protocol like Git.\n",
      "Instruction\n",
      "There are 2 ways to get to the XB\n",
      "either you navigate to https://hub.xpub.nl/soupboat/xquisite\n",
      "or you receive a link from someone pointing to a specific branch\n",
      "you can either start a new drawing, continue from the last contribuition or view all the branches\n",
      "then it's time to scribble something or paint a masterpiece\n",
      "and when you are done you can submit the drawing\n",
      "you will receive a new link to share with others.\n",
      "They will continue from your drawing, so leave some hints!\n",
      "If you pass the link to just one person the xquisite drawing will continue linearly\n",
      "but if you pass it to several people it will branch\n",
      "resulting in multiple version with a common starting point.\n",
      "{'card': 'A1', 'quote': \"Dreams don't work unless you do.\", 'motivation': 70, 'emphaty': 0, 'vision': 40, 'positivity': 0}\n"
     ]
    },
    {
     "ename": "KeyError",
     "evalue": "'img'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mKeyError\u001b[0m                                  Traceback (most recent call last)",
      "\u001b[1;32m/Users/1037729/Desktop/post-it-contents/dump.ipynb Cell 1'\u001b[0m in \u001b[0;36m<cell line: 12>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     <a href='vscode-notebook-cell:/Users/1037729/Desktop/post-it-contents/dump.ipynb#ch0000000?line=14'>15</a>\u001b[0m \u001b[39mfor\u001b[39;00m content \u001b[39min\u001b[39;00m metadata[\u001b[39m\"\u001b[39m\u001b[39mcontents\u001b[39m\u001b[39m\"\u001b[39m]:\n\u001b[1;32m     <a href='vscode-notebook-cell:/Users/1037729/Desktop/post-it-contents/dump.ipynb#ch0000000?line=15'>16</a>\u001b[0m     \u001b[39mprint\u001b[39m(content)\n\u001b[0;32m---> <a href='vscode-notebook-cell:/Users/1037729/Desktop/post-it-contents/dump.ipynb#ch0000000?line=16'>17</a>\u001b[0m     \u001b[39mif\u001b[39;00m \u001b[39mtype\u001b[39m(content) \u001b[39m==\u001b[39m \u001b[39mdict\u001b[39m \u001b[39mand\u001b[39;00m content[\u001b[39m'\u001b[39;49m\u001b[39mimg\u001b[39;49m\u001b[39m'\u001b[39;49m]:\n\u001b[1;32m     <a href='vscode-notebook-cell:/Users/1037729/Desktop/post-it-contents/dump.ipynb#ch0000000?line=17'>18</a>\u001b[0m         postit \u001b[39m=\u001b[39m {\n\u001b[1;32m     <a href='vscode-notebook-cell:/Users/1037729/Desktop/post-it-contents/dump.ipynb#ch0000000?line=18'>19</a>\u001b[0m             \u001b[39m'\u001b[39m\u001b[39mtitle\u001b[39m\u001b[39m'\u001b[39m: metadata[\u001b[39m'\u001b[39m\u001b[39mtitle\u001b[39m\u001b[39m'\u001b[39m],\n\u001b[1;32m     <a href='vscode-notebook-cell:/Users/1037729/Desktop/post-it-contents/dump.ipynb#ch0000000?line=19'>20</a>\u001b[0m             \u001b[39m'\u001b[39m\u001b[39mdescription\u001b[39m\u001b[39m'\u001b[39m: content[\u001b[39m'\u001b[39m\u001b[39malt\u001b[39m\u001b[39m'\u001b[39m],\n\u001b[1;32m     <a href='vscode-notebook-cell:/Users/1037729/Desktop/post-it-contents/dump.ipynb#ch0000000?line=20'>21</a>\u001b[0m             \u001b[39m'\u001b[39m\u001b[39mimg\u001b[39m\u001b[39m'\u001b[39m: content[\u001b[39m'\u001b[39m\u001b[39mimg\u001b[39m\u001b[39m'\u001b[39m]\n\u001b[1;32m     <a href='vscode-notebook-cell:/Users/1037729/Desktop/post-it-contents/dump.ipynb#ch0000000?line=21'>22</a>\u001b[0m         }\n\u001b[1;32m     <a href='vscode-notebook-cell:/Users/1037729/Desktop/post-it-contents/dump.ipynb#ch0000000?line=22'>23</a>\u001b[0m     \u001b[39melse\u001b[39;00m:\n",
      "\u001b[0;31mKeyError\u001b[0m: 'img'"
     ]
    }
   ],
   "source": [
    "import json\n",
    "import frontmatter\n",
    "import os\n",
    "\n",
    "import os\n",
    "\n",
    "# list all the folders\n",
    "folders = [ name for name in os.listdir() if os.path.isdir(os.path.join('', name)) and not name.startswith('.') and not name == 'miri-the-leader' ]\n",
    "\n",
    "contents = []\n",
    "\n",
    "for folder in folders:\n",
    "    with open(f'{folder}/contents.md', 'r') as f:\n",
    "        metadata, body = frontmatter.parse(f.read())\n",
    "        for content in metadata[\"contents\"]:\n",
    "            print(content)\n",
    "            if type(content) == dict and content['img']:\n",
    "                postit = {\n",
    "                    'title': metadata['title'],\n",
    "                    'description': content['alt'],\n",
    "                    'img': content['img']\n",
    "                }\n",
    "            else:\n",
    "                postit = {\n",
    "                    'title': metadata['title'],\n",
    "                    'description': content\n",
    "                }\n",
    "            contents.append(postit)\n",
    "\n",
    "with open('contents.json','w') as f:\n",
    "    f.write(json.dumps(contents))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6"
  },
  "kernelspec": {
   "display_name": "Python 3.8.2 64-bit",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
