textbrowser / biblioteq

Archive and catalog the world for today's and tomorrow's generations! Awesome and everyware.
https://textbrowser.github.io/biblioteq/
Other
217 stars 46 forks source link

Export /Import Csv with fields containing hypertext links. #381

Open meteos77 opened 2 days ago

meteos77 commented 2 days ago

Documents that have in the “keywords” area “cheese". “desserts”. so 2 hypetext links

how to export in csv so that the 2 keywords remain distinct when imported?

Currently, it becomes “cheese desserts” and not “cheese” and “desserts”.

Thanks in advance for the ideas

textbrowser commented 2 days ago

You got problems. Export from BQ and then import into BQ is illogical. It is not a symmetric operation. Can't export image data for example. And the export is of what you see. So you see a Category column with many newlines in the database presented as one with many spaces in the table. The alternate is then not present with many spaces (wide column) and instead present with many newlines (tall column). Either is ugly because of lots of characters. Export is tabular not database because SQLite has better database export.

Then the import. Doesn't know what is a newline and what is a space. Since you have spaces in column, can't add newlines in export.

Cannot do database export because then it is duplicating the database engines; yes, engines. And that is not BQ.

So only solution is then display tall or wide columns. That is only software solution because, again, not exporting via the database. Other is that you correct the data after import.

textbrowser commented 2 days ago

You have one row occupy one screen because of many newlines. Ugly. You have wide columns and many visible rows. Less ugly.

meteos77 commented 2 days ago

my problem has more to do with the hypertext link no longer working.

textbrowser commented 2 days ago

Nah, not the problem. The problem is that it was two values and now is one value.

meteos77 commented 2 days ago

Other is that you correct the data after import.

What does it mean to correct?

meteos77 commented 2 days ago

How to import 2 values into hypertext fields?

textbrowser commented 2 days ago

I explained the solution. Don't know what you ask.

textbrowser commented 2 days ago

You place mouse cursor over the single line and press Enter then have two lines and then Save.

textbrowser commented 2 days ago

So my line is "got milk" and I put little mouse on space before milk or after got and press Enter. Then I got got and milk and so I have. Now BQ knows two hypers.

textbrowser commented 2 days ago

Or you let the imported data be what it is and the hyper will function for that single book unless others have got milk like you now have. Will not work for got and milk as singular in that particular instance because got milk is one and not two. Want two? Press the Enter.

meteos77 commented 2 days ago

I couldn't find the discussion, but you explained something else to me. I'm going to look in depth for old exchanges.

textbrowser commented 2 days ago

Nah, I would remember that. There be a tool tip too for pressing alt and focusing and clicking.

textbrowser commented 2 days ago

BQ creates hypers for each lined item. So if "got milk" and "don't got milk" are two lines in said field, you got two hypers. Lines are hypers and single line is one long hyper irrespective of spaces.

meteos77 commented 2 days ago

In any case, your solution is not feasible for 600 imported documents.

textbrowser commented 2 days ago

Problem is that your original items appear as two hypers in book item and single item in table column. So you export and got one item and then import and got one item but you want two hypers.

textbrowser commented 2 days ago

In any case, your solution is not feasible for 600 imported documents.

Again, you either get 25 items in table with newlines and big row or you get wide columns. And this is for hypers and exports. So you want ugly tall column and can't see anything else just so you can get hypers. Makes no sense so this has to break other people's brains.

meteos77 commented 2 days ago

I don't think you've understood me : hypers are not accessible via the board?

textbrowser commented 2 days ago

Libre probably does not work with values spanning multiple rows. And so we need special values like \n for lines and treat lines maybe special in export. But why you export from BQ and them import into BQ? Nonsense. Copy the database.

textbrowser commented 2 days ago

What board? What is board? Chess? Mahjong?

textbrowser commented 2 days ago

Will try to interpret \n (newlines) in import for keywords. But newlines which are visible not lines spanning multiple rows.

textbrowser commented 2 days ago

Where you get data from if you have 600?

meteos77 commented 2 days ago

Let's not talk about exports any more - that's part of the problem.

When the 600 documents arrive, we want to retrieve the information from the unimarc records transformed into csv. the information concerning the subject of the document is often multi-word, and therefore multi-hypertext.

textbrowser commented 2 days ago

Explain data origin.

textbrowser commented 2 days ago

"hello you broken" is multiple words. How you want BQ to know that? "I know an atom." is a structured sentence and you want hypers or one hyper? How BQ supposed to know? Magic from Mahjong!

textbrowser commented 2 days ago

In download from 39.5 or SRU, keywords or categories are separated properly so BQ knows. It thinks and concludes with knowledge. In import, how it knows you want 3 millions hypers?

textbrowser commented 2 days ago

Commas? Nope. Any character it doesn't know. You need special sequence but then that breaks someone too unless sequence tells BQ that this field includes replacements for hypers or something else.

meteos77 commented 2 days ago

It seems to me that you told me the solution... I'm looking for it...

textbrowser commented 2 days ago

Tell us your categories in CSV which you know that they need separation and which character and we need to introduce separation anxiety into BQ. Like, BQ replace this with that. ';' -> \n

meteos77 commented 2 days ago

Can we have a double character, for example “;;”

textbrowser commented 2 days ago

No.

textbrowser commented 2 days ago

Your sequence is someone's reality.

textbrowser commented 2 days ago

Need column and rows and some defaults which free us from doing this again for hypers. I know I could solve this like in a few seconds from data inspection and some scripties and parties but that's another story for another time.

textbrowser commented 2 days ago

So now more big project.

meteos77 commented 2 days ago

Good project then thanks for all the explanations.

textbrowser commented 2 days ago

We understood before you posted and the request is kind of, maybe not so kind, silly because hypers are not a commodity. And your data is not kind of but is broken because it has special characters. What would be difficult but fancy would be to import that and then have a big download of SRU for 600 items but not easy to do with single pair of hands. So we have all the solutions all ready but they ain't implemented. Implementation is like the people going to build the bridge. Free bridge and no one pays them. Like prison labor.

textbrowser commented 2 days ago

We love virtual real people.

meteos77 commented 2 days ago

746-document_with_html_br.csv.tar.gz 746-document_with_semicolon.csv.tar.gz

I'm looking for the category “equitation" or “cheval"

We'll use the standard book search. It works very well. Which is already wonderful!

meteos77 commented 2 days ago

We understood before you posted and the request is kind of, maybe not so kind, silly because hypers are not a commodity. And your data is not kind of but is broken because it has special characters. What would be difficult but fancy would be to import that and then have a big download of SRU for 600 items but not easy to do with single pair of hands. So we have all the solutions all ready but they ain't implemented. Implementation is like the people going to build the bridge. Free bridge and no one pays them. Like prison labor.

That would be great :-)

I've made a bit of a script based on yours for uploading images Telechargement_BnF-ark_resume_physique.sh.tar.gz