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

Some clipping types being mangled #4

Closed
dramalho opened this issue Jul 5, 2012 · 2 comments
Closed

Some clipping types being mangled #4

dramalho opened this issue Jul 5, 2012 · 2 comments

Comments

@dramalho
Copy link

dramalho commented Jul 5, 2012

Hi :)

I was using the script to import my clippings on to a database and noticed some clipping types were being incorrectly parsed, specifically on clippings with a Page information :

  • Highlight on Page 142 | Loc. 2170-74 | Added on Tuesday, July 03, 2012, 07:41 PM

I changed the regular expression on the parser.rb file to capture the first word after the initial dash and ignore everything up to Loc . It's an intermediate solution until I actually look into the semantics of that Page information (the correct thing would be to capture the page value) , but either way , here's the changed line :)

   second_line = lines[1].strip.scan(/^- (\w*)(?:.+?)Loc. ([0-9-]*?) +\| Added on (.+)$/i).first

Thanks guys, the rest works like a charm :)

@georgboe
Copy link
Owner

georgboe commented Jul 5, 2012

Hi and thank you very much for your feedback.

I just checked in some new changes in an attempt to support page numbers, see SHA 22f1e4a. Could you please check if the changes fixes your problem?

@dramalho
Copy link
Author

dramalho commented Jul 5, 2012

Like a charm, thank you sir :)

@dramalho dramalho closed this as completed Jul 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants