litdb 2.1.3__tar.gz → 2.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {litdb-2.1.3 → litdb-2.1.4}/PKG-INFO +3 -1
- {litdb-2.1.3 → litdb-2.1.4}/README.org +1 -0
- {litdb-2.1.3 → litdb-2.1.4}/pyproject.toml +3 -2
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/cli.py +4 -7
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/images.py +5 -1
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb.egg-info/PKG-INFO +3 -1
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb.egg-info/requires.txt +1 -0
- {litdb-2.1.3 → litdb-2.1.4}/setup.cfg +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/__init__.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/app.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/audio.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/bibtex.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/chat.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/coa.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/db.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/gpt.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/lab.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/openalex.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/pdf.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/utils.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb/youtube.py +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb.egg-info/SOURCES.txt +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb.egg-info/dependency_links.txt +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb.egg-info/entry_points.txt +0 -0
- {litdb-2.1.3 → litdb-2.1.4}/src/litdb.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: litdb
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.4
|
|
4
4
|
Summary: A literature database tool with GPT integration.
|
|
5
5
|
Author-email: John Kitchin <jkitchin@andrew.cmu.edu>
|
|
6
6
|
Maintainer-email: John Kitchin <jkitchin@andrew.cmu.edu>
|
|
@@ -42,6 +42,7 @@ Requires-Dist: webvtt-py
|
|
|
42
42
|
Requires-Dist: streamlit
|
|
43
43
|
Requires-Dist: pyperclip
|
|
44
44
|
Requires-Dist: PIL
|
|
45
|
+
Requires-Dist: pillow_heif
|
|
45
46
|
|
|
46
47
|
#+title: litdb - a literature and document database
|
|
47
48
|
|
|
@@ -64,6 +65,7 @@ The idea is you add papers to your database, and then you can search it with nat
|
|
|
64
65
|
6. https://youtube.com/live/SUtvtc7l6y0 litdb + GPT enhancements
|
|
65
66
|
7. https://youtube.com/live/3FZ1ROnCC6Y litdb + LiteLLM and streamlit
|
|
66
67
|
8. https://www.youtube.com/live/IKKTQSTXQmc litdb + Youtube and audio
|
|
68
|
+
9. https://youtube.com/live/MEf9rPI0Z1M litdb + Image search with text and image queries using CLIP
|
|
67
69
|
|
|
68
70
|
** installation
|
|
69
71
|
|
|
@@ -19,6 +19,7 @@ The idea is you add papers to your database, and then you can search it with nat
|
|
|
19
19
|
6. https://youtube.com/live/SUtvtc7l6y0 litdb + GPT enhancements
|
|
20
20
|
7. https://youtube.com/live/3FZ1ROnCC6Y litdb + LiteLLM and streamlit
|
|
21
21
|
8. https://www.youtube.com/live/IKKTQSTXQmc litdb + Youtube and audio
|
|
22
|
+
9. https://youtube.com/live/MEf9rPI0Z1M litdb + Image search with text and image queries using CLIP
|
|
22
23
|
|
|
23
24
|
** installation
|
|
24
25
|
|
|
@@ -7,7 +7,7 @@ where = ["src"]
|
|
|
7
7
|
|
|
8
8
|
[project]
|
|
9
9
|
name = "litdb"
|
|
10
|
-
version = "2.1.
|
|
10
|
+
version = "2.1.4"
|
|
11
11
|
authors = [
|
|
12
12
|
{name = "John Kitchin", email = "jkitchin@andrew.cmu.edu"},
|
|
13
13
|
]
|
|
@@ -65,7 +65,8 @@ dependencies = [
|
|
|
65
65
|
|
|
66
66
|
# image clip search
|
|
67
67
|
"pyperclip",
|
|
68
|
-
"PIL"
|
|
68
|
+
"PIL",
|
|
69
|
+
"pillow_heif"
|
|
69
70
|
]
|
|
70
71
|
|
|
71
72
|
[project.scripts]
|
|
@@ -31,6 +31,7 @@ import tabulate
|
|
|
31
31
|
from tqdm import tqdm
|
|
32
32
|
import webbrowser
|
|
33
33
|
|
|
34
|
+
|
|
34
35
|
from .utils import get_config, init_litdb
|
|
35
36
|
from .db import get_db, add_source, add_work, add_author, update_filter, add_bibtex
|
|
36
37
|
from .openalex import get_data, get_text
|
|
@@ -38,7 +39,7 @@ from .pdf import add_pdf
|
|
|
38
39
|
from .bibtex import dump_bibtex
|
|
39
40
|
from .youtube import get_youtube_doc
|
|
40
41
|
from .audio import is_audio_url, get_audio_text, record
|
|
41
|
-
from .images import add_image, image_query
|
|
42
|
+
from .images import add_image, image_query, image_extensions
|
|
42
43
|
|
|
43
44
|
with warnings.catch_warnings():
|
|
44
45
|
warnings.filterwarnings("ignore", category=UserWarning, module="pydantic")
|
|
@@ -111,7 +112,7 @@ def add(
|
|
|
111
112
|
These are one time additions.
|
|
112
113
|
|
|
113
114
|
"""
|
|
114
|
-
|
|
115
|
+
|
|
115
116
|
for source in tqdm(sources):
|
|
116
117
|
# a work
|
|
117
118
|
if source.startswith("10.") or "doi.org" in source:
|
|
@@ -123,11 +124,7 @@ def add(
|
|
|
123
124
|
|
|
124
125
|
add_work(source, references, citing, related)
|
|
125
126
|
|
|
126
|
-
elif (
|
|
127
|
-
source.endswith(".png")
|
|
128
|
-
or source.endswith(".jpg")
|
|
129
|
-
or source.endswith(".jpeg")
|
|
130
|
-
):
|
|
127
|
+
elif os.path.splitext(source)[1].lower() in image_extensions:
|
|
131
128
|
add_image(source)
|
|
132
129
|
|
|
133
130
|
# works from an author
|
|
@@ -8,19 +8,23 @@ search the images either by textual descriptions, or by using similar images.
|
|
|
8
8
|
from .db import get_db
|
|
9
9
|
from sentence_transformers import SentenceTransformer
|
|
10
10
|
from PIL import Image, ImageGrab
|
|
11
|
+
from pillow_heif import register_heif_opener
|
|
11
12
|
import numpy as np
|
|
12
13
|
import datetime
|
|
13
14
|
import os
|
|
14
15
|
import pyperclip
|
|
15
16
|
|
|
17
|
+
register_heif_opener()
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
image_extensions = Image.registered_extensions().keys()
|
|
18
20
|
|
|
21
|
+
model = SentenceTransformer("clip-ViT-B-32")
|
|
19
22
|
db = get_db()
|
|
20
23
|
|
|
21
24
|
|
|
22
25
|
def add_image(path):
|
|
23
26
|
"""Embed and add the image in path to db."""
|
|
27
|
+
|
|
24
28
|
emb = model.encode(Image.open(path))
|
|
25
29
|
|
|
26
30
|
q = """insert or ignore into
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: litdb
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.4
|
|
4
4
|
Summary: A literature database tool with GPT integration.
|
|
5
5
|
Author-email: John Kitchin <jkitchin@andrew.cmu.edu>
|
|
6
6
|
Maintainer-email: John Kitchin <jkitchin@andrew.cmu.edu>
|
|
@@ -42,6 +42,7 @@ Requires-Dist: webvtt-py
|
|
|
42
42
|
Requires-Dist: streamlit
|
|
43
43
|
Requires-Dist: pyperclip
|
|
44
44
|
Requires-Dist: PIL
|
|
45
|
+
Requires-Dist: pillow_heif
|
|
45
46
|
|
|
46
47
|
#+title: litdb - a literature and document database
|
|
47
48
|
|
|
@@ -64,6 +65,7 @@ The idea is you add papers to your database, and then you can search it with nat
|
|
|
64
65
|
6. https://youtube.com/live/SUtvtc7l6y0 litdb + GPT enhancements
|
|
65
66
|
7. https://youtube.com/live/3FZ1ROnCC6Y litdb + LiteLLM and streamlit
|
|
66
67
|
8. https://www.youtube.com/live/IKKTQSTXQmc litdb + Youtube and audio
|
|
68
|
+
9. https://youtube.com/live/MEf9rPI0Z1M litdb + Image search with text and image queries using CLIP
|
|
67
69
|
|
|
68
70
|
** installation
|
|
69
71
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|