Skip to content

Commit

Permalink
feature: reference scrapper (#44)
Browse files Browse the repository at this point in the history
* feature: reference scrapper

* interactive orb-reference-scrapper process

* create special orb-temp-dir

* fix orb-reference-scrapper--cleanup

* another fix for buffer cleanup

* prevent multiple orb-reference-scrapper processes

* s/orb-reference-scrapper/orb-pdf-scrapper

* isolate orb-pdf-scrapper--sanitize-txt

* major reformatting

* orb-with message macro

* orb-pdf-scrapper-anystyle with plist options

* polishing orb-anystyle, documentation

* minor adjustments to orb-anystyle

* use orb-anystyle in orb-pdf-scrapper

* switch between txt and bib, interactively

* fix orb-pdf-scrapper-mode-map

* better regexp for orb-pdf-scrapper-sanitize-text

* replace switch-to-buffer with pop-to-buffer

* better regexp for sanitize text

- also library dependencies

* rename: to `orb-pdf-scrapper-keygen-function`

* isolate journal regexp function

- /s/orb--tsv-to-list /orb-pdf-scrapper--tsv-to-list
- improve pages regexp

* fix anystyle check

- check command does not require a valid format option
- additionally, renamings in orb-pdf-scrapper

* add variables, fix regression in keygen function

- orb-data-dir
- orb-anystyle-parser-model
- orb-anystyle-finder-model

* fix anystyle model keys, scrapper sanitize

* fix library requires

* orb--buffer-string; rename util. funcs.

* refactor and document orb-pdf-scrapper

* set file local fill-column to 79

relevant to #13

* autokey functionality: format field

* fix typos, new journal abbreviations

* it works; added docstrings

* fix type mismatch in orb-autokey-generate-key

* fix orb-autokey-generate-key elisp evaluation

- save match data before evaluation

* eval-when-compile rx; autoload orb-autokey..

* rewrite pdf-scrapper citekey generation

* fix edge cases in orb--autokey-format-field

* add edit-org interactive context

* defvar orb-anystyle crop

* right order for org-roam-capture-templates

* refactor orb-anystyle

* refactor orb-pdf-scrapper.el

* separate undo history for different modes

+ refactor orb-pdf-scrapper.el

* refactor autokey functions

* remove journal_titles.tsv and related code

- this was too much tailored to my discipline; it was here for
development and testing purposes and now goes back to my personal config

* remove orb-data-dir

* orb-autokey-invalid-field-marker

* rename orb-autokey-invalid-field- s/marker/token

* extract orb-pdf-scrapper--generate-key-at-point-1

- parsing a single record was extracted into a separate function
- this function is used in commands `orb-pdf-scrapper-generate-keys`
and `orb-pdf-scrapper-generate-key-at-point`
- use parsebib instead of bibtex-completion-get-entry to avoid
setting buffer-local bibliography
- references are stored unsorted until they are passed to
`orb-pdf-scrapper--edit-org`

* C-u prefix for orb-pdf-scrapper-generate-keys

- remove `orb-pdf-scrapper-generate-key-at-point`, move its
functionality into `orb-pdf-scrapper-generate-keys` making it accessible
with the universal argument

* remove option `orb-pdf-scrapper-keygen-function`

- customization of key generation can be achieved
with `orb-autokey-generate-key`.
- customization of how to validate keys, which fields
to set and which to export can be achieved with corresponding
user variables

* docs: :after org-roam in use-package examples

- leaving it out may potentially lead to loading problems #66

* fix a few minor regressions after refactoring

* insert as org list or table, minor fixes

* add parser training session, refactoring

* set orb-autokey-titlewords-ignore directly

* optimize lazy loading

* orb-autokey-invalid-characters

- filter characters not allowed in BibTeX/LaTeX
- `orb-autokey-invalid-characters` is a user variable for such
  characters
- " and " ("and" surrounded with spaces) as the name field delimiter
- orb-autokey-titlewords-ignore is not copied from
  `bibtex-autokey-titleword-ignore`. This was really a bad idea.
- rename `orb-autokey-invalid-field-token` > `orb-autokey-empty-field-token`

* orb-autokey latest commit follow-up

* fix year expansion edge cases

* set fields per entry type; customize definitions

- in `orb-pdf-scrapper-set-fields` list, entry types can be specified in
the tail of element's list. The field will be set only if its record's
type is a member of those types
- `defcustom` definitions for user variables
- minor refactoring

* refactor orb-pdf-scrapper--insert-org-as-table

also defcustom for orb-pdf-scrapper-mode-hook

* fix training session bug; backup master xml file

* anystyle defcustoms

* Add note actions documentation

- also make `orb-note-actions-default` a user variable

* Update README.md and docstrings

* Fix missing quote

* Require pdf-scraper in relevant action

* Clarify language

The filling might have been messed up, so it’ll probably require a clean-up
later down the line.

* use biblatex dialect in BibTeX mode

* fix invalidate-range regexp

Co-authored-by: Leo Vivier <[email protected]>
  • Loading branch information
myshevchuk and zaeph authored Jul 29, 2020
1 parent 58b052e commit 56a0d33
Show file tree
Hide file tree
Showing 9 changed files with 2,347 additions and 27 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Well, at least we try!

## [0.2.3] - 2020-05-10
### Added
- `orb--replace-virtual-field` and `orb--virtual-fields-alist` for
- `orb--replace-virtual-fields` and `orb--virtual-fields-alist` for
mapping `bibtex-completion` virtual field names to more conventional
words, namely these:
``` elisp
Expand Down
330 changes: 321 additions & 9 deletions README.md

Large diffs are not rendered by default.

Loading

0 comments on commit 56a0d33

Please sign in to comment.