SlideShare a Scribd company logo
1 of 32
Download to read offline
jrnlA journal in your command line.
Myles Braithwaite | myles.coffee | me@myles.coffee 1
My ~programming~ notebooks are filled with
random journal entries. It's all the same. I can look
back on old ~programming~ notebooks, and know
exactly what was going on in my ~professional~ life.
-- Paraphrasing Sarah Silverman
Myles Braithwaite | myles.coffee | me@myles.coffee 2
Dear diary: Today I was
pompous and my sister
was crazy. Today we were
kidnapped by hill folk,
never to be seen again. It
was the best day ever.
Myles Braithwaite | myles.coffee | me@myles.coffee 3
Myles Braithwaite | myles.coffee | me@myles.coffee 4
Who actually has time to
write paragraphs of text?
Myles Braithwaite | myles.coffee | me@myles.coffee 5
Myles Braithwaite | myles.coffee | me@myles.coffee 6
Calm down neckbeards
The finger protocol's .project and .plan files
predates Twitter.
$ finger me@myles.coffee
Login: myles Name: Myles Braithwaite
Directory: /home/myles Shell: /bin/bash
Office Phone +1 (647) 555-1234
On since Wed Mar 10 20:57 (EST) on pts/0 from batgirl.mylesbraithwaite.net
6 seconds idle
No mail.
Project:
Troll the subreddit of /r/conspiracy.
Plan:
World domination.
Office Hours:
Monday 9am - 11am
Tuesday 11am - 1pm
Wednesday 1pm - 3pm
Thursday 9am - 11am
Friday 3pm - 5pm
Myles Braithwaite | myles.coffee | me@myles.coffee 7
$ jrnl # Will launch in your $EDITOR.
$ jrnl "I am doing a short talk at @GTALUG on jrnl."
[Journal created at /home/myles/BTSync/Journal/journal.txt]
[Entry added to default journal]
$ cat $JOURNAL_FILE
2015-03-10 20:30 I am doing a short talk @GTALUG on jrnl.
Myles Braithwaite | myles.coffee | me@myles.coffee 8
$ jrnl yesterday 1pm: "I started phase three of my @WorldDomination plan."
[Entry added to default journal]
$ cat $JOURNAL_FILE
2015-03-09 13:00 I started phase three of my @WorldDomination plan.
2015-03-10 20:30 I am doing a short talk @GTALUG on jrnl.
Myles Braithwaite | myles.coffee | me@myles.coffee 9
$ jrnl yesterday 2pm: "Had some issue with phase three of @WorldDomination.
Apperently the sharkes don't come pre-trained."
[Entry added to default journal]
—The yesterday 2pm will be interpreted as a time
stamp
—The first sentense (everything before .?!: marks)
will be interpreted as the title.
—The rest will be the body.
Myles Braithwaite | myles.coffee | me@myles.coffee 10
$ jrnl < text-document.txt
Myles Braithwaite | myles.coffee | me@myles.coffee 11
$ jrnl *: Phase three of the @WorldDomination plan has successed.
We used dophones instead of sharkes.
[Entry added to default journal]
Myles Braithwaite | myles.coffee | me@myles.coffee 12
$ jrnl -starred
2015-03-10 14:32 Phase three of the @WorldDomination plan has successed.
| We used dophones instead of sharkes.
Myles Braithwaite | myles.coffee | me@myles.coffee 13
jrnl -1 --edit
Myles Braithwaite | myles.coffee | me@myles.coffee 14
$ jrnl -n 3
2015-03-10 14:32 Phase three of the @WorldDomination plan has successed.
| We used dophones instead of sharkes.
2015-03-10 16:00 Had my afternoon expresso @Coffee.
2015-03-10 20:30 I am doing a short talk @GTALUG on jrnl.
Myles Braithwaite | myles.coffee | me@myles.coffee 15
$ jrnl -on 2015-02-25
2015-02-25 09:54 Started working on my @GTALUG presentation on jrnl.
Myles Braithwaite | myles.coffee | me@myles.coffee 16
$ jrnl --tags
@coffee : 4
@worlddomination : 3
@gtalug : 2
Myles Braithwaite | myles.coffee | me@myles.coffee 17
$ jrnl @gtalug
2015-02-25 09:54 Started working on my @GTALUG presentation on jrnl.
2015-03-10 20:30 I am doing a short talk @GTALUG on jrnl.
Myles Braithwaite | myles.coffee | me@myles.coffee 18
$ jrnl @coffee -n 1
2015-03-10 16:00 Had my afternoon expresso @Coffee.
Myles Braithwaite | myles.coffee | me@myles.coffee 19
{
"journals": {
"default": "~/BTSync/Journal/journal.txt",
"work": {
"journal": "~/BTSync/Journal/work.txt",
"encrypt": true
}
}
}
Myles Braithwaite | myles.coffee | me@myles.coffee 20
$ jrnl work at 9am: Had a meeting with @Steve
about that electric car project. Managment does
not want to go though with it.
$ jrnl work -n 3
Myles Braithwaite | myles.coffee | me@myles.coffee 21
Cross Platform
Myles Braithwaite | myles.coffee | me@myles.coffee 22
SyncMyles Braithwaite | myles.coffee | me@myles.coffee 23
Encryption
Myles Braithwaite | myles.coffee | me@myles.coffee 24
import hashlib, Crypto.Cipher
key = hashlib.sha256(my_password).digest()
with open("journal.txt", "r+") as f:
cipher = f.read()
crypto = AES.new(key, AES.MODE_CBC, iv=cipher[:16])
plain = crypto.decrypt(cipher[16:])
plain = plain.strip(plain[-1])
plain = plain.decode("utf-8")
f.write(plain)
f.truncate()
Myles Braithwaite | myles.coffee | me@myles.coffee 25
If you're typing the letters A-E-S into your code,
you're doing it wrong.
—http://www.cs.berkeley.edu/~daw/teaching/
cs261-f12/misc/if.html
Myles Braithwaite | myles.coffee | me@myles.coffee 26
How to install
$ [sudo] aptitude install python-pip python-crypto
$ [sudo] pip install jrnl
Myles Braithwaite | myles.coffee | me@myles.coffee 27
Write your own
#!/bin/bash
DATE=`date +"%Y-%m-%d %H:%M"`
read
printf "$DATE $REPLYnn" >> "journal.txt"
Myles Braithwaite | myles.coffee | me@myles.coffee 28
—Web: myles.coffee
—Email: me@myles.coffee
—Twitter: @mylesb
Myles Braithwaite | myles.coffee | me@myles.coffee 29
To the extent possible under law, Myles Braithwaite
has waived all copyright and related or neighboring
rights to jrnl - A journal in your command line. This
work is published from: Canada.
Myles Braithwaite | myles.coffee | me@myles.coffee 30
You can view the source for this presentation at
https://github.com/myles/2015-03-10-jrnl.
Myles Braithwaite | myles.coffee | me@myles.coffee 31
Myles Braithwaite | myles.coffee | me@myles.coffee 32

