lots of progress on feature css; diary entry now takes array of pieces of article as a list instead of the whole article as a string

small-nav
Mimi Momo 4 years ago
parent 44cffb918e
commit 2edceffae9

@ -2,161 +2,101 @@
<h1>playing FlightRising with spreadsheets </h1>
may 13, 2021<br>
#offtopic #spreadsheets #petsites <br>
<br>
My dragon breeding spreadsheet is really coming together, so I thought sharing it would be a fun break from AI. <br>
<br>
FlightRising is a petsite where you can breed and raise pet dragons. The dragons' appearances are determined by the breeds, genes, and colors of their parents, which have varying levels of dominance. So if you want a dragon that looks a certain way, you'll probably have to find the closest available matches and carefully breed them. There's a lot of factors to keep up with, so spreadsheets work better than keeping it all in my head. <br>
<br>
<h2>spreadsheets </h2><br>
<br>
There's sheets for an overview of breeding pairs, individual parents, each breeding project, and calculators and data. If you want the spreadsheet, too, you can download my template for <a href="/download/fr_projects.ods">Calc</a> or <a href="/download/fr_projects.xlsx">Excel</a>. I use <a href="https://www.libreoffice.org/discover/calc/">LibreOffice Calc</a> for the spreadsheets, but it should work the same as Excel. I'll go over how everything works, so you can modify it to suit your own projects. <br>
<br>
<h3>individual dragons </h3><br>
The Singles sheet has a row for each parent and a field for sex, breeding status, breed, breed's cooldown, date bred, nest ready, date ready to breed again, and a cooldown countdown. I'm not usually interested in this information by itself, but it's used by the Pairs sheet. <br>
<br>
<center><img src="/static/img/ent/fr_singles.png" alt="(image: screenshot from the Singles tab.)" width="500"></center> <br>
<br>
<center><img src="/static/img/ent/fr_singles.png" alt="(image: screenshot from the Singles tab.)" style="display:block;" width="500"></center> <br>
<h4>sex </h4><br>
The sex field is limited to ♂ or ♀ and can be selected using a dropdown menu. The content will color the cell blue or pink. <br>
<br>
I made the dropdown menu through Data Validity (Data > Validity...). <br>
<br>
<center><img src="/static/img/ent/FR_datavalidity.jpg" alt="(image: Validity>Criteria. Allow: Cell range. Source: $Calculator.$i$3.$I$4.)" width="500"></center> <br>
<br>
The possibilities are in a column in the Calculator sheet and set the criteria to allow that cell range as the source. The color is dictated by Conditional Formatting (Format > Conditional Formatting). <br>
<br>
<center><img src="/static/img/ent/fr_conditionalformatting.png" alt="(image: Managing Conditional Formatting. Condition 1: cell value is equal to '♀'. .)" width="500"></center> <br>
<br>
There's one condition for boys and one for girls. I set the condition to look for 'cell value is' 'equal to' then either "♂" or "♀" with the quotes. For Apply Style, I made a new style with a blue background for ♂ cells and a pink one for ♀s. <br>
<br>
<center><img src="/static/img/ent/fr_newstyle.png" alt="(image: Apply Style>New Style...>Background.)" width="500"></center> <br>
<br>
<h4>breeding status </h4><br>
Depending on the breed's cooldown and date of last breeding, the cell will say "Ready" or "Cooldown" in green or red. <br>
<br>
<center><img src="/static/img/ent/fr_status_formula.png" alt="(image: =IF(H2<=TODAY(),'Ready','Cooldown'))"></center> <br>
<br>
The formula is =IF(H2<=TODAY(),"Ready","Cooldown"). IF takes three parameters here: the condition (if the date ready is today or earlier), the text to display if the condition's true, and the text for false. The colors come from Conditional Formatting again. <br>
<br>
<h4>breed </h4><br>
The breed, like the sex, is a Data Validity-determined dropdown menu. The list of breeds is sourced from a column in Calculator. <br>
<br>
<center><img src="/static/img/ent/fr_breeds.png" alt="(image: The Calculator Sheet has a column for the Breed and a column for its Cooldown.)" width="500"></center> <br>
<br>
<h4>breed's cooldown </h4><br>
Each breed has a different cooldown duration. The field uses a formula to refer to the Breed field and search in Calculator for the corresponding cooldown information. The formula is =VLOOKUP($D2,$Calculator.$G$3:$H$18,2,0). Here, I take the breed, take it to the breed + cooldown columns in the Calculator sheet, and return with the data from the 2nd column in that group. <br>
<br>
<center><img src="/static/img/ent/fr_vlookup.png" alt="(image: =VLOOKUP($D2,$Calculator.$G$3:$H$18,2,0))"></center> <br>
<br>
<h4>date bred </h4><br>
Every time I breed a dragon, I type the date in its Date Bred field. If the dragon is unbred, I use its birthday instead. <br>
<br>
<h4>nest ready </h4><br>
This is a simple formula - the date bred + 6 days. It's 6 because 6 days is amount of time it takes for an egg to hatch. <br>
<br>
<center><img src="/static/img/ent/fr_nestready.png" alt="(image: =F2+6)"></center> <br>
<br>
<h4>date ready to breed again </h4>
This is another simple formula - the date bred + the cooldown. <br>
<br>
<center><img src="/static/img/ent/fr_dateready.png" alt="(image: =F2+E2)"></center> <br>
<br>
<h4>cooldown countdown </h4><br>
This one is relatively simple. It's just today minus the cooldown, but I added some steps to add " days" after the number. If there are 0 or less days, I opted for it to say nothing because the default "#N/A" is annoying to look at. The formula is =IF($H2-TODAY()>0,CONCAT($H2-TODAY()," days"),""). You can see IF's three parameters: (condition) there's more than 0 days until cooldown ends, (if true) return that number + " days", (if false), return nothing. CONCAT concatenates the two parameters it's given, so it finds the number of days and adds " days". That means it'll use the plural even for 1. I could use another IF to fix that, but I barely refer to this sheet myself anyways. <br>
<br>
<center><img src="/static/img/ent/fr_cooldown.png" alt="(image: =IF($H2-TODAY()>0,CONCAT($H2-TODAY(),' days'),''))"></center> <br>
<br>
<h3>dragon pairs </h3><br>
The Pairs sheet is the sheet I check every time a nest opens. At a glance, it tells me which pairs are ready and which ones will be soon. It also lets me check whether my goal is within range of the pair and which of their offspring most closely resembles my goal. The fields are Project, Male, Female, Status, Date Ready, Countdown, Colors, Genes, Best Son, and Best Daughter. <br>
<br>
<center><img src="/static/img/ent/fr_pairs.png" alt="(image: screenshot of the Pairs sheet)" width="500"></center> <br>
<br>
<h4>project</h4> <br>
I add the project, so I know my goal for the pair. It's helpful when prioritizing or sorting. <br>
<br>
<h4>male + female</h4> <br>
I add the dragon pair's names here. Data validity makes sure the name corresponds to a dragon from the Singles sheet. <br>
<br>
<center><img src="/static/img/ent/fr_dragonvalidity.png" alt="(image: Data Validity by cell range. Source: $Singles.$A:$Singles.$A.)" width="500"></center> <br>
<br>
<center><img src="/static/img/ent/fr_dragonvalidity.png" alt="(image: Data Validity by cell range. Source: $Singles.$A:$Singles.$A.)" width="500"></center><br>
<h4>status </h4> <br>
Both members of the pair must be ready before the pair is ready. =IF(AND((VLOOKUP($B2,$Singles.$A:$C,3,)="Ready"),(VLOOKUP(C2,$Singles.A:C,3,)="Ready")),"Ready","Cooldown"). There's a new function AND, which just takes its parameters and considers them together. All together, the formula wants to take each name in the pair, hunt down that dragon's row in the Singles sheet, and check its status. I use AND so that the condition won't be true unless both dragons are ready. <br>
<br>
<center><img src="/static/img/ent/fr_status.png" alt="(image: =IF(AND((VLOOKUP($B2,$Singles.$A:$C,3,)='Ready'),(VLOOKUP(C2,$Singles.A:C,3,)='Ready')),'Ready','Cooldown'))"></center> <br>
<br>
<h4>date ready </h4><br>
I find the date for when the pair is ready with =MAX(VLOOKUP($B2,$Singles.$A:$H,8,),VLOOKUP($C2,$Singles.$A:$H,8,)). MAX takes its parameters and returns the larger value. Basically, it wants to use each dragon's name to check when their cooldown will be ready on the Singles sheet. I use MAX because the pair isn't ready until the parent with the longest cooldown is ready. <br>
<br>
<center><img src="/static/img/ent/fr_ready.png" alt="(image: =MAX(VLOOKUP($B3,$Singles.$A:$H,8,),VLOOKUP($C3,$Singles.$A:$H,8,)))"></center> <br>
<br>
<h4>countdown </h4><br>
The formula =IF($E2-TODAY()>0,CONCAT($E2-TODAY(), " days"),"") is similar to the one from Singles, but this time, I used Conditional Formatting to make countdowns of 1-5 days an eye-catching yellow. <br>
<br>
<center><img src="/static/img/ent/fr_countdown.png" alt="(image: =IF($E2-TODAY()>0,CONCAT($E2-TODAY(), ' days'),''))"></center> <br>
<br>
<h4>colors + genes</h4> <br>
I can't always find parents that are in range of my goal, so noting the range helps me prioritize. PST stands for Primary, Secondary, and Tertiary, since each dragon's appearance is determined by three colors and three genes. <br>
<br>
<center><img src="/static/img/ent/fr_genetics.png" alt="(image: a screenshot from FlightRising of a dragon's genetics.)"></center> <br>
<br>
I really only track cash shop genes, since they can only be obtained through breeding or real world money. If I want an in-game cash gene, it's a lot easier to earn money than to gamble with RNG. <br>
<br>
<h4>best son + best daughter</h4> <br>
Space is limited, so I want to know which dragons contribute the most to their projects. It can take several generations of dragons to get the desired offspring, so I want to make sure I'm narrowing the color and gene range with each generation. <br>
<br>
<h3>calculator + data </h3><br>
The Calculator sheet is a catch-all for data and extra formulas. I have everything needed for Data Validity on other sheets here, and I keep calculators to help know what to write on other sheets. <br>
<br>
<center><img src="/static/img/ent/fr_calculator.png" alt="(image: screenshot of the Calculator sheet.)" width="500"></center> <br>
<br>
<h4>colors </h4><br>
FlightRising's dragon colors exist in a color wheel. If one dragon has a Cream primary color and mates with an Antique dragon, the offspring can have a primary in Cream, Antique, or White. Since the colors were arbitrarily chosen by the developers, you won't know what to expect without referring to a color chart. The one below was made by <a href="https://flightrising.com/main.php?p=lair&tab=userpage&id=66886">Rauxel</a> and also contains the original, much smaller color range. <br>
<br>
<center><img src="/static/img/ent/fr_colorwheel.png" alt="(image: the color wheel by Rauxel.)" width="500"></center> <br>
<br>
When going for a particular color, the parents should be as close to that color as possible. I could manually count the colors in-between, but that's unreasonable when there's almost 200 colors. Instead, I have all the colors in a column and a little calculator to tell me how far over or under the parent's colors are. I enter primary, secondary, and tertiary colors of the goal dragon and dream dragon. The distance's magnitude and direction from the goal are calculated automatically. <br>
<br>
The formula for magnitude is =ABS(MATCH($C3,$F$2:$F$178, )-MATCH($B3,$F$2:$F$178, )). MATCH takes the color and returns the position within the color chart. ABS gives the absolute value of its parameter. In other words, I subtract the parent's colors from the goal's colors and get the absolute value. <br>
<br>
<center><img src="/static/img/ent/fr_magnitude.png" alt="(image: =ABS(MATCH($C3,$F$2:$F$178, )-MATCH($B3,$F$2:$F$178, )))" width="500"></center> <br>
<br>
The formula for direction is =IF((MATCH($C3,$F$2:$F$178,)-MATCH($B3,$F$2:$F$178,))>0,"↓","↑"). Here, it displays ↓ if the parent's colors are below the goal's, and ↑ if otherwise. <br>
<br>
<center><img src="/static/img/ent/fr_direction.png" alt="(image: =IF((MATCH($C3,$F$2:$F$178,)-MATCH($B3,$F$2:$F$178,))>0,'↓','↑'))"></center> <br>
<br>
The calculator ignores the fact that the color chart is a circle. Honestly, I don't breed along the extremes (white and pink), so I haven't fixed this yet. If you need to, you can find the distance between the parent color and the distance the nearest extreme (either Maize or Pearl), the distance between that extreme and the goal color, then add them together. If you're not sure which extreme is nearer, complete the process for both then take the smaller number - that's what the final formula's going to do anyways. <br>
<br>
<h4>breeding info</h4> <br>
These are the columns used by the breeding pages for validity and VLOOKUP. <br>
<br>
<h4>breeding day calculator</h4> <br>
If I need to know how long ago a dragon was bred, I can use today's date and the cooldown to find it out. The formula is very simple, just the given date minus the cooldown. <br>
<br>
<h3>project sheets </h3><br>
Here I list the dragons by project, tracking their genealogy, sex, colors, genes, and average distance from goal colors. <br>
<br>
<center><img src="/static/img/ent/fr_project.png" alt="(image: screenshot of the Boyfriend project sheet)" width="500"></center> <br>
<br>
<br>
<h4>father + mother </h4><br>
Dragons cannot breed with relatives within 5 generations. To ensure I'm keeping bloodlines separate, I plan a family tree separately from my spreadsheets. Using the father and mother's names, I can remember which family the dragon's in or if it's related to the other dragons at all. <br>
<br>
<h4>sex </h4><br>
Male or female, with colored conditional formatting so I can scan by sex more easily. <br>
<br>
<h4>primary, secondary, + tertiary colors </h4><br>
I usually need to use the color calculator on Calculators for this information. I list the parent's distance from the goal color in each field. In the first row, I list my goal colors for reference. <br>
<br>
<h4>gene 1, 2, + 3 </h4><br>
If the parent has one of the goal genes, I list it here. That way, I can prioritize by gene. I keep the other fields empty. For expensive genes, I only allow parents with genes of equal rarity, so the chance of passing down the goal gene is always 50/50. If my goal is a gene I can just buy, I don't care to track it since buying is easier than breeding. <br>
<br>
<h4>average </h4><br>
Genes are 50/50, but my goal colors are usually around a 1/20 chance. Consequently, I'm much more concerned about the color of a dragon than his genes. To give me a general evaluation of how close a dragon is to the goal colors, I use =AVERAGE(E3,G3,I3). The AVERAGE function adds its parameters and divides by the quantity of parameters given. If I had a parent with perfect colors, it would have an average of 0, so ideally, dragons with the lowest average are my most valuable for breeding. Genes usually factor in as well. <br>
<br>
<h2>that's all~ </h2>
In closing, I'll share a few of my cutest dragons (all of which are obviously using official FlightRising assets). Next time, hopefully I'll have more interesting things to write about for Blessfrey, so see you then! <br>
<br>
<center><img src="/static/img/ent/fr_sand.png" alt="(image: Sand, a male Sand Giraffe / Shadow Toxin / Rose Smoke Fae)" width="200"><img src="/static/img/ent/fr_abbey.png" alt="(image: Abbey, a male Platinum Skink / Smoke Peregrine / Pearl Basic Tundra)" width="200"><img src="/static/img/ent/fr_rune.png" alt="(image: Rune, a male Eldritch Sphinxmoth / Eldritch Hawkmoth / Eldritch Runes Veilspun with eternal youth and dark sclera)" width="200"><img src="/static/img/ent/fr_laguna.png" alt="(image: Laguna, a female Honeydew Cherub / Sanddollar Butterfly / Marigold Firefly Skydancer.)" width="200"></center>
<center><img src="/static/img/ent/fr_dragons.png" alt="(image: Sand (male Sand Giraffe / Shadow Toxin / Rose Smoke Fae), Abbey (male Platinum Skink / Smoke Peregrine / Pearl Basic Tundra), Rune (male Eldritch Sphinxmoth / Eldritch Hawkmoth / Eldritch Runes Veilspun with eternal youth and dark sclera), Laguna (female Honeydew Cherub / Sanddollar Butterfly / Marigold Firefly Skydancer.)" width="500"></center>
<br>
Last updated May 13, 2021 <br>
<br>

