mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-21 05:28:31 +02:00
Merge branch 'upstream_develop' into develop
This commit is contained in:
commit
515757ff71
8 changed files with 42 additions and 14 deletions
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -8,6 +8,19 @@
|
||||||
|
|
||||||
- Merge in temp branches for v2.4 [\#897](https://github.com/jrnl-org/jrnl/pull/897) ([wren](https://github.com/wren))
|
- Merge in temp branches for v2.4 [\#897](https://github.com/jrnl-org/jrnl/pull/897) ([wren](https://github.com/wren))
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- Fix typo in YAML exporter \("stared" -\> "starred"\) [\#907](https://github.com/jrnl-org/jrnl/pull/907) ([MinchinWeb](https://github.com/MinchinWeb))
|
||||||
|
|
||||||
|
**Build:**
|
||||||
|
|
||||||
|
- Update Poetry requirements for testing latest Python version [\#898](https://github.com/jrnl-org/jrnl/pull/898) ([wren](https://github.com/wren))
|
||||||
|
|
||||||
|
**Updated documentation:**
|
||||||
|
|
||||||
|
- Update twitter buttons, contribution in footer [\#905](https://github.com/jrnl-org/jrnl/pull/905) ([wren](https://github.com/wren))
|
||||||
|
- Change install doc guideline from pip to pipx [\#904](https://github.com/jrnl-org/jrnl/pull/904) ([micahellison](https://github.com/micahellison))
|
||||||
|
|
||||||
## [v2.3.1](https://pypi.org/project/jrnl/v2.3.1/) (2020-03-28)
|
## [v2.3.1](https://pypi.org/project/jrnl/v2.3.1/) (2020-03-28)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3...v2.3.1)
|
[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3...v2.3.1)
|
||||||
|
|
|
@ -3,16 +3,16 @@
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
On OS X, the easiest way to install *jrnl* is using
|
On OS X, the easiest way to install *jrnl* is using
|
||||||
[Homebrew](http://brew.sh/)
|
[Homebrew](http://brew.sh/):
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
brew install jrnl
|
brew install jrnl
|
||||||
```
|
```
|
||||||
|
|
||||||
On other platforms, install *jrnl* using pip
|
On other platforms, install *jrnl* using [Python](https://www.python.org/) 3.6+ and [pipx](https://pipxproject.github.io/pipx/):
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
pip install jrnl
|
pipx install jrnl
|
||||||
```
|
```
|
||||||
|
|
||||||
The first time you run `jrnl` you will be asked where your journal file
|
The first time you run `jrnl` you will be asked where your journal file
|
||||||
|
|
6
docs/theme/index.html
vendored
6
docs/theme/index.html
vendored
|
@ -42,7 +42,7 @@
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<aside>
|
<aside>
|
||||||
<a id="twitter" href="https://twitter.com/intent/tweet?text=Write+your+memoirs+on+the+command+line.+Like+a+boss.+%23jrnl&url=http%3A%2F%2Fjrnl.sh"><i class="icon twitter"></i>Tell your friends</a>
|
<a id="twitter" href="https://twitter.com/intent/tweet?text=Collect+your+thoughts+and+notes+without+leaving+the+command+line.+https%3A%2F%2Fjrnl.sh+via+@JrnlSh"><i class="icon twitter"></i>Tell your friends</a>
|
||||||
</aside>
|
</aside>
|
||||||
<div id="title">
|
<div id="title">
|
||||||
<img id="logo" src="img/jrnl_white.svg" width="90px" height="98px" title="jrnl" />
|
<img id="logo" src="img/jrnl_white.svg" width="90px" height="98px" title="jrnl" />
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
<nav>
|
<nav>
|
||||||
<a href="overview">Documentation</a>
|
<a href="overview">Documentation</a>
|
||||||
<a href="http://github.com/jrnl-org/jrnl" title="View on Github">Fork me on GitHub</a>
|
<a href="http://github.com/jrnl-org/jrnl" title="View on Github">Fork me on GitHub</a>
|
||||||
<a id="twitter-nav" href="https://twitter.com/intent/tweet?text=Write+your+memoirs+on+the+command+line.+Like+a+boss.+%23jrnl&url=http%3A%2F%2Fjrnl.sh">Tell your friends on twitter</a>
|
<a id="twitter-nav" href="https://twitter.com/intent/tweet?text=Collect+your+thoughts+and+notes+without+leaving+the+command+line.+https%3A%2F%2Fjrnl.sh+via+@JrnlSh"><i class="icon twitter"></i>Tell your friends on Twitter</a>
|
||||||
<a href="installation" class="cta">Download</a>
|
<a href="installation" class="cta">Download</a>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
jrnl is made with love by <a rel="author" href="http://www.1450.me">Manuel Ebert</a> and <a href="https://github.com/jrnl-org/jrnl/graphs/contributors" title="Contributors">many other fabulous people</a>. If you need help, <a href="https://github.com/jrnl-org/jrnl/issues/new" title="Open a new issue on Github">submit an issue</a> on Github.
|
jrnl is made with love by <a href="https://github.com/jrnl-org/jrnl/graphs/contributors" title="Contributors">many fabulous people</a>. If you need help, <a href="https://github.com/jrnl-org/jrnl/issues/new" title="Open a new issue on Github">submit an issue</a> on Github.
|
||||||
</footer>
|
</footer>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/typed.js/2.0.10/typed.min.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/typed.js/2.0.10/typed.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -129,7 +129,7 @@ Feature: Exporting a Journal
|
||||||
"""
|
"""
|
||||||
title: I have an @idea:
|
title: I have an @idea:
|
||||||
date: 2013-04-09 15:39
|
date: 2013-04-09 15:39
|
||||||
stared: False
|
starred: False
|
||||||
tags: idea, journal
|
tags: idea, journal
|
||||||
|
|
||||||
(1) write a command line @journal software
|
(1) write a command line @journal software
|
||||||
|
|
|
@ -97,4 +97,14 @@ Feature: Tagging
|
||||||
| Text before @tag. And After.
|
| Text before @tag. And After.
|
||||||
| @hi. Hello
|
| @hi. Hello
|
||||||
| hi Hello
|
| hi Hello
|
||||||
|
"""
|
||||||
|
|
||||||
|
Scenario: Searching a journal for tags should display entries with that tag.
|
||||||
|
Given we use the config "tags.yaml"
|
||||||
|
When we run "jrnl @dan"
|
||||||
|
Then the output should be
|
||||||
|
"""
|
||||||
|
2013-06-10 15:40 I met with @dan.
|
||||||
|
| As alway's he shared his latest @idea on how to rule the world with me.
|
||||||
|
| inst
|
||||||
"""
|
"""
|
|
@ -8,6 +8,7 @@ import re
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import time
|
import time
|
||||||
import fnmatch
|
import fnmatch
|
||||||
|
from pathlib import Path
|
||||||
import plistlib
|
import plistlib
|
||||||
import pytz
|
import pytz
|
||||||
import uuid
|
import uuid
|
||||||
|
@ -43,7 +44,7 @@ class DayOne(Journal.Journal):
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
with open(filename, "rb") as plist_entry:
|
with open(filename, "rb") as plist_entry:
|
||||||
try:
|
try:
|
||||||
dict_entry = plistlib.readPlist(plist_entry)
|
dict_entry = plistlib.load(plist_entry, fmt=plistlib.FMT_XML)
|
||||||
except self.PLIST_EXCEPTIONS:
|
except self.PLIST_EXCEPTIONS:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
@ -84,8 +85,10 @@ class DayOne(Journal.Journal):
|
||||||
if not hasattr(entry, "uuid"):
|
if not hasattr(entry, "uuid"):
|
||||||
entry.uuid = uuid.uuid1().hex
|
entry.uuid = uuid.uuid1().hex
|
||||||
|
|
||||||
filename = os.path.join(
|
fn = (
|
||||||
self.config["journal"], "entries", entry.uuid.upper() + ".doentry"
|
Path(self.config["journal"])
|
||||||
|
/ "entries"
|
||||||
|
/ (entry.uuid.upper() + ".doentry")
|
||||||
)
|
)
|
||||||
|
|
||||||
entry_plist = {
|
entry_plist = {
|
||||||
|
@ -99,7 +102,9 @@ class DayOne(Journal.Journal):
|
||||||
for tag in entry.tags
|
for tag in entry.tags
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
plistlib.writePlist(entry_plist, filename)
|
# plistlib expects a binary object
|
||||||
|
with fn.open(mode="wb") as f:
|
||||||
|
plistlib.dump(entry_plist, f, fmt=plistlib.FMT_XML, sort_keys=False)
|
||||||
for entry in self._deleted_entries:
|
for entry in self._deleted_entries:
|
||||||
filename = os.path.join(
|
filename = os.path.join(
|
||||||
self.config["journal"], "entries", entry.uuid + ".doentry"
|
self.config["journal"], "entries", entry.uuid + ".doentry"
|
||||||
|
|
|
@ -104,10 +104,10 @@ class YAMLExporter(TextExporter):
|
||||||
# source directory is entry.journal.config['journal']
|
# source directory is entry.journal.config['journal']
|
||||||
# output directory is...?
|
# output directory is...?
|
||||||
|
|
||||||
return "title: {title}\ndate: {date}\nstared: {stared}\ntags: {tags}\n{dayone} {body} {space}".format(
|
return "title: {title}\ndate: {date}\nstarred: {starred}\ntags: {tags}\n{dayone} {body} {space}".format(
|
||||||
date=date_str,
|
date=date_str,
|
||||||
title=entry.title,
|
title=entry.title,
|
||||||
stared=entry.starred,
|
starred=entry.starred,
|
||||||
tags=", ".join([tag[1:] for tag in entry.tags]),
|
tags=", ".join([tag[1:] for tag in entry.tags]),
|
||||||
dayone=dayone_attributes,
|
dayone=dayone_attributes,
|
||||||
body=newbody,
|
body=newbody,
|
||||||
|
|
|
@ -228,7 +228,7 @@ def highlight_tags_with_background_color(entry, text, color, is_title=False):
|
||||||
text_fragments = []
|
text_fragments = []
|
||||||
for tag in entry.journal.search_tags:
|
for tag in entry.journal.search_tags:
|
||||||
text_fragments.extend(
|
text_fragments.extend(
|
||||||
re.split(re.compile(re.escape(tag), re.IGNORECASE), text)
|
re.split(re.compile(f"({re.escape(tag)})", re.IGNORECASE), text)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
text_fragments = re.split(entry.tag_regex(config["tagsymbols"]), text)
|
text_fragments = re.split(entry.tag_regex(config["tagsymbols"]), text)
|
||||||
|
|
Loading…
Add table
Reference in a new issue