Skip to content

Commit

Permalink
Merge pull request #32 from Prayag2/bug_fix
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
Prayag2 authored Mar 18, 2021
2 parents 062ce23 + a4687c5 commit 1b56347
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 10 deletions.
33 changes: 28 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,27 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## [Unreleased]


### Added
## [1.1.9] - 2021-03-18
### Fixes
- Fixes [#26](https://github.com/Prayag2/konsave/issues/26)
- Prints help when entering "konsave" without any arguments

- ``CHANGELOG.md`` file with (Keep a Changelog)[https://keepachangelog.com/en/1.0.0/] format.
## [1.1.8] - 2021-03-18
### Changes
- Add missing new lines at end of `.pylintrc` and `CONTRIBUTION.md`.
- Gitignore:
- Common VS Code and JetBrains IDE user-specific stuff.
- All `__pycache__` dirs (`**/__pycache__`).
- Delete and untrack all `*.pyc` files.
- Reformat and improve some docstrings.
- Remove some excessive comments, e.g. `## IMPORTS ##` or `# WIPE`. The import section is clear and visible enough to not need such additional comment. Same with functions - docstrings do that job well.
- Refactor and simplify CLI argument parsing.
- Adapt `setup.py` to use pip requirement text files.
- Create extra `dev` and corresponding `requirements_dev.txt` requirement text file. Can be installed via `pip install -e .[dev]` or from PyPI via `pip install konsave[dev]`.
- Remove "Dependencies" section from `README.md` - dependencies get installed automatically anyway.

## [1.1.7] - 2021-03-13
### Fixes
Expand All @@ -24,10 +40,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed docstring style to [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html)
- Updated README

## Additions
### Additions
- Added a CONTRIBUTIONS.md

## Fixes
### Fixes
- Fixed a possible bug. Refer to [#26](https://github.com/Prayag2/konsave/issues/26).

## [1.1.5] - 2021-03-08
Expand Down Expand Up @@ -100,6 +116,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- You can also import ".knsv" files as profiles!


[1.1.9]: https://github.com/Prayag2/konsave/compare/v1.1.8...v1.1.9
[1.1.8]: https://github.com/Prayag2/konsave/compare/v1.1.7...v1.1.8
[1.1.7]: https://github.com/Prayag2/konsave/compare/v1.1.6...v1.1.7
[1.1.6]: https://github.com/Prayag2/konsave/compare/v1.1.5...v1.1.6
[1.1.5]: https://github.com/Prayag2/konsave/compare/v1.1.4...v1.1.5
[1.1.4]: https://github.com/Prayag2/konsave/compare/v1.1.3...v1.1.4
[1.1.3]: https://github.com/Prayag2/konsave/compare/v1.1.2...v1.1.3
[1.1.2]: https://github.com/Prayag2/konsave/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/Prayag2/konsave/compare/v1.1.0...v1.1.1
Expand All @@ -112,3 +134,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[1.0.2]: https://github.com/Prayag2/konsave/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/Prayag2/konsave/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/Prayag2/konsave/compare/6b4a0c0bbf8c29684cc2a334065314bc8e4ea529...v1.0.0
[Unreleased]: https://github.com/Prayag2/konsave/compare/v1.0.0...HEAD
3 changes: 2 additions & 1 deletion konsave/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def _get_parser() -> argparse.ArgumentParser:

def main():
"""The main function that handles all the arguments and options."""
args = _get_parser().parse_args()
parser = _get_parser()
args = parser.parse_args()

if args.list:
list_profiles(list_of_profiles, length_of_lop)
Expand Down
8 changes: 5 additions & 3 deletions konsave/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import os
import shutil
import sys
import configparser
from random import shuffle
from zipfile import is_zipfile, ZipFile
Expand Down Expand Up @@ -41,7 +40,6 @@ def inner_func(*args, **kwargs):
function = func(*args, **kwargs)
except Exception as error:
print(f"Konsave: {error}\nTry 'konsave -h' for more info!")
sys.exit(0)
else:
return function

Expand Down Expand Up @@ -128,7 +126,7 @@ def copy(source, dest):
source: the source destination
dest: the destination to copy the file/folder to
"""
assert type(source) == str and type(dest) == str, "Invalid path"
assert isinstance(source, str) and isinstance(dest, str), "Invalid path"
assert source != dest, "Source and destination can't be same"
assert os.path.exists(source), "Source path doesn't exist"

Expand Down Expand Up @@ -306,6 +304,8 @@ def check_path_and_copy(path1, path2, export_location, name):
usr_icon_dir = os.path.join("/usr/share/icons", icon)
log("Exporting icon theme")
check_path_and_copy(local_icon_dir, usr_icon_dir, icon_export_path, icon)
else:
log("Skipping icon theme...")

if cursor is not None:
local_cursor_dir = os.path.join(HOME, ".icons", cursor)
Expand All @@ -314,6 +314,8 @@ def check_path_and_copy(path1, path2, export_location, name):
check_path_and_copy(
local_cursor_dir, usr_cursor_dir, cursor_export_path, cursor
)
else:
log("Skipping cursors...")

plasma_dir = os.path.join(HOME, ".local/share/plasma")

Expand Down
2 changes: 1 addition & 1 deletion konsave/vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
length_of_lop = len(list_of_profiles)

# Current Version
VERSION = "1.1.7"
VERSION = "1.1.9"

0 comments on commit 1b56347

Please sign in to comment.