Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non existing entry creation #32

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.10.15

- Press CTRL+G when searching for an entry, that doesn't exist yet, to auto generate it and save it with GPT3
- Fixing is_linux() and url entry behaviour on linux

## 0.10.14

- Added examples for body generation
Expand All @@ -9,10 +14,10 @@

## 0.10.13

-Adding support for XFCE
-Removing more legacy i3 Code
-New is_linux function
-Changing default browser logic
- Adding support for XFCE
- Removing more legacy i3 Code
- New is_linux function
- Changing default browser logic


## 0.10.11
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "python-search"
version = "0.10.14"
version = "0.10.15"

description = "Build your knowledge database in python and retrieve it efficiently"
authors = ["Jean Carlo Machado <machado.c.jean@gmail.com>"]
Expand Down
3 changes: 3 additions & 0 deletions python_search/apps/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def open_shell_cmd(
if browser == "firefox":
return self._firefox(url_expr)

if is_linux():
return self._firefox(url_expr)

return self._chrome(url_expr)

def _firefox(self, url):
Expand Down
2 changes: 1 addition & 1 deletion python_search/entry_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ def generate_body(self, entry_description, body_size=500):
if __name__ == "__main__":

import fire
fire.Fire(EntryGenerator())
fire.Fire(EntryGenerator())
2 changes: 1 addition & 1 deletion python_search/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ def is_archlinux():


def is_linux():
return 0 == os.system("/etc/*release | grep -i linux")
return 0 == os.system("cat /etc/*release | grep -i linux")
1 change: 1 addition & 0 deletions python_search/search_ui/fzf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def get_cmd(self):
--bind "esc:+clear-query" \
--bind "ctrl-k:abort" \
--bind "ctrl-d:abort" \
--bind "ctrl-g:execute-silent:(prompt_editor --prompt_text {{q}})" \
{self._get_fzf_theme()} ; exit 0
'
"""
Expand Down