[KBibTeX] [Bug 460316] Command-Line tool for auto-formatting BibTeX file
https://bugs.kde.org/show_bug.cgi?id=460316 --- Comment #9 from Thomas Fischer --- Git commit cd0875e0a8dcb3670e6ae9cf1f8213efffa162ac by Thomas Fischer. Committed on 22/12/2022 at 20:37. Pushed by thomasfischer into branch 'master'. Adding command line program Adding a command line program that offers basic functionality of KBibTeX without a user interface and without many dependencies (basically just Qt::Core and some KBibTeX libraries). Initial implementation can only load a bibliographic file of any recognized file format and write it back to another file or the standard output. M +28 -0src/program/CMakeLists.txt A +105 -0src/program/commandline.cpp [License: GPL(v2.0+)] https://invent.kde.org/office/kbibtex/commit/cd0875e0a8dcb3670e6ae9cf1f8213efffa162ac -- You are receiving this mail because: You are watching all bug changes.
[KBibTeX] [Bug 460316] Command-Line tool for auto-formatting BibTeX file
https://bugs.kde.org/show_bug.cgi?id=460316 nobodyinperson changed: What|Removed |Added Status|NEEDSINFO |RESOLVED --- Comment #8 from nobodyinperson --- Absolutely awesome, the --format-id option! Thank you very much, Thomas! With this one huge BibTeX file (which I can't disclose here atm) i am running into a bistable cycle where the formatting is not idempotent and oscillates between appending (and removing) a '-2' after duplicate IDs. Interestingly, I cannot reproduce this with a smaller example. I guess this is another issue anyway as it also applies to the GUI. I'll open another bug report if I can reproduce this. -- You are receiving this mail because: You are watching all bug changes.
[KBibTeX] [Bug 460316] Command-Line tool for auto-formatting BibTeX file
https://bugs.kde.org/show_bug.cgi?id=460316 Thomas Fischer changed: What|Removed |Added Latest Commit|6d94c8f836ca6ce3339c75da222 |2c60618d2fd1a74009d4f89eb0f |2f613f54aff7b |75ffbe62a1749 Version Fixed In||0.11 --- Comment #7 from Thomas Fischer --- (In reply to nobodyinperson from comment #5) > Would is also be possible to make a cli flag for auto-generating the IDs? > That would be awesome! https://invent.kde.org/thomasfischer/kbibtex/commit/2c60618d2fd1a74009d4f89eb0f75ffbe62a1749 The format string is found in the Preferences -> Id Suggestions -> select one -> Edit -> See top of editing dialog. -- You are receiving this mail because: You are watching all bug changes.
[KBibTeX] [Bug 460316] Command-Line tool for auto-formatting BibTeX file
https://bugs.kde.org/show_bug.cgi?id=460316 --- Comment #6 from Bug Janitor Service --- Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! -- You are receiving this mail because: You are watching all bug changes.
[KBibTeX] [Bug 460316] Command-Line tool for auto-formatting BibTeX file
https://bugs.kde.org/show_bug.cgi?id=460316 --- Comment #5 from nobodyinperson --- Would is also be possible to make a cli flag for auto-generating the IDs? That would be awesome! -- You are receiving this mail because: You are watching all bug changes.
[KBibTeX] [Bug 460316] Command-Line tool for auto-formatting BibTeX file
https://bugs.kde.org/show_bug.cgi?id=460316 Thomas Fischer changed: What|Removed |Added Status|ASSIGNED|NEEDSINFO Resolution|--- |WORKSFORME Latest Commit|696ebd4dc39817c58d317782ac8 |6d94c8f836ca6ce3339c75da222 |391ae262fb5c2 |2f613f54aff7b --- Comment #4 from Thomas Fischer --- > Would it be very difficult to have the normal 'kbibtex' executable provide > this functionality? Just for the sake of having less executables flying > around... I am favoring two separate binaries. First 'kbibtex' and 'kbibtex-cli' may have different arguments and options for various operations that may be in conflict if the "command line" gets more elaborate. Second, the latest commit (6d94c8f836ca6ce33, unless I force-push) contains a refactored build system that allows to build just 'kbibtex-cli' without any graphical libraries. That means to compile only 60 instead of about 200 code files and less dependencies. Viable for server or container deployments where automated processing of BibTeX files is required. Please test for yourself by switching on option BUILD_APP_COMMAND_LINE and disabling options BUILD_APP_DESKTOP and BUILD_KPART. -- You are receiving this mail because: You are watching all bug changes.
[KBibTeX] [Bug 460316] Command-Line tool for auto-formatting BibTeX file
https://bugs.kde.org/show_bug.cgi?id=460316 Thomas Fischer changed: What|Removed |Added Latest Commit|93bfb10deb49e0c688b3625e3a1 |696ebd4dc39817c58d317782ac8 |a4301a4797425 |391ae262fb5c2 -- You are receiving this mail because: You are watching all bug changes.
[KBibTeX] [Bug 460316] Command-Line tool for auto-formatting BibTeX file
https://bugs.kde.org/show_bug.cgi?id=460316 Bug 460316 depends on bug 460315, which changed state. Bug 460315 Summary: Sorting in output file https://bugs.kde.org/show_bug.cgi?id=460315 What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
[KBibTeX] [Bug 460316] Command-Line tool for auto-formatting BibTeX file
https://bugs.kde.org/show_bug.cgi?id=460316 Bug 460316 depends on bug 460315, which changed state. Bug 460315 Summary: Sorting in output file https://bugs.kde.org/show_bug.cgi?id=460315 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
[KBibTeX] [Bug 460316] Command-Line tool for auto-formatting BibTeX file
https://bugs.kde.org/show_bug.cgi?id=460316 --- Comment #3 from nobodyinperson --- Very nice, awesome little cli program! When I rebase branch bugs/kde460316 onto this branch bugs/kde460315, even the sorting behaviour is applied to the files, which is exactly what I need Would it be very difficult to have the normal 'kbibtex' executable provide this functionality? Just for the sake of having less executables flying around... Otherwise, kbibtex-cli is also fine Many thanks for your work on kbibtex!!! -- You are receiving this mail because: You are watching all bug changes.
[KBibTeX] [Bug 460316] Command-Line tool for auto-formatting BibTeX file
https://bugs.kde.org/show_bug.cgi?id=460316 Thomas Fischer changed: What|Removed |Added Latest Commit||93bfb10deb49e0c688b3625e3a1 ||a4301a4797425 Ever confirmed|0 |1 Status|REPORTED|ASSIGNED --- Comment #2 from Thomas Fischer --- Rudimentary implementation of this request is available in this commit: https://invent.kde.org/thomasfischer/kbibtex/commit/93bfb10deb49e0c688b3625e3a1a4301a4797425 As of now, it just loads a bibliographic file and writes its back out to stdout or a file (file formats determined by filenames). "inplace" is technically possible by providing the same filename both for input and output (not tested but should work as input file is closed before output file is written). Formatting is implicit, as the output is build from an internal representation of the bibliography, not the input file directly. The code does not contain any changes proposed for bug 460315, so no sorting yet, only once both bugfix branches are merged back into the main branch. As "kbibtex-cli" is a command line tool, it should have a man page ("kbibtex-cli.1"). This may be something for you to contribute ... -- You are receiving this mail because: You are watching all bug changes.
[KBibTeX] [Bug 460316] Command-Line tool for auto-formatting BibTeX file
https://bugs.kde.org/show_bug.cgi?id=460316 --- Comment #1 from nobodyinperson --- Proposed CLI: kbibtex --format bibliography.bib # outputs formatted BibTeX kbibtex --format bibliography.bib -o bibliography-formatted.bib # writes to bibliography-formatted.bib kbibtex --format --inplace bibliography.bib # formats in-place -- You are receiving this mail because: You are watching all bug changes.