cboulanger / bookends-api

A NodeJS client for the Bookenends Reference Manager
MIT License
5 stars 1 forks source link

setup challenges #2

Open joshuawagner opened 4 years ago

joshuawagner commented 4 years ago

Hi, I hope this isn't too much of a noob question, but I'm getting a syntax error

-bash: syntax error near unexpected token `4963917'

when I run

examples/bookends-zotero-sync user/<4963917> --target=bookends --key=<*******************>

I've navigated in terminal to the folder where the project is located:

/Users/jret18/Documents/Terminal_installs_jdw/bookends-api

I've done the setup as indicated. Any idea what I'm doing wrong?

cboulanger commented 4 years ago

HI! The chevrons ("<" and ">") are not meant to be typed, they just enclose the placeholder. Please leave them out and report if it works for you, thanks!

joshuawagner commented 4 years ago

Okay, I deleted the chevrons and also changed user to users. The readme (in the section on positionals) says it should be user/<userid> but it should say users/<userid>

Bookends did crash 3 times in the process of syncing 4000 items but each time I restarted Bookends it picked up where it left off.

joshuawagner commented 4 years ago

Sync is working great! Thank you! Another question...

Which import filter is being used by the sync? I'm trying to sort out what I think is a field combination issues from the import/sync process. I'm seeing Volume and Issue data concatenated in the Volume field. For example, I'm seeing 10 (4) when I think I should see just 10. Zotero and Bookends both have Volume and Issue so I thought I'd try to seperate them. The problem with leaving it in the current format is that Harvard format has no space between Volume and Issue so I'm looking to have 10(4) as my final output from the format manager.

cboulanger commented 4 years ago

I happy sync is working for you generally, and your feedback is welcomed on everything that doesn't work so great yet.

Volume/Issue might have a bug, please look at the following lines of code: https://github.com/cboulanger/bookends-api/blob/master/examples/bibsync/bookends/dictionary.js#L127 https://github.com/cboulanger/bookends-api/blob/master/examples/bibsync/bookends/dictionary.js#L170 https://github.com/cboulanger/bookends-api/blob/master/examples/bibsync/bookends/dictionary.js#L382

I cannot remember what the reasoning behind this code was - maybe you can spot the mistake?

cboulanger commented 4 years ago

The sync works by translating "local" (i.e. Zotero and Bookends) fields into "global" ones (which are basically Zotero fields with some modifications to make it a flat map) and then retranslating them into "local" fields, using "dictionary" files.

joshuawagner commented 4 years ago

Alright, I made some changes and got it work on my computer. This is my first time doing any of this so please let me know if there's anything I should be doing differently. Is it normal to create or combine a whole bunch of different pull requests or do you make all the changes on the same file at the same time?

cboulanger commented 4 years ago

Great job, thank you! Separating PRs is always a good idea since it allows to independently review and test the change. I don't have any tests (yet), the Travis CI job fails because the documentation generator is broken.