Comments (4)
from lurnby.
Yeah its actually all data that need to be imported back to a local Lumby. I mean it make more sense that way.
from lurnby.
There is one difficult part of this which is that it's not guaranteed that the highlight will be able to keep the reference to it's counterpart in the actual article text.
When you highlight in an article, the actual html content gets updated with a span that shows the highlight. The span is given an id
which matches the newly created highlight_id
. That's how we know which highlight to open within the actual article.
That's also how we can navigate back to that part of the text when you're viewing a highlight elsewhere and click the go to highlight
button. It opens up the article page and navigates to #HIGHLIGHT<highlight_id>
This causes issues when thinking through the import, because it's not guaranteed that you will be importing into a completely blank database. The lurnby database that you might be trying to import the files into, is likely another active installation which means that the highlight_id
may not be unique.
If it's not unique, we will need to generate a new highlight_id
to proceed with the import. In which case, the link between the highlight and the text will be broken.
from lurnby.
Perhaps the issue above isn't so complicated though.
We have
- Article text
- Original highlight_id
- New unique highlight_id
If when importing we determine that a highlight can't be created with the original_id
, we create a new highlight id. Then we do a search and replace in the article.text
for #Highlight<original_id>
replacing it with #Highlight<new_id>
Then the reference stays and we have no issue.
from lurnby.
Related Issues (19)
- Deleting articles HOT 2
- Incomplete Unit tests HOT 1
- Medium Articles (any articles behind paywall)
- add by email fails if there is more than 1 recipient. HOT 1
- Markdown support for all text area inputs.
- Add TinyMCE support to manual article entry.
- Creating a Lurnby api
- Highlighting images and media doesn't work yet. HOT 1
- Email Sender Identification
- Titles in Highlights Email are Tiny HOT 1
- Export should offer html or plaintext options HOT 1
- Decouple from Amazon HOT 1
- DB Connection Timeout Issue
- Allow external highlights HOT 1
- Need a more comprehensive help section
- PDF parsing is poor HOT 6
- Offline Mode for web hosted lurnby
- Finding Epub Images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lurnby.