Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE-87: CSL-citations as a twig extension & a field formatter: a tale of two converging paths #192

Merged
merged 49 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
7425179
add citeproc as composer dependency
Apr 5, 2022
0fc4d11
Replace deprecated Twig_Extension deprecated class
Apr 6, 2022
16c1565
Add some boilerplate
Apr 6, 2022
0a77ad7
more boilerplate because I don't even understand the basics
Apr 6, 2022
1e5ae94
add boilerplate for citation formatter
Apr 7, 2022
3ae0d0d
Merge pull request #188 from esmero/ISSUE-187
aksm Apr 11, 2022
9a47457
just testing things out and trying to understand what I'm doing
Apr 12, 2022
7fa54d5
Get style list from CSL files and add them to settings form.
Apr 19, 2022
d1f21e9
Display selected citation styles in summary
Apr 21, 2022
de40516
Citation formatter code rendering from example JSON data (not a TWIG …
Apr 26, 2022
7b4679a
Merge remote-tracking branch 'origin/1.0.0-RC3' into ISSUE-87
Apr 26, 2022
e5aaaf5
Update composer for 1.0.0 upcoming release
DiegoPino Apr 1, 2022
572209c
tasks/24607546-cws-to-iab --- spitballing code for display book objec…
patdunlavey Mar 25, 2022
00bc018
tasks/24607546-cws-to-iab --- this is working now for my CWS using 'I…
patdunlavey Mar 30, 2022
09cd6cd
tasks/24607546-cws-to-iab --- added a bit of inline documentation cla…
patdunlavey Mar 30, 2022
a3bf56c
tasks/24607546-cws-to-iab --- reworked getImagesListApi3 to use the f…
patdunlavey Mar 31, 2022
116e866
tasks/24607546-cws-to-iab --- added sanity check for annotation.body.…
patdunlavey Mar 31, 2022
ef819ef
tasks/24607546-cws-to-iab --- removed commented out code that should …
patdunlavey Apr 1, 2022
98c9ce4
Moving to 1.0.0.x-dev dependencies
DiegoPino Apr 18, 2022
6349db0
Add dependencies to composer.
Apr 28, 2022
16fe13c
Spacing error on composer.json
Apr 28, 2022
73cc895
composer.json was missing a bracket.
Apr 28, 2022
49cfed9
Bracket in composer.json was on wrong line :(
Apr 28, 2022
3b6c0db
Still using example JSON string but passed from metatdata template.
Apr 29, 2022
9d99883
Basic logic for processing locales.
May 3, 2022
d3cf3ca
Remove label options from settings form.
May 3, 2022
d5092a3
Inlined all style select html and javascript for expediency's sake.
May 4, 2022
5ea6cf3
Moved Javascript to file and loaded as attachment. Still need to refa…
May 5, 2022
e2aa108
Check json_decode errors.
May 5, 2022
8cb6a17
Merge branch '1.0.0' into ISSUE-87
aksm May 5, 2022
3450b42
Refactor to use element ID passed from Drupal instead of hardcoded.
May 5, 2022
45edd2a
Just some starting boilerplate for drush commands.
May 12, 2022
5997dd6
Drush command downloads and extracts dependencies, but still lots of …
May 19, 2022
c250b1c
Update composer for 1.0.0 upcoming release
DiegoPino Apr 1, 2022
539ced2
tasks/24607546-cws-to-iab --- spitballing code for display book objec…
patdunlavey Mar 25, 2022
6e4afc6
tasks/24607546-cws-to-iab --- this is working now for my CWS using 'I…
patdunlavey Mar 30, 2022
8a28fdd
Just some cleanup.
May 19, 2022
d41d7ee
Add warning at top of settings form if folder of dependencies doesn't…
May 19, 2022
882d71a
Drupal coding standards on control structures. Still learning!
May 19, 2022
b363db6
Switch to versioned branches as recommended by README, especially sin…
May 20, 2022
479f0cd
Give drush user option to re-download and extract libraries in case s…
May 20, 2022
7c9f048
Additional cleanup. Refactor shared variables and functions. DRY!
May 21, 2022
b4e522b
Refactor to use vendor folder because citeproc automatically looks fo…
May 24, 2022
6ffcf09
First attempt at overriding CiteProc's StyleSheet class. Probably doi…
May 24, 2022
aea45be
Refactor to use Class to generate bibliography. Still need to attach …
May 25, 2022
b2ee16b
Just some cleanup.
May 25, 2022
d0d9015
Finally! Twig filter attaches library and functions. Still need to fi…
May 26, 2022
37ce25c
Generate unique IDs for multiple containers.
May 26, 2022
933734b
Merge branch '1.0.0' into ISSUE-87
DiegoPino Jun 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"league/html-to-markdown":"^5.0.0",
"erusev/parsedown": "^1.7",
"drupal/webform": "^5.23 || ^6.0",
"ext-json": "*"
"ext-json": "*",
"seboettg/citeproc-php": "master"
}
}
32 changes: 32 additions & 0 deletions config/schema/format_strawberryfield.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -570,3 +570,35 @@ format_strawberryfield.jmespath_config.mapping:
jmespath_alternative_filter:
type: string
label: 'An alternative JMESPath filter expression'

field.formatter.settings.strawberry_citation_formatter:
type: mapping
label: 'Specific Config for strawberry_metadata_formatter using Twig'
mapping:
iiif_base_url:
type: string
label: 'Custom Public IIIF Server URL'
iiif_base_url_internal:
type: string
label: 'Custom internal IIIF Server URL'
json_key_source:
type: string
label: 'Strawberryfield/JSON key containing file URIs to display'
max_width:
type: integer
max_height:
type: integer
use_iiif_globals:
type: string
label: 'Whether to use global IIIF settings or not.'
label:
type: string
metadatadisplayentity_uuid:
type: string
metadatadisplayentity_uselabel:
type: string
citationstyle:
type: mapping
mapping:
type: string
label: 'style'
2 changes: 1 addition & 1 deletion format_strawberryfield.services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ services:
arguments: ['@strawberryfield.utility', '@config.factory']
format_strawberryfield.embargo_resolver:
class: Drupal\format_strawberryfield\EmbargoResolver
arguments: ['@config.factory', '@current_user', '@request_stack']
arguments: ['@config.factory', '@current_user', '@request_stack']
Loading