More Related Content

Viewers also liked

Akkreditierungsagenturen - Traumtänzer oder strategische Partner
Akkreditierungsagenturen - Traumtänzer oder strategische PartnerAkkreditierungsagenturen - Traumtänzer oder strategische Partner
Akkreditierungsagenturen - Traumtänzer oder strategische PartnerDr. Ingo Dahm
 
Voltera 3D Prototyping Printer
Voltera 3D Prototyping PrinterVoltera 3D Prototyping Printer
Voltera 3D Prototyping PrinterNeeraj Tewari
 
Cycle.js: Functional and Reactive
Cycle.js: Functional and ReactiveCycle.js: Functional and Reactive
Cycle.js: Functional and ReactiveEugene Zharkov
 
Popular resistance to the british rule
Popular resistance to the british rulePopular resistance to the british rule
Popular resistance to the british ruleindianeducation
 
Prometna Učilica: Kako alkohol utječe na naše tijelo
Prometna Učilica: Kako alkohol utječe na naše tijeloPrometna Učilica: Kako alkohol utječe na naše tijelo
Prometna Učilica: Kako alkohol utječe na naše tijeloprometna
 
Diseminare mobilitate Praga, 20-31.10.2014, Teaching trough 21st century meth...
Diseminare mobilitate Praga, 20-31.10.2014, Teaching trough 21st century meth...Diseminare mobilitate Praga, 20-31.10.2014, Teaching trough 21st century meth...
Diseminare mobilitate Praga, 20-31.10.2014, Teaching trough 21st century meth...Adrian Chiorescu
 

Viewers also liked (8)

fredyEncuesta mija
fredyEncuesta mijafredyEncuesta mija
fredyEncuesta mija
 
Akkreditierungsagenturen - Traumtänzer oder strategische Partner
Akkreditierungsagenturen - Traumtänzer oder strategische PartnerAkkreditierungsagenturen - Traumtänzer oder strategische Partner
Akkreditierungsagenturen - Traumtänzer oder strategische Partner
 
Voltera 3D Prototyping Printer
Voltera 3D Prototyping PrinterVoltera 3D Prototyping Printer
Voltera 3D Prototyping Printer
 
Cycle.js: Functional and Reactive
Cycle.js: Functional and ReactiveCycle.js: Functional and Reactive
Cycle.js: Functional and Reactive
 
Droom wordt nachtmerrie. Veel moeders kampen met bevallingstrauma.
Droom wordt nachtmerrie. Veel moeders kampen met bevallingstrauma.Droom wordt nachtmerrie. Veel moeders kampen met bevallingstrauma.
Droom wordt nachtmerrie. Veel moeders kampen met bevallingstrauma.
 
Popular resistance to the british rule
Popular resistance to the british rulePopular resistance to the british rule
Popular resistance to the british rule
 
Prometna Učilica: Kako alkohol utječe na naše tijelo
Prometna Učilica: Kako alkohol utječe na naše tijeloPrometna Učilica: Kako alkohol utječe na naše tijelo
Prometna Učilica: Kako alkohol utječe na naše tijelo
 
Diseminare mobilitate Praga, 20-31.10.2014, Teaching trough 21st century meth...
Diseminare mobilitate Praga, 20-31.10.2014, Teaching trough 21st century meth...Diseminare mobilitate Praga, 20-31.10.2014, Teaching trough 21st century meth...
Diseminare mobilitate Praga, 20-31.10.2014, Teaching trough 21st century meth...
 

More from Myles Braithwaite

LessCSS Presentation @ April 2015 GTALUG Meeting
LessCSS Presentation @ April 2015 GTALUG MeetingLessCSS Presentation @ April 2015 GTALUG Meeting
LessCSS Presentation @ April 2015 GTALUG MeetingMyles Braithwaite
 
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG MeetingApache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG MeetingMyles Braithwaite
 
The Internet and Your Business
The Internet and Your BusinessThe Internet and Your Business
The Internet and Your BusinessMyles Braithwaite
 
GTALUG Short Talk On Mercurial
GTALUG Short Talk On MercurialGTALUG Short Talk On Mercurial
GTALUG Short Talk On MercurialMyles Braithwaite
 
Apache CouchDB talk at Ontario GNU Linux Fest
Apache CouchDB talk at Ontario GNU Linux FestApache CouchDB talk at Ontario GNU Linux Fest
Apache CouchDB talk at Ontario GNU Linux FestMyles Braithwaite
 
So You Want A Personal Website?
So You Want A Personal Website?So You Want A Personal Website?
So You Want A Personal Website?Myles Braithwaite
 
GTALUG Presentation on CouchDB
GTALUG Presentation on CouchDBGTALUG Presentation on CouchDB
GTALUG Presentation on CouchDBMyles Braithwaite
 

More from Myles Braithwaite (11)

Take a Stroll in the Bazaar
Take a Stroll in the BazaarTake a Stroll in the Bazaar
Take a Stroll in the Bazaar
 
LessCSS Presentation @ April 2015 GTALUG Meeting
LessCSS Presentation @ April 2015 GTALUG MeetingLessCSS Presentation @ April 2015 GTALUG Meeting
LessCSS Presentation @ April 2015 GTALUG Meeting
 
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG MeetingApache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
 
The Internet and Your Business
The Internet and Your BusinessThe Internet and Your Business
The Internet and Your Business
 
The Devil and HTML5
The Devil and HTML5The Devil and HTML5
The Devil and HTML5
 
GTALUG Short Talk On Mercurial
GTALUG Short Talk On MercurialGTALUG Short Talk On Mercurial
GTALUG Short Talk On Mercurial
 
Apache CouchDB talk at Ontario GNU Linux Fest
Apache CouchDB talk at Ontario GNU Linux FestApache CouchDB talk at Ontario GNU Linux Fest
Apache CouchDB talk at Ontario GNU Linux Fest
 
So You Want A Personal Website?
So You Want A Personal Website?So You Want A Personal Website?
So You Want A Personal Website?
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
Django GTALUG Presentation
Django GTALUG PresentationDjango GTALUG Presentation
Django GTALUG Presentation
 
GTALUG Presentation on CouchDB
GTALUG Presentation on CouchDBGTALUG Presentation on CouchDB
GTALUG Presentation on CouchDB
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 

jrnl Presentation @ March 2015 GTALUG Meeting

  • 1. jrnlA journal in your command line. Myles Braithwaite | myles.coffee | me@myles.coffee 1
  • 2. My ~programming~ notebooks are filled with random journal entries. It's all the same. I can look back on old ~programming~ notebooks, and know exactly what was going on in my ~professional~ life. -- Paraphrasing Sarah Silverman Myles Braithwaite | myles.coffee | me@myles.coffee 2
  • 3. Dear diary: Today I was pompous and my sister was crazy. Today we were kidnapped by hill folk, never to be seen again. It was the best day ever. Myles Braithwaite | myles.coffee | me@myles.coffee 3
  • 4. Myles Braithwaite | myles.coffee | me@myles.coffee 4
  • 5. Who actually has time to write paragraphs of text? Myles Braithwaite | myles.coffee | me@myles.coffee 5
  • 6. Myles Braithwaite | myles.coffee | me@myles.coffee 6
  • 7. Calm down neckbeards The finger protocol's .project and .plan files predates Twitter. $ finger me@myles.coffee Login: myles Name: Myles Braithwaite Directory: /home/myles Shell: /bin/bash Office Phone +1 (647) 555-1234 On since Wed Mar 10 20:57 (EST) on pts/0 from batgirl.mylesbraithwaite.net 6 seconds idle No mail. Project: Troll the subreddit of /r/conspiracy. Plan: World domination. Office Hours: Monday 9am - 11am Tuesday 11am - 1pm Wednesday 1pm - 3pm Thursday 9am - 11am Friday 3pm - 5pm Myles Braithwaite | myles.coffee | me@myles.coffee 7
  • 8. $ jrnl # Will launch in your $EDITOR. $ jrnl "I am doing a short talk at @GTALUG on jrnl." [Journal created at /home/myles/BTSync/Journal/journal.txt] [Entry added to default journal] $ cat $JOURNAL_FILE 2015-03-10 20:30 I am doing a short talk @GTALUG on jrnl. Myles Braithwaite | myles.coffee | me@myles.coffee 8
  • 9. $ jrnl yesterday 1pm: "I started phase three of my @WorldDomination plan." [Entry added to default journal] $ cat $JOURNAL_FILE 2015-03-09 13:00 I started phase three of my @WorldDomination plan. 2015-03-10 20:30 I am doing a short talk @GTALUG on jrnl. Myles Braithwaite | myles.coffee | me@myles.coffee 9
  • 10. $ jrnl yesterday 2pm: "Had some issue with phase three of @WorldDomination. Apperently the sharkes don't come pre-trained." [Entry added to default journal] —The yesterday 2pm will be interpreted as a time stamp —The first sentense (everything before .?!: marks) will be interpreted as the title. —The rest will be the body. Myles Braithwaite | myles.coffee | me@myles.coffee 10
  • 11. $ jrnl < text-document.txt Myles Braithwaite | myles.coffee | me@myles.coffee 11
  • 12. $ jrnl *: Phase three of the @WorldDomination plan has successed. We used dophones instead of sharkes. [Entry added to default journal] Myles Braithwaite | myles.coffee | me@myles.coffee 12
  • 13. $ jrnl -starred 2015-03-10 14:32 Phase three of the @WorldDomination plan has successed. | We used dophones instead of sharkes. Myles Braithwaite | myles.coffee | me@myles.coffee 13
  • 14. jrnl -1 --edit Myles Braithwaite | myles.coffee | me@myles.coffee 14
  • 15. $ jrnl -n 3 2015-03-10 14:32 Phase three of the @WorldDomination plan has successed. | We used dophones instead of sharkes. 2015-03-10 16:00 Had my afternoon expresso @Coffee. 2015-03-10 20:30 I am doing a short talk @GTALUG on jrnl. Myles Braithwaite | myles.coffee | me@myles.coffee 15
  • 16. $ jrnl -on 2015-02-25 2015-02-25 09:54 Started working on my @GTALUG presentation on jrnl. Myles Braithwaite | myles.coffee | me@myles.coffee 16
  • 17. $ jrnl --tags @coffee : 4 @worlddomination : 3 @gtalug : 2 Myles Braithwaite | myles.coffee | me@myles.coffee 17
  • 18. $ jrnl @gtalug 2015-02-25 09:54 Started working on my @GTALUG presentation on jrnl. 2015-03-10 20:30 I am doing a short talk @GTALUG on jrnl. Myles Braithwaite | myles.coffee | me@myles.coffee 18
  • 19. $ jrnl @coffee -n 1 2015-03-10 16:00 Had my afternoon expresso @Coffee. Myles Braithwaite | myles.coffee | me@myles.coffee 19
  • 20. { "journals": { "default": "~/BTSync/Journal/journal.txt", "work": { "journal": "~/BTSync/Journal/work.txt", "encrypt": true } } } Myles Braithwaite | myles.coffee | me@myles.coffee 20
  • 21. $ jrnl work at 9am: Had a meeting with @Steve about that electric car project. Managment does not want to go though with it. $ jrnl work -n 3 Myles Braithwaite | myles.coffee | me@myles.coffee 21
  • 22. Cross Platform Myles Braithwaite | myles.coffee | me@myles.coffee 22
  • 23. SyncMyles Braithwaite | myles.coffee | me@myles.coffee 23
  • 24. Encryption Myles Braithwaite | myles.coffee | me@myles.coffee 24
  • 25. import hashlib, Crypto.Cipher key = hashlib.sha256(my_password).digest() with open("journal.txt", "r+") as f: cipher = f.read() crypto = AES.new(key, AES.MODE_CBC, iv=cipher[:16]) plain = crypto.decrypt(cipher[16:]) plain = plain.strip(plain[-1]) plain = plain.decode("utf-8") f.write(plain) f.truncate() Myles Braithwaite | myles.coffee | me@myles.coffee 25
  • 26. If you're typing the letters A-E-S into your code, you're doing it wrong. —http://www.cs.berkeley.edu/~daw/teaching/ cs261-f12/misc/if.html Myles Braithwaite | myles.coffee | me@myles.coffee 26
  • 27. How to install $ [sudo] aptitude install python-pip python-crypto $ [sudo] pip install jrnl Myles Braithwaite | myles.coffee | me@myles.coffee 27
  • 28. Write your own #!/bin/bash DATE=`date +"%Y-%m-%d %H:%M"` read printf "$DATE $REPLYnn" >> "journal.txt" Myles Braithwaite | myles.coffee | me@myles.coffee 28
  • 29. —Web: myles.coffee —Email: me@myles.coffee —Twitter: @mylesb Myles Braithwaite | myles.coffee | me@myles.coffee 29
  • 30. To the extent possible under law, Myles Braithwaite has waived all copyright and related or neighboring rights to jrnl - A journal in your command line. This work is published from: Canada. Myles Braithwaite | myles.coffee | me@myles.coffee 30
  • 31. You can view the source for this presentation at https://github.com/myles/2015-03-10-jrnl. Myles Braithwaite | myles.coffee | me@myles.coffee 31
  • 32. Myles Braithwaite | myles.coffee | me@myles.coffee 32