Skip to content

Commit

Permalink
Merge branch 'release/v0.18.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
lucc committed Dec 11, 2022
2 parents 3df49b4 + a333c33 commit 96f15c0
Show file tree
Hide file tree
Showing 45 changed files with 1,796 additions and 942 deletions.
139 changes: 139 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: ci

on: [push, pull_request]

jobs:

tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
python -m pip install .
- name: Run tests
run: python setup.py test

type-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .
python -m pip install mypy
python -m pip install types-atomicwrites
- name: Run the type checker
run: mypy --ignore-missing-imports khard

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[doc]
- name: Build the documentation
run: |
python setup.py build
make -C doc html man
#
#
##-------------------------------------- python package
#
## This workflow will install Python dependencies, run tests and lint with a variety of Python versions
## For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# Python-package-build:
#
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# python-version: ["3.8", "3.9", "3.10"]
#
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# python -m pip install flake8
# python -m pip install .
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings.
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Run tests
# run: python setup.py test
#
##-------------------------------------- python app
#
## This workflow will install Python dependencies, run tests and lint with a single version of Python
## For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# Python-application-build:
#
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python 3.10
# uses: actions/setup-python@v2
# with:
# python-version: "3.10"
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install flake8 pytest
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# run: |
# pytest
#
##-------------------------------------- python lint
# Pylint-build:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.8", "3.9", "3.10"]
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install pylint
# - name: Analysing the code with pylint
# run: |
# pylint $(git ls-files '*.py')
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ doc/source/examples/template.yaml
.pytest_cache
__pycache__
khard.egg-info
result
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

15 changes: 15 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
Change Log
==========

