<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Einar Guðni Guðjónsson</title>
    <description>The latest articles on DEV Community by Einar Guðni Guðjónsson (@einargudnig).</description>
    <link>https://dev.to/einargudnig</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F325736%2F9dca6f74-1437-44c4-b0ff-d55f338d6f09.jpeg</url>
      <title>DEV Community: Einar Guðni Guðjónsson</title>
      <link>https://dev.to/einargudnig</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/einargudnig"/>
    <language>en</language>
    <item>
      <title>Using Obsidian as a task manager and a personal knowledge database</title>
      <dc:creator>Einar Guðni Guðjónsson</dc:creator>
      <pubDate>Sun, 29 Jan 2023 13:10:06 +0000</pubDate>
      <link>https://dev.to/einargudnig/using-obsidian-as-a-task-manager-and-a-personal-knowledge-database-79c</link>
      <guid>https://dev.to/einargudnig/using-obsidian-as-a-task-manager-and-a-personal-knowledge-database-79c</guid>
      <description>&lt;p&gt;&lt;a href="https://www.einargudni.com/blog/obsidian/obsidian-v2" rel="noopener noreferrer"&gt;Read on my website&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Old Vault
&lt;/h2&gt;

&lt;p&gt;Remember I wrote these two posts about Obsidian? One was about Obsidian, and the other was about my Vault and how I use Obsidian.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.einargudni.com/blog/obsidian/obsidian-pt1" rel="noopener noreferrer"&gt;First post&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.einargudni.com/blog/obsidian/obsidian-pt2" rel="noopener noreferrer"&gt;Second post&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I still use Obsidian, and I've only come to like it even more than I did.&lt;/p&gt;

&lt;p&gt;I started a new vault because I felt I was experiencing some problems with mine. These problems were not significant,&lt;br&gt;
but they held me back from genuinely using Obsidian to my advantage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijp6yj54x9ideak41bzo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijp6yj54x9ideak41bzo.png" alt="graph"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why I wanted to start over&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My old Vault was great; I had a lot of content, but I recognized two things I felt I could do better.&lt;br&gt;
Firstly, I had massively gotten stuck in the &lt;a href="https://zettelkasten.de/posts/collectors-fallacy/" rel="noopener noreferrer"&gt;collectors fallacy&lt;/a&gt;.&lt;br&gt;
And I tried to adopt a structure from someone else but needed to understand that system better.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What could I do better&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Number one and two for me were to restart and build up a system I knew would suit myself and my daily life.&lt;br&gt;
This structure I started with could have been better, just that there are better ways to learn how to use other systems.&lt;br&gt;
It's better to start with the bare basics and gradually add what I want to add.&lt;/p&gt;

&lt;p&gt;Remember Gall's law:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;All complex systems that work evolved from simpler systems that worked. [And conversely...]&lt;br&gt;
A complex system designed from scratch never works and needs to be patched up to make it work.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I started with a complex system and never used it to my advantage. That is part of why I got stuck in the collector's fallacy.&lt;/p&gt;

&lt;h2&gt;
  
  
  New Vault
&lt;/h2&gt;

&lt;p&gt;I have my glass of red wine, and I'm ready to tell you more about my new Vault. I say a new vault, but it's not new.&lt;br&gt;
I have been using it for 457 days.&lt;/p&gt;

&lt;p&gt;Here is a table of content for you to navigate the post if you want.&lt;/p&gt;



&lt;p&gt;I started a new vault with no community plugins, just the built-in ones.&lt;br&gt;
Slowly I figured out what plugins I might want to use and added them by need.&lt;br&gt;
Below, I will list the plugins I use when discussing the use cases connected to them.&lt;/p&gt;

&lt;p&gt;My Vault is mainly a task manager and a personal knowledge database.&lt;br&gt;
I'm slowly improving and adding functionality to my Vault. For example, this summer, I added a people folder to help me remember people's names and professions (I'm not good with names) and connect to others.&lt;/p&gt;

&lt;p&gt;It's exciting to follow the Obsidian community and see how people use their vaults.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This Vault aims to help me connect my knowledge and improve it.&lt;br&gt;
I want to build systems that help me play long-term games. This system allows me to do daily tasks and minimizes the mental load of always trying to remember everything.&lt;br&gt;
There are only so many things we can keep in our minds at any moment.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Systems
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgkjt6awcgsl6cgv18yil.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgkjt6awcgsl6cgv18yil.png" alt="system"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the homepage of my system!&lt;br&gt;
A summary of it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;top left corner: graph of my Vault&lt;/li&gt;
&lt;li&gt;bottom left: folders for my notes and search.

&lt;ul&gt;
&lt;li&gt;the notes under the folders are notes that I recently added&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;top right: calendar&lt;/li&gt;

&lt;li&gt;middle right: local graph(for the open note) OR backlinks for open Note&lt;/li&gt;

&lt;li&gt;bottom right: a pinned note containing different callouts&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Below are the various parts of the system I've implemented in my Vault.&lt;/p&gt;

&lt;p&gt;Note that I use templates for a lot of this. This is because, in Obsidian, you can leverage templates to do so much dirty work.&lt;br&gt;
Here you can read more about &lt;a href="https://help.obsidian.md/Plugins/Templates" rel="noopener noreferrer"&gt;Obsidian templates&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Daily notes
&lt;/h3&gt;

&lt;p&gt;I use my daily notes a lot!&lt;br&gt;
One of the first things I did in my new Vault was to set up a template for my daily notes.&lt;/p&gt;

&lt;p&gt;My daily note is my funnel to my knowledge database.&lt;br&gt;
I capture almost everything in my daily note. From the daily note, the content will either end up in the slip-box (more on that later), the reference folder, or I will not 'archive it'.&lt;/p&gt;

&lt;p&gt;I use raycast on my MacBook pro as a launcher, and some genius made an Obsidian daily note shortcut.&lt;br&gt;
It's super easy to press Command + Option + T, and my daily notes open.&lt;/p&gt;

&lt;p&gt;Obsidian has a mobile app, which is perfect for quick capture when you have made some upgrades to it. I sync my Vault to my iCloud (there are more ways to sync your Vault.), so I have the same Vault in my iPhone as in my MacBook.&lt;br&gt;
I used the button plugin to add a custom button to my daily note.&lt;/p&gt;

&lt;p&gt;These two methods of quick capture have lowered the "barrier of entry" for me to dump everything into my Vault.&lt;br&gt;
Since implementing this, I have spent more time adding content to my slip-box and making new connections.&lt;/p&gt;

&lt;p&gt;Everything that goes to my daily notes could end in my Vault! Not all of it does. I use the daily notes to think, so sometimes. It's just some nonsense about my current work project.&lt;br&gt;
I added a tag to the things I would like to keep on the daily note. For example, I use the #collection tag to collect stuff.&lt;br&gt;
I'll describe how I use this tag in the weekly notes section below.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://help.obsidian.md/Plugins/Daily+notes" rel="noopener noreferrer"&gt;Daily notes plugin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is a screenshot of my daily note for today.&lt;br&gt;
As you can see, I don't have anything under the &lt;strong&gt;Ideas:&lt;/strong&gt;, which means I haven't captured anything for today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plugins &amp;amp; template:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://help.obsidian.md/Plugins/Daily+notes" rel="noopener noreferrer"&gt;Templater&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Template (daily note)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blacksmithgu.github.io/obsidian-dataview/" rel="noopener noreferrer"&gt;dataview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/shabegom/buttons" rel="noopener noreferrer"&gt;button (mobile)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://quickadd.obsidian.guide/docs/" rel="noopener noreferrer"&gt;quick add (mobile)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Weekly notes
&lt;/h3&gt;

&lt;p&gt;In my weekly notes, I add all of my tasks. These are the tasks I want to complete this week.&lt;br&gt;
Most often, these are long-term-minded tasks that I try to do on most weeks (training, mobility, reading, etc.) combined with more ad-hoc style tasks that I add (pick up this, order haircut, clean apartment, etc.).&lt;/p&gt;

&lt;p&gt;I recently added more personal tasks to the bottom of my weekly note. I dearly want to complete these tasks sometime during the week, but to be honest, I've not been good enough at following through with some of them.&lt;/p&gt;

&lt;p&gt;Regarding my #collection tag earlier, I've created a user-friendly system at the bottom of my weekly note.&lt;br&gt;
I use the data view plugin to show every note in the last seven days, which includes the #collection tag.&lt;br&gt;
Before I added this, it happened too often that I needed to remember that I had tagged things in my daily note.&lt;/p&gt;

&lt;p&gt;Toward the end of every week, I review these daily notes to add content to my Vault.&lt;br&gt;
This data view query is helpful and lets me easily see what I've tagged in the last seven days.&lt;/p&gt;

&lt;p&gt;The screenshots below are from two different weekly notes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnc23qysavxqj0qx0itwa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnc23qysavxqj0qx0itwa.png" alt="tasks"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2For57e89hlczl54a79df5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2For57e89hlczl54a79df5.png" alt="weeklynote"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see on these screenshots that my weekly notes contain a lot of tasks,&lt;br&gt;
I will go into more detail regarding my tasks below.&lt;/p&gt;

&lt;p&gt;In the second image, you can see how I handle the #collection tag, as I mentioned earlier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plugin &amp;amp; template:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/global-filter/" rel="noopener noreferrer"&gt;tasks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blacksmithgu.github.io/obsidian-dataview/" rel="noopener noreferrer"&gt;dataview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;template (weekly note)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/shabegom/buttons" rel="noopener noreferrer"&gt;button (mobile)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Monthly notes
&lt;/h3&gt;

&lt;p&gt;You can see how I structure my Vault. I have a monthly note where I link to the weeks of this month.&lt;br&gt;
I also count how often I finish the personal tasks I set for each week. It's easier, to be honest, when I see that I only complete them once or twice a month.&lt;br&gt;
Below that, I have five short review questions in the monthly note. These are short answer questions that help me reflect on my month. It's easy to forget what one accomplishes, even the small wins.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgc02qmz5wqz33shx3ay.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgc02qmz5wqz33shx3ay.png" alt="month"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plugin &amp;amp; template:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/global-filter/" rel="noopener noreferrer"&gt;tasks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;template (monthly note)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tasks
&lt;/h3&gt;

&lt;p&gt;As of writing this, I have 6990 tasks in my vault.&lt;/p&gt;

&lt;p&gt;I use the tasks plugin to make tasks in my weekly notes.&lt;/p&gt;

&lt;p&gt;As mentioned above, I use data view to show tasks in my daily notes.&lt;br&gt;
This is how tasks are shown in my daily notes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftij1ya6dicmn58ye8y06.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftij1ya6dicmn58ye8y06.png" alt="daily"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have these simple data view queries to only show the tasks with critical due dates.&lt;/p&gt;

&lt;p&gt;I've added a keyboard shortcut for both making tasks and completing them.&lt;br&gt;
Here you can see what the tasks plugin looks like when adding a task.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8rcl6jrc82f5kkxl0mx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8rcl6jrc82f5kkxl0mx.png" alt="tasks2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These shortcuts are CMD + SHIFT + ENTER to make a new task and CMD + CONTROL + ENTER to complete a task.&lt;/p&gt;

&lt;p&gt;I could use the task plugin more specifically, but I like to keep things simple.&lt;br&gt;
I could do recurring tasks, for example, but adding every task manually to my Vault makes me feel more in control.&lt;br&gt;
I use my weekly notes as much as my daily ones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plugin &amp;amp; template:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/global-filter/" rel="noopener noreferrer"&gt;tasks&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Projects
&lt;/h3&gt;

&lt;p&gt;I recently started using this plugin for my more significant projects.&lt;br&gt;
Having a space where I can have a good overview of my tasks is nice.&lt;br&gt;
Each task gets a note dedicated to where I can store information and wanderings regarding said task.&lt;br&gt;
I scribble down almost everything I'm wandering and thinking regarding these tasks. It has helped me get up to speed quickly when I continue with a task after I've changed my focus.&lt;/p&gt;

&lt;p&gt;I made a projects template that the Projects plugin &lt;strong&gt;always&lt;/strong&gt; uses when I make new notes in the project folder,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8dmxh7wbothfh0q9kxxj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8dmxh7wbothfh0q9kxxj.png" alt="projects"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I will do a project about my blog and my side projects. I have many notes in my Vault regarding this, and this Project plugin helps me have a better overview.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plugin &amp;amp; template:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/marcusolsson/obsidian-projects" rel="noopener noreferrer"&gt;projects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;template (project)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Spaced-repetition
&lt;/h3&gt;

&lt;p&gt;I read &lt;a href="http://augmentingcognition.com/ltm.html" rel="noopener noreferrer"&gt;this article&lt;/a&gt; a while back, and I think I installed Anki not even 5 minutes later.&lt;br&gt;
This is one of the biggest things I'm trying to keep improving on daily bases. How would've thought that continuously reviewing things again and again would help you get better at them?🫢&lt;/p&gt;

&lt;p&gt;I mostly use spaced repetition for general concepts and other things that help me, like keyboard shortcuts (lol)&lt;/p&gt;

&lt;p&gt;I use Anki and the Obisidan to Anki plugin to sync my notes to Anki.&lt;/p&gt;

&lt;p&gt;I set up an anki hub note that connects all of my notes for each anki deck. I can leverage the Anki software for spaced repetition. I like this setup a lot since it allows me to add to my anki decks straight from my Vault.&lt;/p&gt;

&lt;p&gt;My main decks are about React, JavaScript, and TypeScript. 🤓&lt;/p&gt;

&lt;p&gt;I could improve my usage of Anki with Obsidian, but I've at least started. This is one part of my system that I want to use more.&lt;/p&gt;

&lt;p&gt;The article I mentioned above is super good. Even though it's long, I can't recommend it enough!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plugin &amp;amp; template:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/Pseudonium/Obsidian_to_Anki/wiki" rel="noopener noreferrer"&gt;Obsidian to Anki&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Time blocking
&lt;/h3&gt;

&lt;p&gt;I think this concept originates from Cal Newport's book Deep Work.&lt;br&gt;
Here are articles about this concept&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://todoist.com/productivity-methods/time-blocking" rel="noopener noreferrer"&gt;Time blocking&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.rescuetime.com/time-blocking-101/" rel="noopener noreferrer"&gt;more about time blocking&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;there are plenty more articles about this concept.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I use cron as a calendar, and the full calendar plugin gives me access to a calendar in my Obsidian Vault.&lt;/p&gt;

&lt;p&gt;What I like about Cron, and I like it a lot, is the ease of using keyboard shortcuts. It helps me quickly block my time -&amp;gt; Less friction, more likely to do it.&lt;/p&gt;

&lt;p&gt;I've connected and imported events from my personal Gmail and my work calendar to Cron, so now I have them all in the same place. It's accessible in the full calendar plugin in Obsidian, though I use the Cron app more, especially since they launched the iOS app.&lt;/p&gt;

&lt;p&gt;Here is a screenshot of my Cron calendar from this week, so you know how my time blocking is.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F16hbsyrbru94rf00avnv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F16hbsyrbru94rf00avnv.png" alt="cron"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My time blocks are rather general. I have more details about those tasks in Asana (work tasks) and my weekly note.&lt;br&gt;
I try to block time for the general "theme" of that time, which could be a project or more shallow work like emails.&lt;/p&gt;

&lt;p&gt;As you can see in this screenshot, I'm working on a big task for work. We are refactoring our react-router to integrate the version 6.4 changes.&lt;br&gt;
That takes some time, but it's a fun and challenging task.&lt;br&gt;
I'm also working as a contractor for gigOver. This week, I spent some time early in the mornings to work on their project, and last but not least, I do Crossfit.&lt;/p&gt;

&lt;p&gt;I might have a couple of invites to Cron, so if you want to try it, you can send me an email or DM on my socials.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plugin &amp;amp; template:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://davish.github.io/obsidian-full-calendar/" rel="noopener noreferrer"&gt;Full calendar&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Shut down ritual
&lt;/h3&gt;

&lt;p&gt;Here are some articles regarding shutdown rituals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.calnewport.com/blog/2009/06/08/drastically-reduce-stress-with-a-work-shutdown-ritual/" rel="noopener noreferrer"&gt;Cal newport&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://timelyapp.com/blog/workday-shutdown-ritual" rel="noopener noreferrer"&gt;Timely&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the end of every work day, I take a quick tour and go over to see if I missed some of this.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finish tasks in Asana that I finished this day&lt;/li&gt;
&lt;li&gt;Archive emails on Front that I can archive&lt;/li&gt;
&lt;li&gt;Commit any updates to GitHub I have uncommitted&lt;/li&gt;
&lt;li&gt;Finish tasks in Obsidian that I've finished.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course, I sometimes forget this, but most days I remember, and It feels good to "close" these things off for the day.&lt;br&gt;
Maybe it's only the placebo, but I feel like I can start the day without the need to 'de-clutter.'&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plugin &amp;amp; template:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This is on my daily note template.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  slip-box
&lt;/h3&gt;

&lt;p&gt;I put all the notes that I want to 'own' into the slip-box&lt;/p&gt;

&lt;p&gt;I got the slip-box 'concept' from the book 'How to take smart notes.'&lt;br&gt;
I'm not going into many details here because there is no correct way to do this. I like how I structure my slip-box, but there are better ways to do it.&lt;br&gt;
The topic notes work like an entry point to a particular topic. Here below is a list of my current topic notes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 systems&lt;/li&gt;
&lt;li&gt;2 technology&lt;/li&gt;
&lt;li&gt;3 productivity&lt;/li&gt;
&lt;li&gt;4 psychology&lt;/li&gt;
&lt;li&gt;5 philosophy&lt;/li&gt;
&lt;li&gt;6 math&lt;/li&gt;
&lt;li&gt;7 physics&lt;/li&gt;
&lt;li&gt;8 biology&lt;/li&gt;
&lt;li&gt;9 chemistry&lt;/li&gt;
&lt;li&gt;10 ecenomics&lt;/li&gt;
&lt;li&gt;11 personal finances&lt;/li&gt;
&lt;li&gt;12 health&lt;/li&gt;
&lt;li&gt;13 hobbies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every note in the slip-box is prefixed with the number of the topic it belongs.&lt;/p&gt;

&lt;p&gt;In each topic note, I start to build on these prefixes. Which is nice but also a place I could improve.&lt;br&gt;
For example, the technology topic note has many links, and since I work as a software developer, I'm constantly adding new notes to this topic.&lt;br&gt;
This is the topic note for technology.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3btn1vctqns0u3002g58.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3btn1vctqns0u3002g58.png" alt="topic note"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The last note I added to my slip-box had this name: &lt;code&gt;2a2b9c1 - estate typescript&lt;/code&gt;. So I've branched a long way from the technology topic note with the prefix 2.&lt;br&gt;
This has pros and cons. I'm slowly building a model of my slip-box note, and I can see how it grows. But I'm also wondering if I can find notes. (Thank god for the search feature).&lt;br&gt;
To add, when I reference a note, I do this [[2a2b9c1 - useState typescript]], but there is a neat trick I can use. [[2a2b9c1 - useState typescript|useState typescript]] displays the string after the pipe instead of the full name of the note. It's nice to have the reference to other notes match the text.&lt;/p&gt;

&lt;p&gt;If you look at the graph at the top of this post, I suspect that the technology cluster is the densest "collection".&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;So, this was quite long 😬&lt;br&gt;
It may seem like I spend all my days in Obisidan, but that is not the reality.&lt;br&gt;
The more I use my system, the more prolific I become.&lt;br&gt;
Some days I add more. For others, I don't add anything. I don't want to add stuff that I don't need.&lt;/p&gt;

&lt;p&gt;If you are interested in using Obsidian, please start small. I slowly integrated and tried everything I use in my Vault before I added it to my workflow. I'm also conscious and willing to remove parts of my system if unnecessary.&lt;br&gt;
But note that this came on the back of my old Vault not working well with me, so I'm deliberately being patient with my system.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The ultimate goal of any productivity system is to have a place where you put tasks and reminders safely so they won't be forgotten and done in time.&lt;br&gt;
The core reason is that that's the best way to close off 'open loops,' which are nagging sense you forgot something or the random task that will pop up at night before bed.&lt;br&gt;
Those loops will constantly suck mental energy until you address them, and your brain will spend energy trying to remind you, often at the wrong time and space.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://shawnblanc.net/" rel="noopener noreferrer"&gt;Shawn Blanc&lt;/a&gt; noted that "there is no one-size fits all system for your tasks, time, and goals. A good system should include these elements:"&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allows you to clarify your priroities&lt;/li&gt;
&lt;li&gt;It's something you understand and enjoy using&lt;/li&gt;
&lt;li&gt;It allows you to focus on the &lt;em&gt;right&lt;/em&gt; things at the right time&lt;/li&gt;
&lt;li&gt;Efficiency: you're able to do more in less times (isntead of tkaing a long time to do very little)&lt;/li&gt;
&lt;li&gt;Anxiety and stress are reduced (not exasperated)&lt;/li&gt;
&lt;li&gt;You know if you hit the mark&lt;/li&gt;
&lt;li&gt;It's repeateable and sustainble.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep these points in mynd when you start building your system 🧐&lt;/p&gt;

&lt;p&gt;I hope you guys enjoyed this post and that it was helpful in some way.&lt;br&gt;
If you have any questions, don't hesitate to ask.&lt;/p&gt;

&lt;h3&gt;
  
  
  CheatSheet
&lt;/h3&gt;

&lt;p&gt;I have mentioned before that Obsidian uses markdown files. Which is great and means that I don't necessarily need Obsidian to write my notes. I can use any text editor and write my notes in markdown.&lt;br&gt;
Markdown is an easy language to learn, and I recommend you know it.&lt;br&gt;
My blog posts are also written in markdown.&lt;br&gt;
&lt;a href="https://einargudni.gumroad.com/l/obsidian-cheatsheet" rel="noopener noreferrer"&gt;Here is a free cheat sheet with markdown basics and Obsidian keyboard shortcuts.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>obsidian</category>
      <category>systems</category>
      <category>markdown</category>
      <category>beginners</category>
    </item>
    <item>
      <title>You should learn how to type fast!</title>
      <dc:creator>Einar Guðni Guðjónsson</dc:creator>
      <pubDate>Mon, 13 Jun 2022 15:41:18 +0000</pubDate>
      <link>https://dev.to/einargudnig/you-should-learn-how-to-type-fast-1585</link>
      <guid>https://dev.to/einargudnig/you-should-learn-how-to-type-fast-1585</guid>
      <description>&lt;h2&gt;
  
  
  How to type faster
&lt;/h2&gt;

&lt;h3&gt;
  
  
  High-Leverage Skill
&lt;/h3&gt;

&lt;p&gt;Writing fast is a high-leverage skill.&lt;/p&gt;

&lt;p&gt;To be able to be write sync with your thinking is super valuable. It will improve your output and help with your flow.&lt;/p&gt;

&lt;p&gt;Keyboard navigation is a big part of preserving said flow, moving your hands from the keyboard brakes the flow state.&lt;/p&gt;

&lt;p&gt;Here are couple of steps to help you hold on to that state of flow, along with the possibility of increasing your typing speed and efficiency.&lt;/p&gt;

&lt;h4&gt;
  
  
  Recognise where you are slow
&lt;/h4&gt;

&lt;p&gt;This is the most important one to think about. You can improve your typing speed, your efficiency or both.&lt;br&gt;
If you can type as fast as you think, but you are always braking the flow by using the mouse, you should focus on using keyboard shortcuts to help you.&lt;/p&gt;

&lt;p&gt;If you need to increase your speed and efficiency you can aim to get better at touch typing.&lt;/p&gt;

&lt;p&gt;I first recognized that touch typing is something that could definitely help me increase me speed and efficiency, couple that with increasing my use of keyboard shortcuts and I think that I can improve a lot.&lt;/p&gt;

&lt;h4&gt;
  
  
  Learn touch typing
&lt;/h4&gt;

&lt;p&gt;Being able to write without looking at the keyboard is great and helps you to be in the flow, as long as your efficiency doesn't hinder you. Touch typing can help you be a more efficient typer. My aim is to be able to continuously write at same time I think. I.e my typing does not lag, so that I can go into a great flow state.&lt;/p&gt;

&lt;p&gt;For me this will require practicing, since I’ve build a muscle memory for the way I type and I want to change that.&lt;/p&gt;

&lt;p&gt;I’ve been focusing on getting better at touch typing but it is difficult to let go of other habits.&lt;br&gt;
What I've struggled with the most is to use my pinky-fingers to type. The more I condition my pinky fingers the more efficient writer I become.&lt;/p&gt;

&lt;h5&gt;
  
  
  Should I learn touch typing?
&lt;/h5&gt;

&lt;p&gt;Here you can see a couple of links where this is discussed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.reddit.com/r/learnprogramming/comments/2ot2ik/is_it_worth_learning_touchtyping/"&gt;Is it worth it to learn touch typing&lt;/a&gt; (old post)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.thestar.com.my/tech/tech-news/2020/05/24/is-the-touch-typing-method-still-worth-mastering#:~:text=The%20easier%20it%20is%20for,or%20go%20to%20a%20class"&gt;Should I learn touch typing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/i-learned-to-touch-type-at-the-ripe-old-age-of-29-was-it-worth-it-112ef2150fec/"&gt;Is it too late to learn touch typing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here are some screenshots from my training.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---qqpKHDr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bzno299cu378m7aqzjsn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---qqpKHDr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bzno299cu378m7aqzjsn.png" alt="Typing statistics" width="880" height="432"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MW6mVdo9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v5m5ewxvopatkv9amuv8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MW6mVdo9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v5m5ewxvopatkv9amuv8.png" alt="Typing statistics" width="880" height="731"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--worRj6s_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lsur23dmpel4ufmyyw9e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--worRj6s_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lsur23dmpel4ufmyyw9e.png" alt="Typing statistics" width="880" height="224"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d3uouIUd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vkznyl1z5t0blok8a8h6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d3uouIUd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vkznyl1z5t0blok8a8h6.png" alt="Typing statistics" width="880" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are all in a chronological order.&lt;/p&gt;

&lt;p&gt;I've not been as consistent in practicing my typing, but I always get some practice in, so on these screenshots there are couple of months in between.&lt;/p&gt;

&lt;h4&gt;
  
  
  Keyboard shortcuts
&lt;/h4&gt;

&lt;p&gt;I can’t emphasize how important this is.&lt;/p&gt;

&lt;p&gt;Every time you move your hands away from the keyboard to your mouse it ´costs´ you time. Over time this cost compound and you spend a lot of time moving your hands between the keyboard and the mouse.&lt;/p&gt;

&lt;p&gt;By eliminating the need to move my fingers away from the keyboard I can continue my flow state of writing code and/or my blog posts and notes.&lt;/p&gt;

&lt;p&gt;Here are shortcuts I use on daily bases, these are for mac users but they are likely available for windows.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Option + ← / → ==&amp;gt; Move to next word&lt;/li&gt;
&lt;li&gt;Shift + ← / → ==&amp;gt; Highlight to the left and right by holding this keyboard shortcut&lt;/li&gt;
&lt;li&gt;Shift + option + ← / → ==&amp;gt; Highlight everything to the next word&lt;/li&gt;
&lt;li&gt;Command + ← / → ==&amp;gt; Go to beginning or end of current line&lt;/li&gt;
&lt;li&gt;Command + shift + ← / → ==&amp;gt; Highlight to beginning or end of line&lt;/li&gt;
&lt;li&gt;Option + backspace ==&amp;gt; Delete the everything to the end of current word&lt;/li&gt;
&lt;li&gt;Command + backspace ==&amp;gt; Delete everything from this line from the cursor.&lt;/li&gt;
&lt;li&gt;Command + tab ==&amp;gt; Switch between apps&lt;/li&gt;
&lt;li&gt;Command + Option + ← / → ==&amp;gt; Switch between tabs in chrome/vsCode&lt;/li&gt;
&lt;li&gt;Command + W ==&amp;gt; close tab in Chrome&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are a lot of keyboard shortcuts you can use in your daily life. You can find them here&lt;/p&gt;

&lt;p&gt;I write a lot of code in VS Code, I tried to use Zen Mode more (Command + K Z -&amp;gt; (esc esc to exit zen mode)) and it forces me to use keyboard shortcuts.&lt;/p&gt;

&lt;p&gt;Here are &lt;a href="https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf"&gt;macOS shortcuts for VS Code&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Typing games
&lt;/h4&gt;

&lt;p&gt;I used these typing games to improve my touch typing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.ratatype.com/"&gt;ratatype.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://apps.apple.com/us/app/typist/id415166115?mt=12"&gt;typist&lt;/a&gt; (mac only)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a great starting place to learn touch typing and they helped me to build the base I needed.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;I started to spend 10-20 minutes per day to learn touch-typing. Sometimes I spent few minutes but spaced it around my day.&lt;br&gt;
This is a deliberate practice. Which can be a painful way to get better, but a well known way to get good results.&lt;/p&gt;

&lt;p&gt;I feel that I've increase my speed and efficiency, but as with other skills you have to keep in refining them every day!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building my second brain with Obsidian pt. II</title>
      <dc:creator>Einar Guðni Guðjónsson</dc:creator>
      <pubDate>Sun, 08 Aug 2021 14:22:32 +0000</pubDate>
      <link>https://dev.to/einargudnig/building-my-second-brain-with-obsidian-pt-ii-365p</link>
      <guid>https://dev.to/einargudnig/building-my-second-brain-with-obsidian-pt-ii-365p</guid>
      <description>&lt;h2&gt;
  
  
  Obsidian
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Check out part I &lt;a href="https://dev.to/einargudnig/building-my-second-brain-with-obsidian-pt-i-4oc2"&gt;here&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I talked a little bit about the basics of Obsidian in the last post, and I encourage you to take a look at it &lt;a href="https://obsidian.md/features" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The main thing I want to talk about here is that you can connect notes like you want with [[links]], So you can connect notes as you want.&lt;/p&gt;

&lt;p&gt;Most of our note apps are mono-directional linked. That means you can link from note A to note B.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;A -&amp;gt; B&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Obsidian provides the ability to perform bi-directional linking through Backlinks.&lt;/p&gt;

&lt;p&gt;It does not only take you from A to B like most notes app, but it also recognizes that if A includes B, it means that B is a part of A. This is very good when the complexity increases.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Individual, unconnected notes are useless, so Obsidian focuses on connections and links between notes, &lt;strong&gt;mimicking the billions of neural connections in your brain&lt;/strong&gt; &amp;gt;&lt;/p&gt;

&lt;p&gt;- Hause Lin&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can also put #tags on your notes and then search all notes containing certain tags.&lt;/p&gt;

&lt;p&gt;You write markdown files in Obsidian.&lt;/p&gt;

&lt;h2&gt;
  
  
  Markdown
&lt;/h2&gt;

&lt;p&gt;This was one of the first things that stood out for me when researching Obsidian. I used to write LaTeX while I was finishing my Computer Science degree so I knew the good thing that comes with plain-text formatting syntax.&lt;/p&gt;

&lt;p&gt;If you get used to it it will improve your efficiency!&lt;/p&gt;

&lt;p&gt;Think about when you have to write something in &lt;strong&gt;bold&lt;/strong&gt; you have to select some pre-setup feature, but with markdown, you can easily just *bold* the text like this.&lt;/p&gt;

&lt;p&gt;By formatting text like this, you can be very efficient and quick to write stuff down.&lt;/p&gt;

&lt;h3&gt;
  
  
  Markdown benefits
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Minimalistic&lt;/strong&gt; - You will work in a simple and uncluttered workspace, with almost no extra buttons or stuff you have to pay attention to or use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flow&lt;/strong&gt; - When you don't have to constantly format your text by adding headings, bolding, or adding italics to text you can get to a good flow while writing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control&lt;/strong&gt; - You really can use markdown in whatever editor you like. You can write notes in Obsidian and open your markdown files in VS Code for example.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With all this we can maybe start to look at Obsidian, I will tell you that the learning curve can be quite steep in the beginning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Obsidian basics
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Vault
&lt;/h3&gt;

&lt;p&gt;You will have to create a Vault in the beginning. I would say that it is not bad to have two vaults, maybe one for testing things and another one for you to use. You could have separated vaults for work/school/personal life, but in my opinion, you should just have one for all of that.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkingyourthinking.com/" rel="noopener noreferrer"&gt;Nick Milo&lt;/a&gt; has been doing some interesting stuff, not only in the Obsidian community, but he has been working on Linking your Thinking, and he uses Obsidian quite a lot. I recommend his &lt;a href="https://www.youtube.com/channel/UC85D7ERwhke7wVqskV_DZUA/videos" rel="noopener noreferrer"&gt;Youtube channel&lt;/a&gt; for a lot of content, he also has a &lt;a href="https://forum.obsidian.md/t/linking-your-thinking-resources/6177" rel="noopener noreferrer"&gt;Obsidian vault&lt;/a&gt; you can download and play around with. But I recommend you spend some time working on your vault before using someone else's template.&lt;/p&gt;

&lt;p&gt;Since no one thing works for all of us and your vault will probably change over time, you should start by playing around and adding to your vault.&lt;br&gt;
I can tell you that I quickly saw that my system did not suit me well. So I changed it up and am always trying to improve it.&lt;/p&gt;

&lt;p&gt;Now I have MOCs (Map of Contents) as my main notes and I generate notes from that corresponding MOC.&lt;br&gt;
Here is a picture of my MOCs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fekvezxvuqrloj59r15to.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fekvezxvuqrloj59r15to.png" alt="Obsidian Map of Contents"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have updated this quite a lot, I have at some time had more MOCs, fewer MOCs, and everything in between. So this is kind of a dynamic in my vault.&lt;br&gt;
I do also have some 'smaller' MOCs under one of these main ones.&lt;/p&gt;

&lt;p&gt;My general layout and workflow are continuously improving.&lt;/p&gt;

&lt;p&gt;You can see those MOCs on the photo below. even though things look cluttered there is some kind of organization there!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwy5kdb1cqygpcnrgnzxh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwy5kdb1cqygpcnrgnzxh.png" alt="Obisidan Graph"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;My Vault&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;All of the notes that are single and not connected to anything in my graph view, will hopefully in some time connect to a MOC.&lt;br&gt;
They are not connected either because I'm not sure where to put them or I want to add more to that note.&lt;br&gt;
However, I can also filter by tags, see here below, and I'm quite sure that all of my notes have at least one tag, so even though they look like they are all alone they do fit close to one of these main MOCs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fewpchlyuio48de0ctq1b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fewpchlyuio48de0ctq1b.png" alt="Graph view with tags"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Filtered by tags&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;These notes that do not have any blue-ish note that stands for a tag are all from the Day planner plugin. You can see more about it later, I use it sometimes to plan my day and I feel like I don't need to include any tags there.&lt;/p&gt;

&lt;h3&gt;
  
  
  Notes
&lt;/h3&gt;

&lt;p&gt;One thing I like and have talked about is that I like the keyboard functionality of Obsidian, by adding keyboard shortcuts I can generate notes in no time.&lt;/p&gt;

&lt;p&gt;I've made some templates for different kinds of notes.&lt;br&gt;
These templates all have their specific &lt;a href="https://assemble.io/docs/YAML-front-matter.html" rel="noopener noreferrer"&gt;frontmatter&lt;/a&gt; to help me sort them correctly.&lt;/p&gt;

&lt;p&gt;Here are my current templates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Daily notes&lt;/strong&gt; I have a pre-made checklist for some tasks I want to do every day, but I also add extra checkboxes for things I want to accomplish any given day.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blog posts&lt;/strong&gt; I am aiming to continue to write more blog posts on this site, so I made a template that has the correct front matter. I use frontmatter for my website, here you can see this post frontmatter.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
title: 'Building my second brain with Obsidian pt. II'
date: '2021-07-05'
tags: ['PKM', 'growth']
draft: true
summary: 'How I use Obsidian'
---
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Frontmatter&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Source&lt;/strong&gt; This is a note containing content I find something and want to store something from it in my vault. This can be from any source, article, website, podcasts, whatever.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Note&lt;/strong&gt; This is just a general note, I use this when I'm not completely sure what I should group this as, I like to start with this and sometimes change it later.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Books&lt;/strong&gt; I recently started to write down notes from the books I read, so I made a template where I can fill in the author and much more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Projects&lt;/strong&gt; I almost constantly get good or not-so-good ideas about projects I could do. Even though I will not do anything with them I like to store them all in one place.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weekly Reviews&lt;/strong&gt; I try to write a short weekly summary at the end of every week. This is mainly to see how I've managed to do things I want to improve this week. Or just anything. I do not do this every week, but I've felt that this is very handy when I want to use it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have also added a keyboard shortcut to add templates. So I can get myself a note with one of these templates in no time!&lt;/p&gt;

&lt;h3&gt;
  
  
  Formatting
&lt;/h3&gt;

&lt;p&gt;Here I have added photos on some of the text formatting.&lt;br&gt;
On the left side, you will see the markdown code, and on the right side, you will see the note in preview mode.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwcujog21ibmv3hvryx2y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwcujog21ibmv3hvryx2y.png" alt="Text formatting 1"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0peey5vid0cdpr3rfb5t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0peey5vid0cdpr3rfb5t.png" alt="Text formatting 2"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0peey5vid0cdpr3rfb5t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0peey5vid0cdpr3rfb5t.png" alt="Text formatting 3"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;To create a link I will make something for demonstration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fen46qhtzqevvj7vgiddk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fen46qhtzqevvj7vgiddk.png" alt="Obsidian link"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I simply make a link like this &lt;code&gt;[[Alarm Clock]]&lt;/code&gt; and &lt;strong&gt;"Control + Click"&lt;/strong&gt; on that link to create the note.&lt;/p&gt;

&lt;p&gt;Then I can simply add some text to the newly created note. You can see on the right side that the graph view for this note shows us all of the notes that are linked to this one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnkzdp812ujnyd7kn32h5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnkzdp812ujnyd7kn32h5.png" alt="More about links"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Images
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;![]()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is the syntax for you to add images to Obsidian, in the &lt;code&gt;[]&lt;/code&gt; you can put in alternative text for the image and ing the &lt;code&gt;()&lt;/code&gt; a path to the images.&lt;/p&gt;

&lt;p&gt;I have a special folder in my vault where I put all of my images.&lt;br&gt;
usually, I don't add an alt text, since this is just for my personal use. But I encourage you to always add alt text to images if it is for others to see.&lt;/p&gt;

&lt;h3&gt;
  
  
  Graph View
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwy5kdb1cqygpcnrgnzxh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwy5kdb1cqygpcnrgnzxh.png" alt="Obisidan Graph"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This graph view is quite important for me!&lt;/p&gt;

&lt;p&gt;For the first, I love to see my second brain grow, but I also use it quite a lot to go over my notes, I like to spend some time and filter out some tags and go through my notes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Plugins
&lt;/h3&gt;

&lt;p&gt;The plugins are also a big reason why I got drawn to Obsidian.&lt;/p&gt;

&lt;p&gt;There are some 'default' plugins you can add to your vault and then there are also community plugins. Which general users like you and me could create.&lt;/p&gt;

&lt;p&gt;By having its user being able to generate plugins for other users the community will grow a lot and the software can improve so much.&lt;/p&gt;

&lt;p&gt;I recommend you to try some plugins and see if you like them, but here is a list of some plugins I use a lot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/tgrosinger/advanced-tables-obsidian" rel="noopener noreferrer"&gt;Advanced Tables&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Daily Notes -&amp;gt; This one is a core plugin from the Obsidian team.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/lynchjames/obsidian-day-planner" rel="noopener noreferrer"&gt;Day Planner&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/argenos/hotkeysplus-obsidian" rel="noopener noreferrer"&gt;Hot Keys ++&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/deathau/sliding-panes-obsidian" rel="noopener noreferrer"&gt;Sliding Panes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Mobile app
&lt;/h3&gt;

&lt;p&gt;The Obsidian team recently launched a mobile app. I think it is still in beta testing, if not, I'm sorry.&lt;br&gt;
For this app to work you have to back your vault up in the cloud and access it on your phone.&lt;br&gt;
Since I have an iPhone I uploaded it to iCloud and sync it to my phone that way.&lt;br&gt;
There is more solution and you can also pay for an Obsidian sync service.&lt;/p&gt;

&lt;h3&gt;
  
  
  Community
&lt;/h3&gt;

&lt;p&gt;There is an &lt;a href="https://forum.obsidian.md/" rel="noopener noreferrer"&gt;Obisidan forum&lt;/a&gt; with tons of content. This is a place where you can dive deep into Obsidian. They also have a discord group.&lt;/p&gt;

&lt;p&gt;I have found a lot of high-quality content on the forum.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I love Obsidian, for real! It is a long time since I've been as excited to spend time to just dive into something so much.&lt;/p&gt;

&lt;p&gt;I almost have to stop myself to change my whole vault every other week. I want to get some consistency in my use and develop a good system for my second brain. So I mainly try to improve tiny things at a time, give me some time to try them out.&lt;/p&gt;

&lt;p&gt;I want to do a lot of things, but I want to get more notes in my vault to see how it will look.&lt;br&gt;
That is one reason why I have so many unlinked notes, for the time being, I want to keep them unlinked and gradually link them to the correct MOCs.&lt;/p&gt;

&lt;p&gt;I also would love to try experience building a plugin. For what you might ask? I ask the same, I have no idea at the moment, it would just be fun to try it out.&lt;/p&gt;

&lt;p&gt;Since the Obsidian team released their mobile app I've just gotten more on the Obsidian train.&lt;br&gt;
For me, that was the only thing I felt like was missing, not that I'm constantly writing notes on my phone, it is more accessible to my vault. Like I mentioned earlier I use Obsidian to plan my workday as much as I can and make a lot of checklists, memos, and whatnot, so it is very nice to have access to that on my phone!&lt;/p&gt;

&lt;p&gt;If you have any questions for me regarding my Obsidian vault, plugins, how I use it or just anything. Don't hesitate to ask!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building my second brain with Obsidian pt. I</title>
      <dc:creator>Einar Guðni Guðjónsson</dc:creator>
      <pubDate>Sun, 08 Aug 2021 13:41:42 +0000</pubDate>
      <link>https://dev.to/einargudnig/building-my-second-brain-with-obsidian-pt-i-4oc2</link>
      <guid>https://dev.to/einargudnig/building-my-second-brain-with-obsidian-pt-i-4oc2</guid>
      <description>&lt;h2&gt;
  
  
  Second Brain
&lt;/h2&gt;

&lt;p&gt;In todays world we have so many different kind of information. We have emails, text messages, emails, articles, books, podcasts and so much more.&lt;br&gt;
All of this content has value, but it is hard to try to remember all of it. But to be effective today you can build yourself a second brain to use all this content without needing to remember all of it.&lt;/p&gt;

&lt;p&gt;I've been using &lt;a href="https://obsidian.md/" rel="noopener noreferrer"&gt;Obsidian&lt;/a&gt; to build my second brain since the beginning of this year.&lt;br&gt;
I'm very keen on Obsidian and I like it a lot. It suits me very well and has so many opportunities.&lt;/p&gt;

&lt;p&gt;This below is my second brain as of today, it is under continuous development and gets bigger every day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmhg8nl1oir0tqkxw4r5f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmhg8nl1oir0tqkxw4r5f.png" alt="Graph View"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every yellow note is a note containing some content. Every blue note is a not-yet created note, but I have made a link to a note. And every purple note is an attachment, like image.&lt;/p&gt;

&lt;p&gt;But what is a second brain? Other than Looking like one in the picture above?&lt;br&gt;
Go check out what &lt;a href="https://fortelabs.co/blog/basboverview/" rel="noopener noreferrer"&gt;Tiago Forte&lt;/a&gt; has done, he has a great article and a course about this.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Building a second brain is a methodology for saving and systematically reminding us of the ideas, inspirations, insights, and connections we've gained through our experience.&lt;br&gt;
It expands our memory and our intellect using the modern tools of technology and networks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this post, I will mostly talk generally about personal knowledge management and how I'm using Obsidian to build myself a second brain.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a PKM system?
&lt;/h2&gt;

&lt;p&gt;PKM (Personal Knowledge Management) system can be a system that you use to curate knowledge.&lt;br&gt;
You can design it to match your needs. You can look at PKM systems as your second brain.&lt;/p&gt;

&lt;p&gt;This is one place to improve your knowledge.&lt;/p&gt;

&lt;p&gt;So this will be a personal system best for your usage. I think that is important. None of us do the things in the same way, we may have a like activity to do various things,&lt;br&gt;
but I think we can make them better by personalizing them to suit ourselves.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;By collecting our knowledge in a centralized place outside of our heads, we can create an engine of creative output – a “second brain” – to advance a career, build a business, or pursue a passion. By making this knowledge digital, we can reap the benefits of searchability, backups, syncing between devices, sharing with others, and more.&lt;br&gt;
- Tiago Forte&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Having this collection of knowledge in a digital form is very useful for me, as I spend quite a lot of time in front of my computer. It is super convenient to&lt;br&gt;
have quick access to my PKM system.&lt;/p&gt;

&lt;p&gt;I truly believe that in today's world we should use technology to help us build up knowledge.&lt;/p&gt;

&lt;p&gt;By quickly accessing your notes to review, add to them, and use them you can methodologically build your knowledge you curate in your day-to-day life.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Go to sleep smarter than you woke up"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Is a great phrase I think Shane Parrish, said. It could be that he is quoting someone else, but the saying is true in my opinion. Couple that together with digital PKM and&lt;br&gt;
I think you have yourself a great way to improve your life.&lt;/p&gt;

&lt;p&gt;Why do I think PKM is good?&lt;br&gt;
For so many reasons.&lt;br&gt;
One of the biggest reasons I keep adding to my PKM system is because I want to learn more things, but I only can spend limited time diving into new things to learn.&lt;br&gt;
By having a PKM system in place I can gradually add content about the things I want to learn and that way I build up more knowledge over time.&lt;/p&gt;

&lt;p&gt;So this suits me very well, I can gradually add notes and connect them to build a good base of content.&lt;/p&gt;

&lt;p&gt;Just to clarify, there are many other software's you could use, other than Obsidian. I like obsidian very much and I don't think I'll move away from it. But, I encourage you to start making you own PKM system, whatever the method you use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Obsidian?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Locally&lt;/em&gt; - You keep all of your files locally on your computer. Note: If you want to use their mobile app you can sync them with iCloud for example.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Markdown&lt;/em&gt; - Super easy to use markdown syntax after you get used to it. One thing I like more about Obsidian than Notion is the Markdown writing.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Customizable&lt;/em&gt; - You can add your custom CSS, there are multiple plugins you can use. You could even build a plugin if you want.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;IDE like&lt;/em&gt; - Like mentioned above, it is customizable, you can make a lot of keyboard shortcuts and more, so it feels a lot like I'm just using an editor like VS Code.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Good Looking&lt;/em&gt; - just a personal opinion, but you can change themes, add plugins, and more to make it look nice.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One thing that I do like also is the graph view, like you see in the photo above. It helps to show the connection between notes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnj8r1ndl81he5eewvsc4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnj8r1ndl81he5eewvsc4.png" alt="Obsidian Logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'll write another post explaining how I use Obsidian and what I would like to do with it.&lt;br&gt;
I've just been using it since the beginning of this year, so instead of making it super customized right from the beginning, I decided to wait and see what I thought&lt;br&gt;
would improve my usage.&lt;/p&gt;

&lt;p&gt;Here is &lt;a href="https://dev.to/einargudnig/building-my-second-brain-with-obsidian-pt-ii-365p"&gt;part II&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Improve your portfolio by using the Spotify API🎼</title>
      <dc:creator>Einar Guðni Guðjónsson</dc:creator>
      <pubDate>Wed, 28 Jul 2021 15:51:07 +0000</pubDate>
      <link>https://dev.to/einargudnig/spotify-now-playing-on-your-website-3026</link>
      <guid>https://dev.to/einargudnig/spotify-now-playing-on-your-website-3026</guid>
      <description>&lt;p&gt;This is inspired by &lt;a href="https://twitter.com/leeerob"&gt;Lee Robinson&lt;/a&gt;, go check him out, he does a &lt;em&gt;lot&lt;/em&gt; of super cool things!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can see this working &lt;a href="https://www.einargudni.com/"&gt;here&lt;/a&gt; on the bottom of the page&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Like the summary says: This is a blog post about how to set up to make a component on your website which showcases what you are listening to on Spotify, at any given moment.&lt;/p&gt;

&lt;p&gt;So before we can start to write some code, we have to do some preparation so that the Spotify API will work with us.&lt;/p&gt;

&lt;p&gt;Please do take into account that you could do the first steps in the same way I showcase here, but after that, it will depend on how your website is built on how you can showcase this on your website. My page is built with Next.js and TailwindCSS and hosted on Vercel.&lt;/p&gt;

&lt;h3&gt;
  
  
  Spotify
&lt;/h3&gt;

&lt;p&gt;There are three steps that we need to do for this to work. Here you will see these three steps. Below we will go and do these three steps.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create Spotify Application&lt;/li&gt;
&lt;li&gt;Authentication&lt;/li&gt;
&lt;li&gt;Environmental Variables&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Create Spotify Application
&lt;/h3&gt;

&lt;p&gt;The first step is to create a Spotify application so we can get credentials to authenticate and then use the API.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log in to you &lt;a href="https://developer.spotify.com/dashboard/login"&gt;Spotify Developer Dashboard&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Create an App&lt;/li&gt;
&lt;li&gt;Add name and description to their fields and click create.&lt;/li&gt;
&lt;li&gt;Show Client Secret

&lt;ul&gt;
&lt;li&gt;We have to get this secret and use it later!&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Copy your Client ID and Secret and paste for use later on in the process.&lt;/li&gt;
&lt;li&gt;Edit your settings&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;&lt;a href="http://localhost:3000"&gt;http://localhost:3000&lt;/a&gt;&lt;/code&gt; as a redirect URL

&lt;ul&gt;
&lt;li&gt;What is a redirect URL?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This step is done!&lt;br&gt;
Now Spotify is configured and you are authorized to make requests.&lt;/p&gt;
&lt;h3&gt;
  
  
  Authenitcation
&lt;/h3&gt;

&lt;p&gt;There are many ways to authenticate with the Spotify API, it will depend on your use case what is the most feasible solution.&lt;br&gt;
For us, we will use the &lt;a href="https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow"&gt;Authorization Code Flow&lt;/a&gt;, since we only need the permission granted once.&lt;/p&gt;

&lt;p&gt;We will have our application request the authorization by logging into the scope we need. Here is an example of what the URL might look like. Swap out the &lt;code&gt;client_id&lt;/code&gt; and &lt;code&gt;scope&lt;/code&gt; for your own.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;https://accounts.spotify.com/authorize?client_id&lt;span class="o"&gt;=&lt;/span&gt;f42ae57ec93142b0b4017936f75fa65e&amp;amp;response_type&lt;span class="o"&gt;=&lt;/span&gt;code&amp;amp;redirect_uri&lt;span class="o"&gt;=&lt;/span&gt;http%3A%2F%2Flocalhost:3000&amp;amp;scope&lt;span class="o"&gt;=&lt;/span&gt;user-read-currently-playing%20user-top-read
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since we only need to authenticate once, we will be redirected to our &lt;code&gt;redirect_uri&lt;/code&gt; we added in the step above.&lt;br&gt;
In the URL, there will be a &lt;code&gt;code&lt;/code&gt; query parameter, save that value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;http://localhost:3000/?code&lt;span class="o"&gt;=&lt;/span&gt;AQA7...FyBs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we will need to retrieve the &lt;code&gt;refresh token&lt;/code&gt;. To do that we will have to generate a Base 64 encoded string containing the client_id and secret from the first step. You can use &lt;a href="https://www.base64encode.org/"&gt;this tool&lt;/a&gt; for example, to encode it online. The format should be &lt;code&gt;client_id:client_secret&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Basic &amp;lt;base64 encoded client_id:client_secret&amp;gt;"&lt;/span&gt;
&lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nv"&gt;grant_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;authorization_code &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nv"&gt;code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;code&amp;gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nv"&gt;redirect_uri&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http%3A
%2F%2Flocalhost:3000 https://accounts.spotify.com/api/token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will return a JSON response that contains the &lt;code&gt;refresh_token&lt;/code&gt; we needed. This token is &lt;a href="https://developer.spotify.com/community/news/2016/07/25/app-ready-token-revoke/"&gt;valid indefinitetly&lt;/a&gt; unless you revoke access, so we'll want to save this in an environment variable. This &lt;code&gt;refresh_token&lt;/code&gt; being valid indefinitely is one part of why we only need to authenticate once.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add Environmental Variables
&lt;/h3&gt;

&lt;p&gt;To securely access the API we need to include the secret with each request. But we don't want to showcase our secrets in public, and not on GitHub either. Thus, we should use environment variable.&lt;br&gt;
You can do this in a few ways, but since I use Next.js and vercel I used &lt;a href="https://vercel.com/docs/environment-variables"&gt;this&lt;/a&gt; to help me to store my environment variables in a correct way.&lt;/p&gt;
&lt;h3&gt;
  
  
  Code
&lt;/h3&gt;

&lt;p&gt;Here we will go over the two files needed to access the data from the Spotify API. Like I mentioned above, I will not go more into detail on how to make it visible on your site, which will differentiate from the framework your site is built with. However, I'm sure you can figure out how to display the data yourself. 🤩&lt;/p&gt;

&lt;p&gt;spotify.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;fetch&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;isomorphic-fetch&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;querystring&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;querystring&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;


&lt;span class="c1"&gt;// We access our values with enviroment variables,&lt;/span&gt;
&lt;span class="c1"&gt;// we don't want to share these values in our code&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SPOTIFY_CLIENT_ID&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client_secret&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SPOTIFY_CLIENT_SECRET&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;refresh_token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SPOTIFY_REFRESH_TOKEN&lt;/span&gt;

&lt;span class="c1"&gt;// We encode our client_id and client_secret again to send with the POST request.&lt;/span&gt;
&lt;span class="c1"&gt;// This is a part of the authorization header&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;basic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;client_id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;client_secret&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;base64&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;NOW_PLAYING_ENDPOINT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`https://api.spotify.com/v1/me/player/currently-playing`&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;TOKEN_ENDPOINT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`https://accounts.spotify.com/api/token`&lt;/span&gt;

&lt;span class="c1"&gt;// This function gets the access token so that we can access the API&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getAccessToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;TOKEN_ENDPOINT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;Authorization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Basic &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;basic&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/x-www-form-urlencoded&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="p"&gt;},&lt;/span&gt;
   &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;querystring&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;grant_type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;refresh_token&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;refresh_token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// We use the afformentioned access token and send it with the request to the API&lt;/span&gt;
&lt;span class="c1"&gt;// this requests gets the currently playing song.&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getNowPlaying&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;access_token&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;getAccessToken&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
 &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;NOW_PLAYING_ENDPOINT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="na"&gt;Authorization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Bearer &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;access_token&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
 &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;now-playing.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nx"&gt;getNowPlaying&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@/lib/spotify&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;getNowPlaying&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

 &lt;span class="c1"&gt;// Here we handle the request from the API&lt;/span&gt;
 &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;204&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="na"&gt;isPlaying&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;song&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

 &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;song&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="na"&gt;isPlaying&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isPlaying&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;song&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;is_playing&lt;/span&gt;
 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;song&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;
 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;artist&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;song&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;artists&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;_artist&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;_artist&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;, &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;album&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;song&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;album&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;
 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;albumImageUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;song&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;album&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;images&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;
 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;songUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;song&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;external_urls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;spotify&lt;/span&gt;

 &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setHeader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Cache-Control&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;public, s-maxage=60, stale-while-revalidate=30&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

 &lt;span class="c1"&gt;// We return an obejct containing the information about the currently playing song&lt;/span&gt;
 &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
   &lt;span class="nx"&gt;album&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="nx"&gt;albumImageUrl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="nx"&gt;artist&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="nx"&gt;isPlaying&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="nx"&gt;songUrl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;So to summarize!&lt;/p&gt;

&lt;p&gt;These three main steps are required so you can get access to the Spotify API.&lt;br&gt;
You can then use the API to display what you are listening to on your website.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First Create the application on the Spotify Developer website&lt;/li&gt;
&lt;li&gt;Get the Authentication set up and working

&lt;ul&gt;
&lt;li&gt;This is important so the requests will work&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Set up Environment Variables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can use the Spotify API to do many other things, for example, show your most played songs!&lt;/p&gt;

&lt;p&gt;But these steps are important so you can get access to the API and use it in your projects.&lt;/p&gt;

&lt;p&gt;You can see this component on the bottom of my &lt;a href="https://www.einargudni.com/"&gt;webpage&lt;/a&gt;, above the footer&lt;br&gt;
Either there is a song playing or Not playing.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Automate your fitness after lockdown</title>
      <dc:creator>Einar Guðni Guðjónsson</dc:creator>
      <pubDate>Sun, 25 Apr 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/einargudnig/automate-your-fitness-after-lockdown-28f2</link>
      <guid>https://dev.to/einargudnig/automate-your-fitness-after-lockdown-28f2</guid>
      <description>&lt;p&gt;We have to have short storytime, to talk about the scenario for this project.&lt;br&gt;
Lockdowns have been on and off here in Iceland over the last year. Crossfit boxes here closed, and when the lockdowns lifted they opened again but not in a full capacity.&lt;br&gt;
That meant that the demand for places in the classes was very high.&lt;/p&gt;

&lt;p&gt;Of course, we can't automate our own fitness, we must show up and put in the work. But this will help us to reserve a spot in class when the demand is very high.&lt;/p&gt;

&lt;p&gt;One point that plays in my hands is that I can reserve a place in class 72 hours ahead of time. So in theory I could reserve my place in classes for three days at a time, as long as they are not more than 72 hours ahead of the current time. &lt;em&gt;So why not try to automate the process?&lt;/em&gt; That would at least save me the time of fighting to get the few places in the classes.&lt;/p&gt;

&lt;p&gt;I had done a similar project when I was finishing my computer science degree. To build a small script that sent me an email when I received my grades. So that was a fine starting point.&lt;/p&gt;

&lt;p&gt;The first was to set up &lt;a href="https://selenium-python.readthedocs.io/"&gt;selenium&lt;/a&gt;. This link has quite good information on the process of setting up selenium, but &lt;a href="https://www.geeksforgeeks.org/how-to-install-selenium-in-python/"&gt;here&lt;/a&gt; are also some rather detailed steps to get started with selenium.&lt;/p&gt;

&lt;p&gt;I decided to use the &lt;a href="https://chromedriver.chromium.org/downloads"&gt;chromedriver&lt;/a&gt; you could use the geckodriver for firefox if you want.&lt;/p&gt;

&lt;p&gt;These are the packages we need to import. We will use selenium a lot, more on that later...&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://docs.python.org/3/library/time.html"&gt;time&lt;/a&gt; module we use to make sure the website does go to its correct state before we select and click values.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://docs.python.org/3/library/os.html"&gt;os&lt;/a&gt; module we use to access the environmental values that keep our username and password for the login. &lt;a href="https://able.bio/rhett/how-to-set-and-get-environment-variables-in-python--274rgt5"&gt;Read&lt;/a&gt; about how to use the os module.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;selenium&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;webdriver&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;time&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;os&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this, we can test if the selenium works. It is best to just start to open a website, you could try &lt;code&gt;google.com&lt;/code&gt; or whatever.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;driver&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;webdriver&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'./chromedriver'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'https://app.wodify.com/Schedule/CalendarListView.aspx'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;quit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we just try to open the Wodify website we plan on using later, but since we need to log into it only opens up on the login page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GJO4MsBD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1618438906/selenium1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GJO4MsBD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1618438906/selenium1.png" alt="Wodify Log In"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If everything worked you should see the website open up in a new browser&lt;br&gt;
So now we have selenium working.&lt;/p&gt;
&lt;h3&gt;
  
  
  How can we use Selenium to log in to this website?
&lt;/h3&gt;

&lt;p&gt;Selenium lets us select and interact with the HTML of the website.&lt;br&gt;
We can inspect the website with the &lt;a href="https://developer.chrome.com/docs/devtools/"&gt;Chrome DevTools&lt;/a&gt; by using ctrl + shift + I&lt;/p&gt;

&lt;p&gt;The first step is to log in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8RRcm6tv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1619215452/wodifylogin1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8RRcm6tv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1619215452/wodifylogin1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can use the DevTools to inspect the website and select the login field and input the username we had stored as an environmental value earlier.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;elementLoginInput&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find_element_by_id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Input_UserName"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;elementLoginInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;WODIFY_UERNAME&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;driver.find_element_by_id&lt;/code&gt; comes from the selenium module we imported earlier&lt;/p&gt;

&lt;p&gt;We do the same for the password field, select the id and input the password.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JCdALRDO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1619215452/wodifylogin2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JCdALRDO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1619215452/wodifylogin2.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;elementPwInput&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find_element_by_id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Input_Password"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;elementPwInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send_keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;WODIFY_PASSWORD&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After we have sent our login information to the correct fields we have to locate the login button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yo7IHq_D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1619269248/wodifylogin3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yo7IHq_D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1619269248/wodifylogin3.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we can however see that the Login Button does not have an Id, but we can use the &lt;a href="https://www.lambdatest.com/blog/complete-guide-for-using-xpath-in-selenium-with-examples/"&gt;xPath&lt;/a&gt; to select the button without the Id.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find_element_by_xpath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'//*[@id="FormLogin"]/div[2]/div[5]/button).click()
time.sleep(3)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After we login, we can go straight and find what element we need to select to register for said class.&lt;/p&gt;

&lt;p&gt;However, since we could end up needing to scroll down on the page, especially if the class is two or three days from now, remember - we can reserve for classes 72 hours from the current class, but only one a day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oiMBRbUM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1619279563/wodifylogin4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oiMBRbUM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1619279563/wodifylogin4.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So here below you can see us find an element by its xPath, this element contains the day and class we want to select.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;tableRow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find_element_by_xpath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'//*[@id="AthleteTheme_wt6_block_wtMainContent_wt9_wtClassTable_ctl45_wtAddReservationLink2"]'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;execute_script&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"arguments[0].scrollIntoView();"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tableRow&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And since we need to scroll the particular day and class into view we must use &lt;code&gt;.scrollIntoView()&lt;/code&gt;.&lt;br&gt;
Because of the element we are searching for is not in view on the page we must scroll it into view. We can not click an element that is no in view.&lt;/p&gt;

&lt;p&gt;We can see what the element for the button is, but however, it is important to notice that the buttons have not identical ids. Which we can understand because they all stand for different classes.&lt;/p&gt;

&lt;p&gt;But this helps us to just go to the day and time we are registering for.&lt;/p&gt;

&lt;p&gt;We can inspect the element we want and simply copy its xPath.&lt;/p&gt;

&lt;p&gt;Here we have two different classes, one that we can register for and another one that is not accessible yet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7hf0YS9a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1619352359/wodifylogin5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7hf0YS9a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1619352359/wodifylogin5.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the code snippet below we can see xPath for both classes.&lt;br&gt;
Note, that when the classes are available for registration the xPath is different.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;tableRowAvailable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find_element_by_xpath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'//*[@id="AthleteTheme_wt6_block_wtMainContent_wt9_wtClassTable_ctl15_wtAddReservationLink2"]'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;tableRowUnavailable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find_element_by_xpath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'//*[@id="AthleteTheme_wt6_block_wtMainContent_wt9_wtClassTable_ctl17_wt3"]'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This does mean that we must figure out how the xPath will be after the registration opens. We figured out that &lt;code&gt;AddReservationLink2&lt;/code&gt; is added to the element and the xPath as soon as the registration opens up.&lt;/p&gt;

&lt;p&gt;This is rather a simple step and a good starting place. We could add more to this to make it more robust.&lt;br&gt;
Right now it returns an error if it doesn't find the element straight away. Wy could handle it with a &lt;a href="https://www.w3schools.com/python/python_try_except.asp"&gt;try-except&lt;/a&gt; to make sure that we try to click the button until it becomes availabe if the programs run few seconds too early and it tries to register for a class when the registration period is not opened yet it would return an error and 'crash'. The try-except could make sure we would not have this error happen if we try to register too soon.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scheduling
&lt;/h3&gt;

&lt;p&gt;How could we automate the process of scheduling the task?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fVx9z_n8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1619354073/wodifylogin6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fVx9z_n8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/dik9usnqz/image/upload/v1619354073/wodifylogin6.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since I have a windows machine, I used &lt;a href="https://www.windowscentral.com/how-create-automated-task-using-task-scheduler-windows-10"&gt;Task Scheduler&lt;/a&gt; there are probably more ways to schedule a python script to run at a certain time, especially if you have a different OS. I know that you can figure that out. 🤠&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;It is not the perfect way but I feel like this is a good starting point.&lt;/p&gt;

&lt;p&gt;This is a super simple way to start to automate things with simple yet effective python scripts.&lt;br&gt;
I recommend you play around with it and use it as you like.&lt;br&gt;
It is not super hard to get started with selenium, which is why it is a good starting place.&lt;/p&gt;

&lt;p&gt;There are probably multiple ways to automate a lot of things in a different way, so Selenium is not the only way. I think is just one place to start.&lt;/p&gt;

&lt;p&gt;Automation small tasks like this are fun to do. I hope you can use this to automate something in your life, or just to play around and have fun. &lt;/p&gt;

&lt;p&gt;Check out my &lt;a href="//www.einargudni.com"&gt;site&lt;/a&gt; for more upcoming posts about things I'm doing 🤓&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Animated Waving Hand Emoji 👋</title>
      <dc:creator>Einar Guðni Guðjónsson</dc:creator>
      <pubDate>Sun, 11 Apr 2021 23:11:27 +0000</pubDate>
      <link>https://dev.to/einargudnig/animated-waving-hand-emoji-4h54</link>
      <guid>https://dev.to/einargudnig/animated-waving-hand-emoji-4h54</guid>
      <description>&lt;p&gt;Maybe you have noticed that subtle, and welcoming waving hand emoji in the title on my &lt;a href="https://einargudni.com"&gt;website&lt;/a&gt;. &lt;br&gt;
&lt;em&gt;EDIT:&lt;/em&gt; I have changed the design for my website so this hand is not visible there as I say here, but you can see it here below!&lt;/p&gt;

&lt;p&gt;Here you can see what I'm referencing to&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/einargudnig/embed/YzNeZOG?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;This is just the simple 👋 emoji found &lt;a href="https://emojipedia.org/waving-hand/"&gt;here&lt;/a&gt; on &lt;a href="https://emojipedia.org/"&gt;emojipedia&lt;/a&gt;. This is just a simple emoji, like the rest of them, but by using some CSS 'magic' we can make the emoji wave. So the waving hand emoji will actually wave.&lt;/p&gt;

&lt;p&gt;To use CSS animation, we first must specify keyframes for the animation.&lt;/p&gt;

&lt;p&gt;But what are &lt;a href="https://www.w3schools.com/cssref/css3_pr_animation-keyframes.asp"&gt;keyframes&lt;/a&gt;?&lt;br&gt;
Keyframes (&lt;code&gt;@keyframes&lt;/code&gt;) control the steps in a CSS animation sequence. We can also use &lt;a href="https://www.w3schools.com/css/css3_transitions.asp"&gt;transitions&lt;/a&gt; but keyframes give us more control and customizability.&lt;/p&gt;

&lt;p&gt;We'll look closer at the keyframes I used for this animation later in this post.&lt;/p&gt;



&lt;p&gt;First, let's take a look at how the blog title is structured.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;className=&lt;/span&gt;&lt;span class="s"&gt;"blog-title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;className=&lt;/span&gt;&lt;span class="s"&gt;"blog-title-text"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Hello!&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;className=&lt;/span&gt;&lt;span class="s"&gt;"blog-title-emoji"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;👋&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we can see the title. Two spans, the first one containing the text and the second span containing the waving hand emoji.&lt;/p&gt;

&lt;p&gt;The main reason why I split it into two spans is so that I could only use the animation on the emoji, I do not want to use the animation on the title itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.blog-title-emoji&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;animation-name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;wave-animation&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;animation-duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2.5s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;animation-iteration-count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;infinite&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;transform-origin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;70%&lt;/span&gt; &lt;span class="m"&gt;70%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we'll go over some of the CSS and what it does. This is just an idea of how this animation can be, it is very easy to customize it to your liking.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;animation-name&lt;/code&gt; Here we will put the name of the animation where we make the keyframes. We'll talk more about this later.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;animation-duration&lt;/code&gt; We can decide how long the animation should appear. We have selected 2.5 seconds, this also will affect the speed of the animation. If we set the value to 0.5 seconds, the hand will move very fast and it will move very slow if we set the value to 23.5 seconds.&lt;br&gt;
&lt;em&gt;Note&lt;/em&gt; that you have to define an animation-duration, if nothing is entered the default value is 0 and nothing will happen.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;animation-iteration-count&lt;/code&gt; This is how often the animation will run. We could set the value as 3, and the waving will happen 3 times. The value here is infinity, so the waving will go on forever, let's just hope the hand won't get tired😫&lt;/p&gt;

&lt;p&gt;&lt;code&gt;transform-origin&lt;/code&gt; This property allows us to change the position of the waving hand. The animation will occur without this property, but it does a good job at making it better, without it the animation would pivot around a point somewhere in the middle of the hand.&lt;br&gt;
In our animation, this property is used to pivot around the bottom of the left palm, which gives it a more realistic feel.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;display&lt;/code&gt; property really does not connect as much to the animation as the other properties, so I'll leave that one out as an opportunity for a later blog post.&lt;/p&gt;



&lt;p&gt;Now we will take a look at the keyframes. Note that the &lt;code&gt;animation-name&lt;/code&gt; must be mentioned in the keyframes initializer so that the keyframes work on the correct animation.&lt;/p&gt;

&lt;p&gt;Here we see the keyframes for the waving hand animations.&lt;br&gt;
They are not very complicated.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;wave-animation&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;15&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;14deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;30&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-8deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;40&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;14deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;50&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-4deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;60&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;70&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The % stands for a different part of the animation itself.&lt;br&gt;
So the 0% is at the beginning of the animation and the 100% at the end.&lt;br&gt;
This ended up being a lot of trial and error to get to a place where I was pretty happy about how the animation was.&lt;/p&gt;

&lt;p&gt;So from the 15%, you can decide how intense the wave will be. How much the hand will go in each direction.&lt;br&gt;
Like I mentioned before, here it was just trial and error. First I felt like I had settled on a fine wave but it was quite intense, so by changing the degrees on various parts of the animation it looked better in my opinion.&lt;/p&gt;

&lt;p&gt;You can use the keyframes for a &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes"&gt;lot&lt;/a&gt; more, but for me and this instance, this was enough.&lt;/p&gt;

&lt;p&gt;This was a fun little 'project' and got me to dive a bit more into animations. The complexity was low so this was a good place to start and play around with.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/einargudnig/pen/YzNeZOG"&gt;Here&lt;/a&gt; is a link to the codepen showed above, with the code that I used. I highly recommend you to play around with it if you want to understand any part of animation better.&lt;/p&gt;

</description>
      <category>css</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
