litdb 2.0.0__tar.gz → 2.0.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: litdb
3
- Version: 2.0.0
3
+ Version: 2.0.1
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>
@@ -57,7 +57,14 @@ The idea is you add papers to your database, and then you can search it with nat
57
57
 
58
58
  ** installation
59
59
 
60
- Eventually there will be a package on pypi. Until then, you should be able to install litdb with this command.
60
+ litdb is on PyPi.
61
+
62
+ #+BEGIN_SRC sh
63
+ pip install litdb
64
+ #+END_SRC
65
+
66
+
67
+ To get the cutting edge package, you can install it directly from GitHUB.
61
68
 
62
69
  #+BEGIN_SRC sh
63
70
  pip install git+https://github.com/jkitchin/litdb
@@ -20,7 +20,14 @@ The idea is you add papers to your database, and then you can search it with nat
20
20
 
21
21
  ** installation
22
22
 
23
- Eventually there will be a package on pypi. Until then, you should be able to install litdb with this command.
23
+ litdb is on PyPi.
24
+
25
+ #+BEGIN_SRC sh
26
+ pip install litdb
27
+ #+END_SRC
28
+
29
+
30
+ To get the cutting edge package, you can install it directly from GitHUB.
24
31
 
25
32
  #+BEGIN_SRC sh
26
33
  pip install git+https://github.com/jkitchin/litdb
@@ -7,7 +7,7 @@ where = ["src"]
7
7
 
8
8
  [project]
9
9
  name = "litdb"
10
- version = "2.0.0"
10
+ version = "2.0.1"
11
11
  authors = [
12
12
  {name = "John Kitchin", email = "jkitchin@andrew.cmu.edu"},
13
13
  ]
@@ -58,3 +58,6 @@ litdb = "litdb.cli:cli"
58
58
 
59
59
  [project.urls]
60
60
  Homepage = "https://github.com/jkitchin/litdb"
61
+
62
+
63
+ # uv build & uv publish
@@ -54,7 +54,9 @@ def cli():
54
54
  def init():
55
55
  """Initialize a litdb directory in the current working directory."""
56
56
  init_litdb()
57
- print(f"Initialized in {os.getcwd()}")
57
+ with click.Context(about) as ctx:
58
+ ctx.invoke(about)
59
+ return db
58
60
 
59
61
 
60
62
  #################
@@ -23,7 +23,6 @@ from litdb.bibtex import dump_bibtex
23
23
 
24
24
  def get_db():
25
25
  """Get or create the database."""
26
-
27
26
  config = get_config()
28
27
 
29
28
  root = Path(config["root"])
@@ -40,18 +40,26 @@ def init_litdb():
40
40
 
41
41
 
42
42
  def get_config():
43
- "Return the config dictionary."
43
+ """Return the config dictionary.
44
44
 
45
- root = os.environ.get("LITDB_ROOT")
46
- if root:
47
- root = Path(root)
48
- else:
49
- root = find_root_directory()
45
+ Priority:
46
+ 1. There is a root / litdb.toml
47
+ 2. There is a LITDB_ROOT/litdb.toml
48
+ """
50
49
 
51
50
  CONFIG = "litdb.toml"
52
-
53
- # if you don't find a litdb.toml you might not be in a litdb root. We check for
54
- # an env var next so that litdb works everywhere.
51
+ root = find_root_directory()
52
+ if (root / CONFIG).exists():
53
+ pass
54
+ else:
55
+ root = os.environ.get("LITDB_ROOT")
56
+ if root:
57
+ root = Path(root)
58
+ if (root / CONFIG).exists():
59
+ pass
60
+
61
+ # if you don't find a litdb.toml you might not be in a litdb root. We check
62
+ # for an env var next so that litdb works everywhere.
55
63
  if not (root / CONFIG).exists():
56
64
  print('No config found. You need to run "litdb init"')
57
65
  sys.exit()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: litdb
3
- Version: 2.0.0
3
+ Version: 2.0.1
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>
@@ -57,7 +57,14 @@ The idea is you add papers to your database, and then you can search it with nat
57
57
 
58
58
  ** installation
59
59
 
60
- Eventually there will be a package on pypi. Until then, you should be able to install litdb with this command.
60
+ litdb is on PyPi.
61
+
62
+ #+BEGIN_SRC sh
63
+ pip install litdb
64
+ #+END_SRC
65
+
66
+
67
+ To get the cutting edge package, you can install it directly from GitHUB.
61
68
 
62
69
  #+BEGIN_SRC sh
63
70
  pip install git+https://github.com/jkitchin/litdb
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes