-
Notifications
You must be signed in to change notification settings - Fork 23
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
Can I bring in my own styles rather than require-ing csl/styles? #65
Comments
You can load a style by passing an absolute path or URL instead of the name, or, if you would like to be able to load the styles via short names you can set the style/locale roots to the folder where you keep the styles. The |
And if I pass it an url, it will download the style? Awesome, that actually solves a different problem immediately. |
Yes, if I remember correctly it should download the style. By the way, here's the test setup from the official styles repo -- that might be helpful as well. Generally, you should try to load styles only once if you process many items over time (regardless of whether you load from the file system or via URL, parsing the style takes more time than rendering citations usually). |
smacks forehead I was rummaging around there and it didn't dawn upon me that they were using this gem. This is going to prevent a slew of questions I was about to ask. Thanks! |
When I pass an URL, is there a way for me to add custom headers? I need to pull a file from the github API. I could store it in a temp file, but if it's not required, that'd be preferable. |
No, I'm afraid there's no way to do that at the moment. You can however, pass the contents of the CSL instead of a path, so you won't need to create a temp file. |
That will work just fine - thanks! |
I am looking to use the ruby citeproc gems to test styles that are not in
csl/styles
-- how would I feed the style to the processor in this case?The text was updated successfully, but these errors were encountered: