Closed zuphilip closed 9 years ago
@rmzelle Any thoughts?
generally yes, but I actually just contacted T&F asking for an updated list, so let's hold off on this for a little.
@zuphilip, yes, that's the change we would make.
I should note that I extended the Ruby script a while back. You can run
> ruby generate_styles_from_data.rb -d elsevier
to generate styles for a single metadata directory. If you use the "-r" flag, all styles in the style repository that were generated from the selected metadata directory will be deleted, and the newly generated styles are copied over into the repository. You can run the script with "-h" to get a little bit of documentation. I introduced these flags to make it easier to keep the metadata in the "utilities" repo in sync with the generated styles in the "styles" repo.
I've got the new list and will implement it on the weekend. It doesn't look like it has this journal on it, though, so we have to think about a way of dealing with manual additions
It doesn't look like it has this journal on it, though, so we have to think about a way of dealing with manual additions
Yeah, I'm not too fond of having to manually add and delete entries to the master lists we obtain from the various publishers. We already have the skip list, but maybe we need an add-list as well?
I like the idea of "provenance of data" in general. I guess that an add-list or a new column would fit here well. I guess that from the logic, one would perform the actions in the add-list only if there is no entry for the same journal in the publisher's list? Maybe, we could then name it more clearly "add-list-after" (?). If there is (at some point of time) an entry in the add-list and in the publisher's list as well, it would be good to be warned in some way. BTW can we order the list alphabetically by the journal name? @rmzelle I did never do anything in Ruby before and maybe I don't have to do it in the near future...
I agree that an add-list is the way to go.
I guess that from the logic, one would perform the actions in the add-list only if there is no entry for the same journal in the publisher's list?
I'm thinking of a case of a journal that's assigned to the wrong style by the list we get from the publisher, but still uses a standard style. There are two ways to handle this:
If we do 1.) the regular list generally takes precedence (since the script simply overwrites existing styles). If we do 2.) the add list takes precedence. I don't have a preference either way, I think ideally they shouldn't overlap.
BTW can we order the list alphabetically by the journal name?
Tab files open and save in Excel, so that's trivially easy to do.
I did never do anything in Ruby before and maybe I don't have to do it in the near future...
I believe Rintze enjoys figuring this out. If we need serious help, we can always ask Carles from Mendeley who wrote the original script and is, quite literally, a pro (and always happy to help).
I believe Rintze enjoys figuring this out.
I have a bunch of other things on my to do list, so I'm not sure I'll tend to this soon. You can either manually edit the TF spreadsheet by hand for now, or ask Carles, who is also much more comfortable with Ruby. Opening a ticket wouldn't hurt either.
@cpina -- this isn't terribly urgent, but if you have a bit of spare time, could you have a look at the discussion above and implement this--i.e. an option for an _added-styles.tab list to use for manually added data--in the script?
@adam3smith: yes, I saw a few days ago and I'll do some time soon.
I just updated generate_styles_from_data.rb (https://github.com/citation-style-language/utilities/commit/c761d679248a8927ca5a4b53908a825d7d8a9318). I haven't test it very heavily, and I still need to update the documentation at https://github.com/citation-style-language/utilities/tree/master/generate_dependent_styles, but it seems to work fine.
You can now create an optional "_extra.tab" file. It requires the same header and column order as "_journals.tab". If entries in "_journals.tab" and "_extra.tab" share the same style ID, the entry in "_extra.tab" completely replaces the entry in "_journals.tab". Skipping and renaming work just as before (e.g., a title that exist in "_journals.tab", "_extra.tab" and "_skip.txt" is still skipped; same for renaming with "_rename.tab").
The output shows the number of overwritten styles, e.g.:
Generating styles...
Generated 9 Overwrote 2 aacr
excellent, thanks!
On Mon, Jan 19, 2015 at 10:13 PM, Rintze M. Zelle notifications@github.com wrote:
I just updated generate_styles_from_data.rb (c761d67 https://github.com/citation-style-language/utilities/commit/c761d679248a8927ca5a4b53908a825d7d8a9318). I haven't test it very heavily, but it seems to work just fine.
You can now create an optional "_extra.tab" file. It requires the same header and column order as "_journals.tab". Skipping and renaming work just as before (e.g., a title that exist in "_journals.tab", "_extra.tab" and "_skip.txt" is still skipped; same for renaming with "_rename.tab").
The output shows the number of overwritten styles, e.g.:
Generating styles... Generated 9 Overwrote 2 aacr
— Reply to this email directly or view it on GitHub https://github.com/citation-style-language/utilities/pull/14#issuecomment-70602125 .
Sebastian Karcher, PhD Department of Political Science Northwestern University
The main remaining limitation I see is that the "--replace" flag currently only works in combination with "--directory". It would be nice to use "-r" by itself so we can quickly see if the "utilities" repo is in sync with the "styles" repo.
Also, this is getting off-topic, but we still have a bunch of Elsevier styles that once upon a time were generated, but which are absent from the current metadata set: https://gist.github.com/rmzelle/d6bb971948077a78cdc7. It looks like some but not all are on Carles's list.
The documentation at https://github.com/citation-style-language/utilities/blob/master/generate_dependent_styles/README.mdown is now up-to-date as well.
I added the "International Journal of Pavement Engineering " style in https://github.com/citation-style-language/utilities/commit/fb424bd94d730f2785819764da3dc7233245d9b2 and https://github.com/citation-style-language/styles/commit/04023dffa627aeb79570c2db7dd4d5b8059c1293 . I changed the parent to "taylor-and-francis-harvard-x", since that's the parent of "taylor-and-francis-harvard-v".
... link it to the style taylor-and-francis-harvard-v as described in their manuscript guidelines.
I hope this update is in the correct form and at the correct place.
(See https://forums.zotero.org/discussion/40818/style-request-internationa-journal-of-pavement-engineering/#Item_2)