Lockfile merge (#7)

* Add brew and gitter badges to README

* Update changelog [ci skip]

* Make journal selection behavior more consistent when there's a colon with no date (#1164)

* Bump pytest from 6.2.1 to 6.2.2 (#1167)

Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.2.1...6.2.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump keyring from 21.8.0 to 22.0.1 (#1168)

Bumps [keyring](https://github.com/jaraco/keyring) from 21.8.0 to 22.0.1.
- [Release notes](https://github.com/jaraco/keyring/releases)
- [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst)
- [Commits](https://github.com/jaraco/keyring/compare/v21.8.0...v22.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update changelog [ci skip]

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
Co-authored-by: Jrnl Bot <jrnl.bot@gmail.com>
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Suhas 2021-02-01 13:22:55 -05:00 committed by GitHub
parent a51db6c614
commit d55fa4134a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 12 deletions

View file

@ -1,5 +1,22 @@
# Changelog # Changelog
## [Unreleased](https://github.com/jrnl-org/jrnl/)
[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7...HEAD)
**Implemented enhancements:**
- Allow timestamps in command line for new entries with editor [\#1083](https://github.com/jrnl-org/jrnl/issues/1083)
**Fixed bugs:**
- Make journal selection behavior more consistent when there's a colon with no date [\#1164](https://github.com/jrnl-org/jrnl/pull/1164) ([wren](https://github.com/wren))
**Packaging:**
- Bump keyring from 21.8.0 to 22.0.1 [\#1168](https://github.com/jrnl-org/jrnl/pull/1168) ([dependabot[bot]](https://github.com/apps/dependabot))
- Bump pytest from 6.2.1 to 6.2.2 [\#1167](https://github.com/jrnl-org/jrnl/pull/1167) ([dependabot[bot]](https://github.com/apps/dependabot))
## [v2.7](https://pypi.org/project/jrnl/v2.7/) (2021-01-23) ## [v2.7](https://pypi.org/project/jrnl/v2.7/) (2021-01-23)
[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7-beta...v2.7) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7-beta...v2.7)

View file

@ -8,6 +8,8 @@ jrnl
[![Testing](https://github.com/jrnl-org/jrnl/workflows/Testing/badge.svg)](https://github.com/jrnl-org/jrnl/actions?query=workflow%3ATesting) [![Testing](https://github.com/jrnl-org/jrnl/workflows/Testing/badge.svg)](https://github.com/jrnl-org/jrnl/actions?query=workflow%3ATesting)
[![Downloads](https://pepy.tech/badge/jrnl)](https://pepy.tech/project/jrnl) [![Downloads](https://pepy.tech/badge/jrnl)](https://pepy.tech/project/jrnl)
[![Version](http://img.shields.io/pypi/v/jrnl.svg?style=flat)](https://pypi.python.org/pypi/jrnl/) [![Version](http://img.shields.io/pypi/v/jrnl.svg?style=flat)](https://pypi.python.org/pypi/jrnl/)
[![Homebrew](https://img.shields.io/homebrew/v/jrnl?style=flat-square)](https://formulae.brew.sh/formula/jrnl)
[![Gitter](https://img.shields.io/gitter/room/jrnl-org/jrnl)](https://gitter.im/jrnl-org/jrnl)
==== ====
_To get help, [submit an issue](https://github.com/jrnl-org/jrnl/issues/new/choose) on _To get help, [submit an issue](https://github.com/jrnl-org/jrnl/issues/new/choose) on

View file

@ -29,6 +29,20 @@ Feature: Multiple journals
And journal "work" should have 1 entry And journal "work" should have 1 entry
And journal "work" should contain "2012-07-23" And journal "work" should contain "2012-07-23"
Scenario: Write to specified journal without a timestamp but with colon
Given we use the config "multiple.yaml"
When we run "jrnl work : a long day in the office"
Then journal "default" should have 2 entries
And journal "work" should have 1 entry
And journal "work" should contain "a long day in the office"
Scenario: Write to specified journal without a timestamp but with colon
Given we use the config "multiple.yaml"
When we run "jrnl work: a long day in the office"
Then journal "default" should have 2 entries
And journal "work" should have 1 entry
And journal "work" should contain "a long day in the office"
Scenario: Create new journals as required Scenario: Create new journals as required
Given we use the config "multiple.yaml" Given we use the config "multiple.yaml"
Then journal "ideas" should not exist Then journal "ideas" should not exist

View file

@ -138,10 +138,18 @@ def update_config(config, new_config, scope, force_local=False):
def get_journal_name(args, config): def get_journal_name(args, config):
args.journal_name = DEFAULT_JOURNAL_KEY args.journal_name = DEFAULT_JOURNAL_KEY
if args.text and args.text[0] in config["journals"]:
args.journal_name = args.text[0] # The first arg might be a journal name
if args.text:
potential_journal_name = args.text[0]
if potential_journal_name[-1] == ":":
potential_journal_name = potential_journal_name[0:-1]
if potential_journal_name in config["journals"]:
args.journal_name = potential_journal_name
args.text = args.text[1:] args.text = args.text[1:]
elif DEFAULT_JOURNAL_KEY not in config["journals"]:
if args.journal_name not in config["journals"]:
print("No default journal configured.", file=sys.stderr) print("No default journal configured.", file=sys.stderr)
print(list_journals(config), file=sys.stderr) print(list_journals(config), file=sys.stderr)
sys.exit(1) sys.exit(1)

10
poetry.lock generated
View file

@ -966,14 +966,8 @@ pyparsing = [
pytest = [ pytest = [
{file = "pytest-6.2.2-py3-none-any.whl", hash = "sha256:b574b57423e818210672e07ca1fa90aaf194a4f63f3ab909a2c67ebb22913839"}, {file = "pytest-6.2.2-py3-none-any.whl", hash = "sha256:b574b57423e818210672e07ca1fa90aaf194a4f63f3ab909a2c67ebb22913839"},
{file = "pytest-6.2.2.tar.gz", hash = "sha256:9d1edf9e7d0b84d72ea3dbcdfd22b35fb543a5e8f2a60092dd578936bf63d7f9"}, {file = "pytest-6.2.2.tar.gz", hash = "sha256:9d1edf9e7d0b84d72ea3dbcdfd22b35fb543a5e8f2a60092dd578936bf63d7f9"},
]
pytest-cov = [
{file = "pytest-cov-2.11.1.tar.gz", hash = "sha256:359952d9d39b9f822d9d29324483e7ba04a3a17dd7d05aa6beb7ea01e359e5f7"},
{file = "pytest_cov-2.11.1-py2.py3-none-any.whl", hash = "sha256:bdb9fdb0b85a7cc825269a4c56b48ccaa5c7e365054b6038772c32ddcdc969da"},
]
pytest-mock = [
{file = "pytest-mock-3.5.1.tar.gz", hash = "sha256:a1e2aba6af9560d313c642dae7e00a2a12b022b80301d9d7fc8ec6858e1dd9fc"},
{file = "pytest_mock-3.5.1-py3-none-any.whl", hash = "sha256:379b391cfad22422ea2e252bdfc008edd08509029bcde3c25b2c0bd741e0424e"},
] ]
python-dateutil = [ python-dateutil = [
{file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"},