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

fix(data): correct page and line numbers #1791

Merged
merged 2 commits into from
Jul 5, 2020
Merged

Conversation

sarabveer
Copy link
Collaborator

@sarabveer sarabveer commented Jun 26, 2020

Summary of PR

For SGGS, the page and line numbers were corrected according to the SGGS PDF available on SGPC.net

I made a csv file with 3 columns: id, source_page, source_line

This was then imported into the DB using the following query:

UPDATE lines
SET
	source_page = (SELECT source_page FROM fixedLines WHERE id = lines.id),
	source_line = (SELECT source_line FROM fixedLines WHERE id = lines.id) 
WHERE id IN (SELECT id FROM fixedLines)

Ideally, this would be done through #1388. I could be able to feed the bot the csv file and it could automatically commit changes.

For Sri Dasam Granth, the changes were done manually with the ones mentioned by @SSAT in #1763

Time spent on PR

nine_thousand_years

Linked issues

Fix #1763

Closes #1764
Closes #1765

@sarabveer sarabveer requested a review from bhajneet June 29, 2020 02:31
@sarabveer sarabveer added Effort 0 Non-work/tracking Impacts All Affects nearly all or all end-users! Status: Merge ○ Type Bug Regressions/production issues that do not function as intended. labels Jun 29, 2020
@sarabveer sarabveer marked this pull request as ready for review June 29, 2020 02:31
@bhajneet
Copy link
Member

Since there are files for "source_page" 156 and 157, how does json 155 contain lines that go all the way to 158?

Only other confusion I have is how source_line was figured out

@sarabveer
Copy link
Collaborator Author

sarabveer commented Jun 29, 2020

Since there are files for "source_page" 156 and 157, how does json 155 contain lines that go all the way to 158?

There is only 0155.json, after that there is 0159.json

Only other confusion I have is how source_line was figured out

For which composition?

@bhajneet
Copy link
Member

Looking at the branch it seems 156 and 157 exist:

For which composition?

Just wondering how any of them were done. E.g. programmatically/manually?

@bhajneet
Copy link
Member

I just realized that you've used the SGGS PDF, but you've also made changes to multiple compositions. So instead, I wonder what was the procedure for Sri Dasam Granth, for instance? Was this done manually?

@sarabveer
Copy link
Collaborator Author

@bhajneet its mentioned in the PR description

@bhajneet
Copy link
Member

How was the line number/source line obtained programmatically from a PDF? Were there newline characters or something you used?

@sarabveer
Copy link
Collaborator Author

sarabveer commented Jun 30, 2020

I should clarify its a re-import of the page numbers from Kulbir S. Thind's original DB which is based on the SGPC PDF (which Thind had created as well)

As mentioned in #1763, our original source for the metadata was iGurbani.

This also raises the question if our author ids are correctly assigned.

Copy link
Member

@bhajneet bhajneet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sarabveer please track exploration of author ids in a new issue

@Harjot1Singh Harjot1Singh merged commit a94e59f into dev Jul 5, 2020
@Harjot1Singh Harjot1Singh deleted the fix-page-numbers branch July 5, 2020 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Effort 0 Non-work/tracking Impacts All Affects nearly all or all end-users! ○ Type Bug Regressions/production issues that do not function as intended.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong Page Number set for R0LK Wrong Page Number set for CBMX Lines not being ordered correctly
3 participants