redoing the dedup csv, something wrong with the other one
This commit is contained in:
parent
d7e3d54e0f
commit
83e9f3b25c
File diff suppressed because one or more lines are too long
3049
cites/auto_dedup_results.csv
Normal file
3049
cites/auto_dedup_results.csv
Normal file
File diff suppressed because one or more lines are too long
16
cites/bib_to_csv.py
Normal file
16
cites/bib_to_csv.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import csv
|
||||||
|
import bibtexparser
|
||||||
|
from tqdm import tqdm
|
||||||
|
|
||||||
|
|
||||||
|
with open("auto_dedup_results.bib") as bibfile:
|
||||||
|
bib_db = bibtexparser.load(bibfile)
|
||||||
|
|
||||||
|
fields = ['duplicate_id', 'bibtype', 'title', 'abstract', 'doi']
|
||||||
|
|
||||||
|
with open('auto_dedup_results.csv', 'w', newline="", encoding='utf-8') as csvfile:
|
||||||
|
writer = csv.DictWriter(csvfile, fieldnames=fields)
|
||||||
|
writer.writeheader()
|
||||||
|
for entry in tqdm(bib_db.entries, desc="Converting BibTeX to CSV"):
|
||||||
|
row = {field: entry.get(field, '') for field in fields}
|
||||||
|
writer.writerow(row)
|
16
cites/shell.nix
Normal file
16
cites/shell.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
pkgs ? import <nixpkgs> { },
|
||||||
|
}:
|
||||||
|
|
||||||
|
pkgs.mkShell {
|
||||||
|
name = "trial-env";
|
||||||
|
packages = with pkgs; [
|
||||||
|
pkgs.python312
|
||||||
|
pkgs.python312Packages.bibtexparser
|
||||||
|
pkgs.python312Packages.tqdm
|
||||||
|
git
|
||||||
|
];
|
||||||
|
shellHook = ''
|
||||||
|
echo "trying to find a good quote for here"
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user