bib-optimizer 0.1.0__tar.gz → 0.3.0__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.
- {bib_optimizer-0.1.0/src/bib_optimizer.egg-info → bib_optimizer-0.3.0}/PKG-INFO +46 -54
- bib_optimizer-0.3.0/README.md +45 -0
- {bib_optimizer-0.1.0 → bib_optimizer-0.3.0}/pyproject.toml +2 -2
- bib_optimizer-0.3.0/src/bib_optimizer/__init__.py +2 -0
- {bib_optimizer-0.1.0 → bib_optimizer-0.3.0}/src/bib_optimizer/__main__.py +1 -1
- {bib_optimizer-0.1.0 → bib_optimizer-0.3.0/src/bib_optimizer.egg-info}/PKG-INFO +46 -54
- bib_optimizer-0.1.0/README.md +0 -53
- bib_optimizer-0.1.0/src/bib_optimizer/__init__.py +0 -2
- {bib_optimizer-0.1.0 → bib_optimizer-0.3.0}/LICENSE +0 -0
- {bib_optimizer-0.1.0 → bib_optimizer-0.3.0}/MANIFEST.in +0 -0
- {bib_optimizer-0.1.0 → bib_optimizer-0.3.0}/setup.cfg +0 -0
- {bib_optimizer-0.1.0 → bib_optimizer-0.3.0}/src/bib_optimizer/helpers.py +0 -0
- {bib_optimizer-0.1.0 → bib_optimizer-0.3.0}/src/bib_optimizer.egg-info/SOURCES.txt +0 -0
- {bib_optimizer-0.1.0 → bib_optimizer-0.3.0}/src/bib_optimizer.egg-info/dependency_links.txt +0 -0
- {bib_optimizer-0.1.0 → bib_optimizer-0.3.0}/src/bib_optimizer.egg-info/entry_points.txt +0 -0
- {bib_optimizer-0.1.0 → bib_optimizer-0.3.0}/src/bib_optimizer.egg-info/requires.txt +0 -0
- {bib_optimizer-0.1.0 → bib_optimizer-0.3.0}/src/bib_optimizer.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bib_optimizer
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Clean and optimize bib file.
|
|
5
5
|
Author-email: Ka Wa Yip <yipkawa@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -52,56 +52,48 @@ Requires-Dist: mypy; extra == "dev"
|
|
|
52
52
|
Requires-Dist: pytest; extra == "dev"
|
|
53
53
|
Dynamic: license-file
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<marquee>
|
|
101
|
-
<summary>
|
|
102
|
-
<p>♥ Lastly executed on Python <code>3.10</code> and bibtexparser <code>1.4.3</code></p>
|
|
103
|
-
</summary>
|
|
104
|
-
</marquee>
|
|
105
|
-
</footnote>
|
|
106
|
-
|
|
107
|
-
</html>
|
|
55
|
+
bib-optimizer
|
|
56
|
+
=============
|
|
57
|
+
|
|
58
|
+
Oh, sure, because who doesn't love manually cleaning up messy `.bib` files? `bib_optimizer.py` heroically steps in to remove those lazy, _unused_ citations and _reorder_ the survivors exactly as they appear in the `.tex` file—because, clearly, chaos is the default setting for bibliographies.
|
|
59
|
+
|
|
60
|
+
In layman's terms, it automates bibliography management by:
|
|
61
|
+
|
|
62
|
+
1. removing unused citations,
|
|
63
|
+
2. reordering the remaining ones to match their order of appearance in the `.tex` file.
|
|
64
|
+
|
|
65
|
+
**Input Files:**
|
|
66
|
+
|
|
67
|
+
* `main.tex` – The LaTeX source file.
|
|
68
|
+
* `ref.bib` – The original bibliography file.
|
|
69
|
+
|
|
70
|
+
These input files will **remain unchanged**.
|
|
71
|
+
|
|
72
|
+
**Output File:**
|
|
73
|
+
|
|
74
|
+
* `ref_opt.bib` – The newly generated, cleaned and ordered bibliography file.
|
|
75
|
+
|
|
76
|
+
* * *
|
|
77
|
+
|
|
78
|
+
Installation
|
|
79
|
+
------------
|
|
80
|
+
|
|
81
|
+
`pip install bib_optimizer`
|
|
82
|
+
or
|
|
83
|
+
`python -m pip install bib_optimizer`
|
|
84
|
+
|
|
85
|
+
_🐍 This requires Python 3.8 or newer versions_
|
|
86
|
+
|
|
87
|
+
* * *
|
|
88
|
+
|
|
89
|
+
### Steps to Clean Your Bibliography
|
|
90
|
+
|
|
91
|
+
1. **Prepare the input files (e.g., by downloading them from Overleaf)**.
|
|
92
|
+
2. **Run the command to generate a new `.bib` file (for example, you may name it `ref_opt.bib`)**:
|
|
93
|
+
`bibopt main.tex ref.bib ref_opt.bib`
|
|
94
|
+
3. **Use the Cleaned Bibliography**
|
|
95
|
+
Replace `ref.bib` with `ref_opt.bib` in your LaTeX project.
|
|
96
|
+
|
|
97
|
+
* * *
|
|
98
|
+
|
|
99
|
+
♥ Lastly executed on Python `3.10` and bibtexparser `1.4.3`
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
bib-optimizer
|
|
2
|
+
=============
|
|
3
|
+
|
|
4
|
+
Oh, sure, because who doesn't love manually cleaning up messy `.bib` files? `bib_optimizer.py` heroically steps in to remove those lazy, _unused_ citations and _reorder_ the survivors exactly as they appear in the `.tex` file—because, clearly, chaos is the default setting for bibliographies.
|
|
5
|
+
|
|
6
|
+
In layman's terms, it automates bibliography management by:
|
|
7
|
+
|
|
8
|
+
1. removing unused citations,
|
|
9
|
+
2. reordering the remaining ones to match their order of appearance in the `.tex` file.
|
|
10
|
+
|
|
11
|
+
**Input Files:**
|
|
12
|
+
|
|
13
|
+
* `main.tex` – The LaTeX source file.
|
|
14
|
+
* `ref.bib` – The original bibliography file.
|
|
15
|
+
|
|
16
|
+
These input files will **remain unchanged**.
|
|
17
|
+
|
|
18
|
+
**Output File:**
|
|
19
|
+
|
|
20
|
+
* `ref_opt.bib` – The newly generated, cleaned and ordered bibliography file.
|
|
21
|
+
|
|
22
|
+
* * *
|
|
23
|
+
|
|
24
|
+
Installation
|
|
25
|
+
------------
|
|
26
|
+
|
|
27
|
+
`pip install bib_optimizer`
|
|
28
|
+
or
|
|
29
|
+
`python -m pip install bib_optimizer`
|
|
30
|
+
|
|
31
|
+
_🐍 This requires Python 3.8 or newer versions_
|
|
32
|
+
|
|
33
|
+
* * *
|
|
34
|
+
|
|
35
|
+
### Steps to Clean Your Bibliography
|
|
36
|
+
|
|
37
|
+
1. **Prepare the input files (e.g., by downloading them from Overleaf)**.
|
|
38
|
+
2. **Run the command to generate a new `.bib` file (for example, you may name it `ref_opt.bib`)**:
|
|
39
|
+
`bibopt main.tex ref.bib ref_opt.bib`
|
|
40
|
+
3. **Use the Cleaned Bibliography**
|
|
41
|
+
Replace `ref.bib` with `ref_opt.bib` in your LaTeX project.
|
|
42
|
+
|
|
43
|
+
* * *
|
|
44
|
+
|
|
45
|
+
♥ Lastly executed on Python `3.10` and bibtexparser `1.4.3`
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "bib_optimizer"
|
|
9
|
-
version = "0.
|
|
9
|
+
version = "0.3.0"
|
|
10
10
|
description = "Clean and optimize bib file."
|
|
11
11
|
authors = [
|
|
12
12
|
{ name="Ka Wa Yip", email="yipkawa@gmail.com" },
|
|
@@ -40,7 +40,7 @@ dev = ["black", "bumpver", "isort", "mypy", "pytest"]
|
|
|
40
40
|
bibopt = "bib_optimizer.__main__:main"
|
|
41
41
|
|
|
42
42
|
[tool.bumpver]
|
|
43
|
-
current_version = "0.
|
|
43
|
+
current_version = "0.3.0"
|
|
44
44
|
version_pattern = "MAJOR.MINOR.PATCH"
|
|
45
45
|
commit_message = "bump version {old_version} -> {new_version}"
|
|
46
46
|
commit = true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bib_optimizer
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Clean and optimize bib file.
|
|
5
5
|
Author-email: Ka Wa Yip <yipkawa@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -52,56 +52,48 @@ Requires-Dist: mypy; extra == "dev"
|
|
|
52
52
|
Requires-Dist: pytest; extra == "dev"
|
|
53
53
|
Dynamic: license-file
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<marquee>
|
|
101
|
-
<summary>
|
|
102
|
-
<p>♥ Lastly executed on Python <code>3.10</code> and bibtexparser <code>1.4.3</code></p>
|
|
103
|
-
</summary>
|
|
104
|
-
</marquee>
|
|
105
|
-
</footnote>
|
|
106
|
-
|
|
107
|
-
</html>
|
|
55
|
+
bib-optimizer
|
|
56
|
+
=============
|
|
57
|
+
|
|
58
|
+
Oh, sure, because who doesn't love manually cleaning up messy `.bib` files? `bib_optimizer.py` heroically steps in to remove those lazy, _unused_ citations and _reorder_ the survivors exactly as they appear in the `.tex` file—because, clearly, chaos is the default setting for bibliographies.
|
|
59
|
+
|
|
60
|
+
In layman's terms, it automates bibliography management by:
|
|
61
|
+
|
|
62
|
+
1. removing unused citations,
|
|
63
|
+
2. reordering the remaining ones to match their order of appearance in the `.tex` file.
|
|
64
|
+
|
|
65
|
+
**Input Files:**
|
|
66
|
+
|
|
67
|
+
* `main.tex` – The LaTeX source file.
|
|
68
|
+
* `ref.bib` – The original bibliography file.
|
|
69
|
+
|
|
70
|
+
These input files will **remain unchanged**.
|
|
71
|
+
|
|
72
|
+
**Output File:**
|
|
73
|
+
|
|
74
|
+
* `ref_opt.bib` – The newly generated, cleaned and ordered bibliography file.
|
|
75
|
+
|
|
76
|
+
* * *
|
|
77
|
+
|
|
78
|
+
Installation
|
|
79
|
+
------------
|
|
80
|
+
|
|
81
|
+
`pip install bib_optimizer`
|
|
82
|
+
or
|
|
83
|
+
`python -m pip install bib_optimizer`
|
|
84
|
+
|
|
85
|
+
_🐍 This requires Python 3.8 or newer versions_
|
|
86
|
+
|
|
87
|
+
* * *
|
|
88
|
+
|
|
89
|
+
### Steps to Clean Your Bibliography
|
|
90
|
+
|
|
91
|
+
1. **Prepare the input files (e.g., by downloading them from Overleaf)**.
|
|
92
|
+
2. **Run the command to generate a new `.bib` file (for example, you may name it `ref_opt.bib`)**:
|
|
93
|
+
`bibopt main.tex ref.bib ref_opt.bib`
|
|
94
|
+
3. **Use the Cleaned Bibliography**
|
|
95
|
+
Replace `ref.bib` with `ref_opt.bib` in your LaTeX project.
|
|
96
|
+
|
|
97
|
+
* * *
|
|
98
|
+
|
|
99
|
+
♥ Lastly executed on Python `3.10` and bibtexparser `1.4.3`
|
bib_optimizer-0.1.0/README.md
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<header>
|
|
4
|
-
<h1 id="bib-optimizer">bib-optimizer</h1>
|
|
5
|
-
</header>
|
|
6
|
-
<main>
|
|
7
|
-
<p>Oh, sure, because who doesn't love manually cleaning up messy <code>.bib</code> files?
|
|
8
|
-
<code>bib_optimizer.py</code> heroically steps in to remove those lazy, <em>unused</em> citations and
|
|
9
|
-
<em>reorder</em> the survivors exactly as they appear in the <code>.tex</code> file—because, clearly, chaos is
|
|
10
|
-
the
|
|
11
|
-
default setting for bibliographies.
|
|
12
|
-
</p>
|
|
13
|
-
<p>In layman's terms, it automates bibliography management by:</p>
|
|
14
|
-
<ol>
|
|
15
|
-
<li>removing unused citations,</li>
|
|
16
|
-
<li>reordering the remaining ones to match their order of appearance in the <code>.tex</code> file.</li>
|
|
17
|
-
</ol>
|
|
18
|
-
|
|
19
|
-
<p><strong>Input Files:</strong></p>
|
|
20
|
-
<ul>
|
|
21
|
-
<li><code>main.tex</code> – The LaTeX source file.</li>
|
|
22
|
-
<li><code>ref.bib</code> – The original bibliography file. </li>
|
|
23
|
-
</ul>
|
|
24
|
-
<p>These input files will <strong>remain unchanged</strong>.</p>
|
|
25
|
-
<p><strong>Output File:</strong></p>
|
|
26
|
-
<ul>
|
|
27
|
-
<li><code>ref_opt.bib</code> – The newly generated, cleaned and ordered bibliography file.</li>
|
|
28
|
-
</ul>
|
|
29
|
-
</main>
|
|
30
|
-
<hr>
|
|
31
|
-
<h2> Installation </h2>
|
|
32
|
-
<footnote>
|
|
33
|
-
<h3 id="steps-to-clean-your-bibliography">Steps to Clean Your Bibliography</h3>
|
|
34
|
-
<ol>
|
|
35
|
-
<li><strong>Install Dependencies</strong>: <code>pip install bibtexparser # Requires Python 3</code>
|
|
36
|
-
</li>
|
|
37
|
-
<li><strong>Run the Script</strong>: <code>python bib_optimizer.py main.tex ref.bib ref_opt.bib</code>
|
|
38
|
-
</li>
|
|
39
|
-
<li><strong>Use the Cleaned Bibliography</strong><br />
|
|
40
|
-
Replace <code>ref.bib</code> with
|
|
41
|
-
<code>ref_opt.bib</code> in
|
|
42
|
-
your LaTeX project.
|
|
43
|
-
</li>
|
|
44
|
-
</ol>
|
|
45
|
-
<hr>
|
|
46
|
-
<marquee>
|
|
47
|
-
<summary>
|
|
48
|
-
<p>♥ Lastly executed on Python <code>3.10</code> and bibtexparser <code>1.4.3</code></p>
|
|
49
|
-
</summary>
|
|
50
|
-
</marquee>
|
|
51
|
-
</footnote>
|
|
52
|
-
|
|
53
|
-
</html>
|
|
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
|