@ -163,6 +163,29 @@ def retrieve_article(page, loc):
string += line
return string
def retrieve_diary_entry_content(page,loc):
text = []
string = ""
with open(loc + str(page)) as f:
lines = f.readlines()
for line in lines:
if lines.index(line) >= 5:
string += line
return string
def prepare_diary_entry(page, loc):
result = []
with open(loc + str(page)) as f:
text = []
text = article2list(str(page), loc)
result.append(find_title(text))
result.append(retrieve_diary_entry_content(page, loc))
result.append(find_timestamp(text))
result.append(find_url(loc + str(page)))
result.append(find_social_title(text))
result.append(find_tags(text))
return result
# Return list of snippets using list of articles
def list_snippets(articles):
loc = 'diary/entries/'
@ -371,7 +394,7 @@ def entry(page):
if not is_it_time(page):
return error404(404)
loc = 'diary/entries/'
info = {'css': 'feature', 'title': 'blessfrey - developer diary', 'year': find_year(), 'entry': retrieve_article(page, loc), 'recommends': list_rec(page), 'articles': "Articles", 'latest': list_headlines(gather_and_sort(loc)[0:5]), 'page': page}
info = {'css': 'feature', 'title': 'blessfrey - developer diary', 'year': find_year(), 'entry': prepare_diary_entry(page, loc), 'recommends': list_rec(page), 'articles': "Articles", 'latest': list_headlines(gather_and_sort(loc)[0:5]), 'page': page}
abs_app_dir_path = os.path.dirname(os.path.realpath(__file__))
abs_views_path = os.path.join(abs_app_dir_path, 'views')
TEMPLATE_PATH.insert(0, abs_views_path )
@ -402,7 +425,6 @@ def credits():
info = {'css': 'contact', 'title': 'blessfrey - credits', 'year': find_year()}
return template('credits.tpl', info)
# Contact Page - Contact Template
@route('/contact')
def contact():

@ -109,13 +109,86 @@ ul,ol { list-style-position: inside; }
.diary-entry {
grid-area: 3 / 2 / 4 / 3;
background-color: #C9C2D6;
color: #080410;
padding: 20px;
margin-top: 40px;
margin-bottom: 30px;
word-wrap: break-word;
}
.diary-title {
background-color: #486438;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
color: #e6e8ef;
padding: 10px;
font-size: 20px;
text-align: center;
font-weight: bold;
text-shadow:
-1px -1px 1px #324832,
0 -1px 1px #324832,
2px -1px 1px #324832,
2px 0 1px #324832,
2px 2px 1px #324832,
0 2px 1px #324832,
-1px 2px 1px #324832,
-1px 0 1px #324832;
}
.date-line {
padding: 10px;
background-color: #1c2628;
color: #aaa39d;
text-align: center;
}
.diary-content {
background-color: #ecd5d2;
color: #080410;
text-indent: 50px;
padding: 15px;
padding-top: 25px;
}
.diary-content img {
display: block;
margin-top: 25px;
margin-bottom: 0px;
margin-left: 0px;
}
.diary-content h2 {
margin-top: 25px;
margin-bottom: 15px;
text-indent: 0px;
}
.diary-content h3 {
margin-top: 25px;
margin-bottom: 0px;
text-indent: 0px;
}
.diary-content h4 {
margin-top: 25px;
margin-bottom: 0px;
text-indent: 0px;
}
.diary-tags {
background-color: #1c2628;
padding: 10px;
font-size: 15px;
}
.diary-tag {
background-color: #b9b4af;
border-radius: 25px;
padding: 3px;
padding-left: 4px;
padding-right: 4px;
color: #1c2628;
font-size: 15px;
font-weight: bold;
display: inline-block;
}
.share-links {
background-color: #1c2628;
color: #aaa39d;
padding-top: 25px;
padding-bottom: 25px;
text-align: center;
}
.sidebar {
grid-area: 3 / 3 / 5 / 4;
@ -197,13 +270,40 @@ ul,ol { list-style-position: inside; }
grid-row-gap: 0px;
padding: 5px;
}
.more { grid-area: 1 / 1 / 2 / 4; }
.more {
grid-area: 1 / 1 / 2 / 4;
background-color: #486438;
border-radius: 25px;
padding: 5px;
text-align: center;
color: #080410;
}
.rec-box { grid-area: 2 / 2 / 3 / 3; }
.snip {
width: 100px;
width: 150px;
float: left;
margin: 50px;
margin: 30px;
background-color: #95939f;
border-radius: 25px;
padding: 20px;
text-align: center;
font-size: 16px;
}
.snip a {
color: #080410;
}
.snip a:hover {
color: #404664;
}
.snip a:visited {
color: #080410;
}
.snip a:active {
color: #404664;
}
.footer-row {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

@ -9,7 +9,7 @@
<item>
<title>playing FlightRising with spreadsheets </title>
<link>https://www.blessfrey.me/diary/entries/210513</link>
<description>My dragon breeding spreadsheet is really coming together, so I thought sharing it would be a fun ... </description>
<description>FlightRising is a petsite where you can breed and raise pet dragons. The dragons' appearances are ... </description>
<pubDate>Thu, 13 May 2021 05:00:05 GMT</pubDate>
<guid>https://www.blessfrey.me/diary/entries/210513</guid>
</item>

@ -2,7 +2,30 @@
<!--left column-->
<div class="diary-entry">
{{!entry}}
<div class="diary-title">
{{!entry[0]}}
</div>
<div class="date-line">
chimchooree ❤ {{!entry[2]}}
</div>
<div class="diary-content">
{{!entry[1]}}
</div>
<div class="diary-tags">
% if len(entry[5]) >= 1:
<div class=diary-tags>
% for t in entry[5]:
<div class="diary-tag">
{{t}}
</div>
% end
</div>
% end
</div>
<hr>
<div class="share-links">
twitter, facebook, fediverse, whatever
</div>
<br>
</div>

Loading…
Cancel
Save