TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 515
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 117
  • Total: 117

Import acticles and categories direct into database

Started by sangham.net, June 12, 2013, 06:54:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sangham.net

Dear TP friends and supporters,

I would like to integrate some thousands of articles within hundreds of categories into frame of TP articles.
Till now I did it one by one. I just thought if there might be a possibility to import or integrate it "direct" to the database so that it could be done more effectively.

The articles are single html files.

Do anybody have an idea. Would it be possible to put them "simply" (I am not so familiar with  SQL and My SQL) into the database? Is it just one list that contains the articles or does it require more lists so that an article will appear on TP?

Thanks a lot in advanced!

Truly! So strive to be one of them. Or like to get a random Sutta?

If you like to get involved in helping developing an "Virtual monastery" to make the internet a little more accessible for Monks, Nuns and Ascetics, please feel heartily invited to join our bilingual community at sangham.net

IchBin

Well it's not "simple" to do. You have many things to think about when trying to convert and import something into the database. How will you determine which articles go into which categories? Are you just wanting to create an article that points to the HTML file? Or are you wanting to copy the HTML file from it, into the article body in the database? So many details, it's hard to write it all out in a post. But it will certainly involved writing code to import all your articles. Not something I have time for in particular.

sangham.net

Thanks for your care IchBin,

the secound one: "Or are you wanting to copy the HTML file from it, into the article body in the database? "

QuoteBut it will certainly involved writing code to import all your articles.

So it's not done with "simply" add it in the database but very complex interrelation between different tables (Lists)?

QuoteNot something I have time for in particular.

Understandable.

How every if a idea occurs, would be great if you have time to share it, but no need to burden the limited time additional or to make it an issue for more things to care of. I can do it at least piece by piece as well and its a good concentration practice.

Thanks!



Truly! So strive to be one of them. Or like to get a random Sutta?

If you like to get involved in helping developing an "Virtual monastery" to make the internet a little more accessible for Monks, Nuns and Ascetics, please feel heartily invited to join our bilingual community at sangham.net

IchBin

What I mean, is that no matter which way you do this it will likely require code to be written in order to automate it. You can of course go in and manually create entries into your database. But that is almost just as slow as going into TP and manually creating the categories and articles yourself.

It depends on how you have these articles setup though. Are the html article files you want converted in different directories for their categories?

sangham.net

QuoteIt depends on how you have these articles setup though. Are the html article files you want converted in different directories for their categories?

Yes.

There are html files 1,2,3,4... which have to have their categories A,B,C and they are needed to be put into TP in the "same" way, some structure as they are now, but within the TP aricles.

Category A
--- Category A.A: Article 1, Article 2
--- Category A.B: Article 3, Article 4
Category B
--- Category B.A: Article 5, Article 6
--- --- Category B.A.A: Article 7

...
Every article is a specific html file which needs to have a specific name and place to be put in the categories. You could see the structure here for example and they need to come from there (after some additions a have to make in the files - head and foot) in the same way into the TP structure (database)
Truly! So strive to be one of them. Or like to get a random Sutta?

If you like to get involved in helping developing an "Virtual monastery" to make the internet a little more accessible for Monks, Nuns and Ascetics, please feel heartily invited to join our bilingual community at sangham.net

IchBin

Hmmm... I am not so sure those will display in the article system. They are actually articles written in xml. You could try to see if it works by including one of those articles as an external article type using one of the url's like this:
http://www.tipitaka.org/romn/cscd/vin01m.mul0.xml

If it does work, then all you need to do is to find someone that can write some code convert everything for you. It'll get pretty complicated.


sangham.net

IchBin, it was just to show teh structure. The files will be copied and saved as html on another place first in the same structure.

I am sure a good programmer will be able to manage a good code to make all this automatically. Just thought to ask if there is a useful middle way. Don't like to stress anybody with it.

External is not useful, as it should be a store place for it as well. Those are more than 2000 years old scripts, handed over 2600 years form generation to generation by oral citation (and we, better I, struggle with copy them digital, what a mass, what a shame)

Thanks a lot for your care, IchBin.


Truly! So strive to be one of them. Or like to get a random Sutta?

If you like to get involved in helping developing an "Virtual monastery" to make the internet a little more accessible for Monks, Nuns and Ascetics, please feel heartily invited to join our bilingual community at sangham.net

This website is proudly hosted on Crocweb Cloud Website Hosting.