v0.18.0: 2022-12-10
- Move project home on GitHub from @scheibler to @lucc
- Catch exceptions when loading the config (#294)
- Split $EDITOR env variable on spaces (#314)
- Add special phone number field query
- Add-email command improved: Attach email address to an existing contact
- Add-email command: new option --skip-already-added
- Add partial support for KIND: search query, display in details and listing (#309)
- Add show_kinds config option (#309)
- Add nix flake
- Remove support for python 3.6
- Remove deprecated subcommands "export" and "source"
- Switch from Travis to GitHub CI


v0.17.0: 2020-08-13
- Do not modify (clean up) search query to find more matches (4583efd)
- Remove special search handling for phone numbers (a570a85)
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Please stick to the following standards when you open pull requests:
- Khard has a test suite, please provide tests for bugs that you fix and also
for new code and new features that are introduced.
- Please verify *all* tests pass before sending a pull request, they will be
checked again by travis but it might be a lot faster to check locally first:
checked again in CI but it might be a lot faster to check locally first:
|travis|

Development
Expand Down Expand Up @@ -71,9 +71,9 @@ to do so.
.. _master: https://github.com/lucc/khard/tree/master
.. _PEP 8: https://www.python.org/dev/peps/pep-0008/
.. _pylint: https://pylint.readthedocs.io/en/latest/
.. |travis| image:: https://travis-ci.org/scheibler/khard.svg?branch=develop
:target: https://travis-ci.org/scheibler/khard
:alt: build status
.. |travis| image:: https://github.com/lucc/khard/actions/workflows/ci.yml/badge.svg
:target: https://github.com/lucc/khard/actions/workflows/ci.yml
:alt: ci status
.. _Vincent's branching model:
http://nvie.com/posts/a-successful-git-branching-model/
.. _virtualenv: https://virtualenv.pypa.io/en/stable/
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ khard
=====

Khard is an address book for the Unix console. It creates, reads, modifies and
removes carddav address book entries at your local machine. Khard is also
removes vCard address book entries at your local machine. Khard is also
compatible to the email clients mutt and alot and the SIP client twinkle. You
can find more information about khard and the whole synchronization process
[here][blog].
Expand Down Expand Up @@ -47,7 +47,7 @@ the `doc` directory.
Development
-----------

[![Build Status][travis-badge]][travis]
[![ci-badge]][ci]

Khard is developed [on GitHub](https://github.com/lucc/khard) where you
are welcome to post [bug reports](https://github.com/lucc/khard/issues)
Expand All @@ -74,5 +74,5 @@ If you need a console based calendar too, try out
[repos-badge]: https://repology.org/badge/tiny-repos/khard.svg
[docs]: https://khard.readthedocs.io/en/latest/
[docs-badge]: https://readthedocs.org/projects/khard/badge/?version=latest
[travis]: https://travis-ci.org/scheibler/khard
[travis-badge]: https://travis-ci.org/scheibler/khard.svg?branch=develop
[ci]: https://github.com/lucc/khard/actions/workflows/ci.yml
[ci-badge]: https://github.com/lucc/khard/actions/workflows/ci.yml/badge.svg
10 changes: 5 additions & 5 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def update_template_file():
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'autoapi.extension',
'sphinx.ext.autodoc',
'autoapi.extension', # https://sphinx-autoapi.readthedocs.io/en/latest/
'sphinx.ext.autodoc', # https://pypi.org/project/sphinx-autodoc-typehints/
'sphinx.ext.autosectionlabel',
'sphinx.ext.todo',
'sphinx_autodoc_typehints',
'sphinx_autodoc_typehints', # https://pypi.org/project/sphinx-autodoc-typehints/
]

autoapi_type = 'python'
Expand Down Expand Up @@ -89,7 +89,7 @@ def update_template_file():
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -134,7 +134,7 @@ def update_template_file():
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('man/khard', 'khard', 'Console carddav client', '', 1),
('man/khard', 'khard', 'Console address book manager', '', 1),
('man/khard.conf', 'khard.conf', 'configuration file for khard', '', 5),
]

Expand Down
2 changes: 2 additions & 0 deletions doc/source/examples/khard.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ reverse = no
show_nicknames = no
# show uid table column: yes / no
show_uids = yes
# show kind table column: yes / no
show_kinds = no
# sort by first or last name: first_name / last_name / formatted_name
sort = last_name
# localize dates: yes / no
Expand Down
7 changes: 5 additions & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Welcome to khard's documentation!
indices

Khard is an address book for the Unix command line. It can read, create,
modify and delete carddav address book entries. Khard only works with a local
store of VCARD files. It is intended to be used in conjunction with other
modify and delete vCard address book entries. Khard only works with a local
store of vCard files. It is intended to be used in conjunction with other
programs like an email client, text editor, vdir synchronizer or VOIP client.


Expand All @@ -36,6 +36,9 @@ manually you can use the release from `PyPi`_:
If you want to help the development or need more advanced installation
instructions see :doc:`contributing`.

If you need a tarball use the one from `PyPi`_ and not from the Github release
page. These are missing an auto generated python file.

.. _PyPi: https://pypi.python.org/pypi/khard/

Configuration
Expand Down
17 changes: 9 additions & 8 deletions doc/source/man/khard.conf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ general
This section allows one to configure some general features about khard. The
following keys are available in this section:

- *debug*: a boolean indication weather the logging level should be set to
- *debug*: a boolean indication whether the logging level should be set to
*debug* by default (same effect as the :option:`--debug` option on the
command line)
- *default_action*: the default action/subcommand to use if the first non
Expand All @@ -66,22 +66,23 @@ contact table

- *display*: which part of the name to use in listings; this can be one of
``first_name``, ``last_name`` or ``formatted_name``
- *group_by_addressbook*: weather or not to group contacts by address book in
- *group_by_addressbook*: whether or not to group contacts by address book in
listings
- *localize_dates*: weather to localize dates or to use ISO date formats
- *localize_dates*: whether to localize dates or to use ISO date formats
- *preferred_email_address_type*: labels of email addresses to prefer
- *preferred_phone_number_type*: labels of telephone numbers to prefer
- *reverse*: weather to reverse the order of contact listings or not
- *show_nicknames*: weather to show nick names
- *show_uids*: weather to show uids
- *reverse*: whether to reverse the order of contact listings or not
- *show_nicknames*: whether to show nick names
- *show_uids*: whether to show uids
- *show_kinds*: whether to show kinds
- *sort*: field by which to sort contact listings

vcard
- *private_objects*: a list of strings, these are the names of private vCard
fields (starting with ``X-``) that will be loaded and displayed by khard
- *search_in_source_files*: weather to search in the vcard files before
- *search_in_source_files*: whether to search in the vcard files before
parsing them in order to speed up searches
- *skip_unparsable*: weather to skip unparsable vcards, otherwise khard exits
- *skip_unparsable*: whether to skip unparsable vcards, otherwise khard exits
on the first unparsable card it encounters
- *preferred_version*: the preferred vcard version to use for new cards

Expand Down
8 changes: 2 additions & 6 deletions doc/source/man/khard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Description
-----------

:program:`khard` is an address book for the Unix command line. It can read, create,
modify and delete carddav address book entries. :program:`khard` only works with a local
store of VCARD files. It is intended to be used in conjunction with other
modify and delete vCard address book entries. :program:`khard` only works with a local
store of vCard files. It is intended to be used in conjunction with other
programs like an email client, text editor, vdir synchronizer or VOIP client.

Options
Expand Down Expand Up @@ -78,8 +78,6 @@ These subcommands display detailed information about one subcommand.
show
display detailed information about one contact, supported output formats
are "pretty", "yaml" and "vcard"
export
DEPRECATED, use ``show --format=yaml`` instead

Modifying subcommands
~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -102,8 +100,6 @@ move
move a contact to a different addressbook
remove
remove a contact
source
DEPRECATED, use ``edit --format=vcard`` instead

Other subcommands
~~~~~~~~~~~~~~~~~
Expand Down
8 changes: 8 additions & 0 deletions doc/source/scripting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ lines to your muttrc file:
"<pipe-message>khard add-email<return>" \
"add the sender email address to khard"
If you want to search for email addresses in specific header fields, append the "--header" parameter:

.. code-block::
macro index,pager A \
"<pipe-message>khard add-email --headers=from,cc --skip-already-added<return>" \
"add the sender and cc email addresses to khard"
Then navigate to an email message in mutt's index view and press "A" to start
the address import dialog.

Expand Down
Loading

0 comments on commit 96f15c0

Please sign in to comment.