Component Idea: Import Content from files

Locked
quiquedcode
Joomla! Ace
Joomla! Ace
Posts: 1384
Joined: Thu Aug 18, 2005 10:11 pm
Location: San Juan - Argentina
Contact:

Component Idea: Import Content from files

Post by quiquedcode » Thu Aug 23, 2007 4:59 pm

Plz move this topic to correct forum, in case I posted here incorrectly

Hi guys
When I saw this topic
http://forum.joomla.org/index.php/topic ... cseen.html

I searched the joomla extensions site, but could not find someone that can do this

- Allow user to specify a FTP folder in his website. This folder should contain htm files, doc files, pdf files, etc.
(another option would be to have a listing of files from X folder) so user can ctrl+select the files he wants to import
- Once user specifies a folder, he should specify which Category should the files be imported into

The process would be:
- Take first file, get its filename
- Take the file contents, by reading it, by using a PDF php class (when file is PDF) ... etc.
- Create a new content item into the category specified, with the title=filename and content=contents_read_from_file
Of course, the new content item must be created using SQL and inserted into the content table

As I'm not familiar with component programming, I think it would be nice to have such component, am I wrong ?
It is just an Idea I've got
@kabeza
Freelance Joomla/CodeIgniter Developer
Home: http://www.beza.com.ar

User avatar
tjay
Joomla! Explorer
Joomla! Explorer
Posts: 325
Joined: Thu Aug 18, 2005 1:50 am
Location: New Orleans
Contact:

Re: Component Idea: Import Content from files

Post by tjay » Fri Aug 24, 2007 2:45 pm

Wow that sounds pretty useful. I wonder what the feasibility would be.
Maybe one of our Joombie mentors can shine some light on if this is possible, and if it is something new coders could handle?
This day it is my wish that I helped you to live

User avatar
seadap
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 123
Joined: Mon Dec 04, 2006 12:22 am
Contact:

Re: Component Idea: Import Content from files

Post by seadap » Fri Aug 24, 2007 3:56 pm

Perhaps I'm a little off but can't you do the same thing with the media manager in the admin section?  Or are you wanting to give this access to your users?
Knowledge is realizing that the street is one-way, wisdom is looking both directions anyway.

quiquedcode
Joomla! Ace
Joomla! Ace
Posts: 1384
Joined: Thu Aug 18, 2005 10:11 pm
Location: San Juan - Argentina
Contact:

Re: Component Idea: Import Content from files

Post by quiquedcode » Fri Aug 24, 2007 5:40 pm

Hi guys

@tjay
I'm going through the tutorials available for learning component development, but my actual knowledge for this isn't enough yet, although I know php very well

@seadap
I'd only use the file uploading feature of the media manager. The idea is to upload an htm/doc/pdf file, and extract its contents for creating a new content item from it, therefore I'd not need to keep it after uploaded, it would be deleted after content item was created.
Also, the files imported from the ftp folder, would be deleted after this task was finished... (with a checkbox allowing to keep them)

I wish to know enough to make it, because I think it is useful, and I think it would be a "quick" development, because I've seen some pdf/doc/file classes for php that would help a lot

:)
@kabeza
Freelance Joomla/CodeIgniter Developer
Home: http://www.beza.com.ar

User avatar
tjay
Joomla! Explorer
Joomla! Explorer
Posts: 325
Joined: Thu Aug 18, 2005 1:50 am
Location: New Orleans
Contact:

Re: Component Idea: Import Content from files

Post by tjay » Fri Aug 24, 2007 6:12 pm

Importanting the document content itself would not be that hard, but you still have all the other fields in the content table to contend with.
Like author
Published status
cat ID
Sec ID
so on and so forth
This day it is my wish that I helped you to live

quiquedcode
Joomla! Ace
Joomla! Ace
Posts: 1384
Joined: Thu Aug 18, 2005 10:11 pm
Location: San Juan - Argentina
Contact:

Re: Component Idea: Import Content from files

Post by quiquedcode » Fri Aug 24, 2007 6:15 pm

You're right tjay, but these options should be available before importing, with checkboxes or radiobuttons

- Author would be choosen automatically, by getting the logged user info
- published status = select list
- section = select list
- category = select list

a good idea would be to have the same section/category selector as available in the WYSIWYG editors
@kabeza
Freelance Joomla/CodeIgniter Developer
Home: http://www.beza.com.ar

User avatar
seadap
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 123
Joined: Mon Dec 04, 2006 12:22 am
Contact:

Re: Component Idea: Import Content from files

Post by seadap » Fri Aug 24, 2007 10:33 pm

quiquedcode, are you trying to suggest building a new component or is this just a coding question?
Knowledge is realizing that the street is one-way, wisdom is looking both directions anyway.

quiquedcode
Joomla! Ace
Joomla! Ace
Posts: 1384
Joined: Thu Aug 18, 2005 10:11 pm
Location: San Juan - Argentina
Contact:

Re: Component Idea: Import Content from files

Post by quiquedcode » Fri Aug 24, 2007 11:27 pm

seadap
I'm posting a general idea so someone (with enough knowledge about custom joomla component programming skills) can develop this component
I think this could be an useful addition...

If I had enough joomla coding skills, I'd do it by myself... I've just started reading about this some days ago, but still not enough

I'll try playing and putting code in a "blank skeleton" component I got from a tutorial
@kabeza
Freelance Joomla/CodeIgniter Developer
Home: http://www.beza.com.ar

User avatar
seadap
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 123
Joined: Mon Dec 04, 2006 12:22 am
Contact:

Re: Component Idea: Import Content from files

Post by seadap » Fri Aug 24, 2007 11:34 pm

No problem Q.  I just wanted to make sure we were in the right forum.  This area is for people learning to code.  If you want to have someone build it for you perhaps we can move this to where they're more likely to see it over here.
Knowledge is realizing that the street is one-way, wisdom is looking both directions anyway.

quiquedcode
Joomla! Ace
Joomla! Ace
Posts: 1384
Joined: Thu Aug 18, 2005 10:11 pm
Location: San Juan - Argentina
Contact:

Re: Component Idea: Import Content from files

Post by quiquedcode » Fri Aug 24, 2007 11:49 pm

Well, I think professional services are more for the ones who need a solution and want to pay someone for getting coded quickly
In this case, this is an idea I got. I don't need it, but I think it will be very useful

See ya :)
@kabeza
Freelance Joomla/CodeIgniter Developer
Home: http://www.beza.com.ar

User avatar
seadap
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 123
Joined: Mon Dec 04, 2006 12:22 am
Contact:

Re: Component Idea: Import Content from files

Post by seadap » Sat Aug 25, 2007 1:17 am

I didn't mean to run you off Q.  I just wanted to make sure the right eyeballs were seeing your ideas.
Knowledge is realizing that the street is one-way, wisdom is looking both directions anyway.

quiquedcode
Joomla! Ace
Joomla! Ace
Posts: 1384
Joined: Thu Aug 18, 2005 10:11 pm
Location: San Juan - Argentina
Contact:

Re: Component Idea: Import Content from files

Post by quiquedcode » Sat Aug 25, 2007 10:53 am

seadap wrote: I didn't mean to run you off Q.  I just wanted to make sure the right eyeballs were seeing your ideas.
lol, no prob man, thanks
@kabeza
Freelance Joomla/CodeIgniter Developer
Home: http://www.beza.com.ar

MvBrakel
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Mon Aug 27, 2007 7:40 am

Re: Component Idea: Import Content from files

Post by MvBrakel » Tue Aug 28, 2007 6:26 am

Well nice idea indeed, bit complex for the 101's though.

I have build this for our own CMS at work, so i know how to build it. It's not hard at all but there are some very important cons in this component.

The list i can support:


  *.txt
  And all other binaries


  *.pdf
  PDF lib allows to do this


  *.doc
  No text formatting though



To parse *.doc files with formatting u need an extra php extension. Seeing most people don't have access to their host shell i don't think this would be good to spend time on.

I'll look into parsing more file types.

tanryoku
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Apr 26, 2007 9:43 pm

Re: Component Idea: Import Content from files

Post by tanryoku » Thu Apr 17, 2008 7:00 pm

MvBrakel wrote:Well nice idea indeed, bit complex for the 101's though.

I have build this for our own CMS at work, so i know how to build it. It's not hard at all but there are some very important cons in this component.

The list i can support:

*.txt
And all other binaries

*.pdf
PDF lib allows to do this

*.doc
No text formatting though

To parse *.doc files with formatting u need an extra php extension. Seeing most people don't have access to their host shell i don't think this would be good to spend time on.

I'll look into parsing more file types.
I'd be very interested in this, if you wanted to release it. I'm sure others would be as well - especially for admins who have to input a lot of content.

*to self* Way to go - reviving an old board...


Locked

Return to “Joombie Think Tank”