forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/upstream/main' into di
# Conflicts: # src/main/java/org/jabref/gui/fieldeditors/optioneditors/OptionEditor.java
- Loading branch information
Showing
30 changed files
with
284 additions
and
407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
jq | ||
jq.exe | ||
*.bib | ||
|
||
# python | ||
*.pyc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,45 @@ | ||
# Creates "large-library.bib" with 100k entries. | ||
|
||
# The file is written in UTF8 and makes use of the unicode character U+0304 (https://www.compart.com/en/unicode/U+0304) | ||
# to create an overline on large roman numbers using the technicue "Vinculum" (https://en.wikipedia.org/wiki/Roman_numerals#Vinculum). | ||
# The numbers are used in the journal title. | ||
|
||
# For pseudonymization BibTeX files, org.jabref.logic.pseudonymization.PseudonymizationTest#pseudonymizeLibraryFiley can be used. | ||
|
||
number_of_entries = 100000 | ||
file = open("generatedDatabase.bib", 'w') | ||
|
||
for i in range(number_of_entries): | ||
entry = """@article{%i, | ||
author = {%i}, | ||
title = {%i}, | ||
journal = {%i}, | ||
volume = {%i}, | ||
year = {%i}, | ||
pages = {%i}, | ||
}""" % (i, i, i, i, i, i, i) | ||
file.write(entry) | ||
file.flush() | ||
file.close() | ||
number_of_entries = 100_000 | ||
|
||
# Adapted from: https://stackoverflow.com/a/50012689/873282 | ||
def int_to_roman(num): | ||
_values = [ | ||
1000000, 900000, 500000, 400000, 100000, 90000, 50000, 40000, 10000, 9000, 5000, 4000, 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] | ||
|
||
_strings = [ | ||
'M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', "M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"] | ||
|
||
result = "" | ||
decimal = num | ||
|
||
while decimal > 0: | ||
for i in range(len(_values)): | ||
if decimal >= _values[i]: | ||
if _values[i] > 1000: | ||
result += u'\u0304'.join(list(_strings[i])) + u'\u0304' | ||
else: | ||
result += _strings[i] | ||
decimal -= _values[i] | ||
break | ||
return result | ||
|
||
with open("generated-large-library.bib", 'w', encoding='utf-8') as file: | ||
for i in range(1, number_of_entries + 1): | ||
year = 1900 + (i - 1) % (2025 - 1900) | ||
entry = f"""@article{{id{i:06d}, | ||
title = {{This is my title{i}}}, | ||
author = {{FirstnameA{i} LastnameA{i} and FirstnameB{i} LastnameB{i} and FirstnameC{i} LastnameC{i}}}, | ||
journal = {{Journal Title {int_to_roman(i)}}}, | ||
volume = {{{i}}}, | ||
year = {{{year}}}, | ||
}} | ||
""" | ||
file.write(entry) |
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
src/main/java/org/jabref/gui/fieldeditors/CustomFieldEditorViewModel.java
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
src/main/java/org/jabref/gui/fieldeditors/EditorTypeEditorViewModel.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 0 additions & 38 deletions
38
src/main/java/org/jabref/gui/fieldeditors/GenderEditorViewModel.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.