Skip to content

Commit

Permalink
Update to v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
HubTou authored Jun 22, 2024
1 parent c7d6d36 commit 186611f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![PyPI package](https://repology.org/badge/version-for-repo/pypi/python:oab.svg)](https://repology.org/project/python:oab/versions)
[![Servier Inspired](https://raw.githubusercontent.com/servierhub/.github/main/badges/inspired.svg)](https://github.com/ServierHub/)

# OAB(1)
# OAB

## NAME
oab - Microsoft Exchange/Outlook Offline Address Book (.oab files) decoder
Expand Down Expand Up @@ -50,7 +50,7 @@ The style used for JSON files can be changed to compact mode with the *--compact
or with an indentation different from 4 spaces with the argument of the *--indent|-i* option.

The terminal width used for the pretty table files can be changed from the default 80 columns to the argument of the *--width|-w* option.
You should especially use this option When redirecting the program output to a file...
You should especially use this option when redirecting the program output to a file...

Last and least, you can disable the progress bar with the *--bar|-b* option.

Expand All @@ -61,25 +61,25 @@ the others for converting its result into another format:
```Python
import oab

# data is a dict
# filename is a str. For example, "udetails.oab"
# progress_bar is a bool
data = oab.load_oab_file(filename, progress_bar=False)
# filename is a str. For example, "udetails.oab"
# the optional progress_bar is a bool
# data will be a dict

users, lists = oab.oab2csv(data, delimiter)
# delimiter is a str, normally for a single character
# users and lists will be list instances
users, lists = oab.oab2csv(data, delimiter)

# basename is a str. For example, "address_book"
oab.oab2excel(data, basename)
# basename is a str. For example, "address_book"

# compact is a bool
# indent is an int
json_data = oab.oab2json(data, compact=False, indent=2)
# the optional compact is a bool
# the optional indent is an int. It's used when compact=False

# width is an int
# users and lists will be prettytable instances
users, lists = oab2table(data, width=173)
# the optional width is an int
# users and lists will be prettytable instances
```

### OPTIONS
Expand All @@ -101,7 +101,8 @@ Options | Use
--|Options processing terminator

## ENVIRONMENT
The COLUMNS environment variable will be used in tabular format if present.
The COLUMNS environment variable will be used in tabular format if present
and output is not redirected to a file.

## EXIT STATUS
The **oab** utility exits 0 on success, and >0 if an error occurs.
Expand Down Expand Up @@ -130,7 +131,7 @@ The **oab** utility is not a standard UNIX command.
This implementation tries to follow the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guide for [Python](https://www.python.org/) code.

## PORTABILITY
To be tested under Windows.
Tested OK under Windows.

## HISTORY
This program was made on a rainy sunday in order to investigate the contents of my Outlook .oab files.
Expand All @@ -148,7 +149,9 @@ This program is inspired by antimatter15's [boa](https://github.com/antimatter15
* [Wolph@StackOverflow](https://stackoverflow.com/users/54017/wolph)

## CAVEAT
Only uncompressed version 4 full details files are supported at this time.
Only uncompressed version 4 full details files are fully supported at this time.

Some of the address books properties are undocumented and will appear as numbers.

## BUGS
Excel reports an error while opening generated XLSX files,
Expand Down
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Feel free to [submit your own ideas!](https://github.com/HubTou/oab/discussions)

## Possible evolutions
* Export in XML format
* Load file from default location
* C:\Users\{current user}\AppData\Local\Microsoft\Outlook\Offline Address Books\{uuid}\udetails.oab

## Unprobable evolutions
* Support of:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = oab
description = Offline Address Books decoder
long_description = file: README.md
long_description_content_type = text/markdown
version = 1.0.0
version = 1.0.1
license = BSD 3-Clause License
license_files = LICENSE
author = Hubert Tournier
Expand Down
2 changes: 1 addition & 1 deletion src/oab/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def _read_OAB_V4_REC(file, atts_count, attributes):
def load_oab_file(path_name, progress_bar=False):
""" Returns a dictionary with the OAB file contents """
data = {"path_name": path_name}
data["name"] = re.sub(f".*{os.sep}", "", path_name)
data["name"] = os.path.basename(path_name)

# Determining file type
data["type"] = _get_file_type(data["name"])
Expand Down
2 changes: 1 addition & 1 deletion src/oab/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from .table_output import oab2table

# Version string used by the what(1) and ident(1) commands:
ID = "@(#) $Id: oab - Offline Address Books decoder v1.0.0 (June 21, 2024) by Hubert Tournier $"
ID = "@(#) $Id: oab - Offline Address Books decoder v1.0.1 (June 22, 2024) by Hubert Tournier $"

# Default parameters. Can be overcome by environment variables, then command line options
parameters = {
Expand Down

0 comments on commit 186611f

Please sign in to comment.