3 of 14
3
Plugin: CSVGrab
Posted: 18 April 2007 07:24 AM   [ Ignore ]   [ # 37 ]  
Lab Assistant
RankRank
Total Posts:  131
Joined  01-12-2006

Thanks guys. The URL title is indeed a concern but I’m not sure at this stage if we’ll be using them at all. If we are then it should be relatively simple to come up with a solution that runs through the DB and appends an auto_increment value to any duplicate titles. If we’re not I don’t think there should be any negative effects, but I will double and triple check that.

 Signature 

VayaDesign | EE Design & Development Services
EE Goodies: TealTemplate, Simple Pagination Plugin

Profile
 
 
Posted: 18 April 2007 07:47 AM   [ Ignore ]   [ # 38 ]  
Lab Assistant
RankRank
Total Posts:  165
Joined  12-21-2005

The url issue will exist with the current version of the plugin.

When I finally get the new version out the url will automatically auto increment.

 Signature 

Andrew Weaver — brandnewbox.co.uk


Member of EE Professional Network · More plugins, extensions and modules · Documentation

Profile
 
 
Posted: 18 April 2007 07:52 AM   [ Ignore ]   [ # 39 ]  
Lab Assistant
RankRank
Total Posts:  131
Joined  01-12-2006

Oh absolutely, I’m aware that I will have duplicate url titles currently, it’s just whether or not that’s actually a concern at this point. If we’re not going to use them I wouldn’t imagine it will matter.

Great to hear you’re adding an auto increment feature in the future though.

Thanks again,
Dom

 Signature 

VayaDesign | EE Design & Development Services
EE Goodies: TealTemplate, Simple Pagination Plugin

Profile
 
 
Posted: 18 April 2007 11:40 AM   [ Ignore ]   [ # 40 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  208
Joined  07-23-2005

EDIT—

Apparently, while my “Reply to Post” window was open overnight, there was a whole bunch of new posts addressing this exact issue.

So, please feel free to pretend that I’m not an idiot who doesn’t read before posting.

I will, however, leave the post here to make my specific thoughts available.

Thanks,
Philip Jones

END EDIT—

Andrew,

Do you have any plans to update this plugin?

In peeking at the code I noticed that it checks to see if an entry’s title is unique before inserting it. It also does not restrict the query to any particular weblog.

It is my understanding that duplicate titles are acceptable, just not duplicate URL Titles within the same weblog.

Could this be updated to check “url_title” for duplicates instead of “title”, as well as adding the “weblog_id” to the comparison?

And as a feature request, it would be nice if it could append a number to create a unique URL Title when a duplicate is found, instead of skipping duplicate URL Titles. As some may not desire this behavior, this should probably be optional.

Thanks,
Philip Jones

 Signature 
Profile
 
 
Posted: 19 April 2007 05:22 PM   [ Ignore ]   [ # 41 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  266
Joined  02-22-2006

Thanks for this plugin! I was able to suck-in several csv entries and assign categories very easily. This plugin has been a life saver!

Many thanks for sharing it with us! smile

Cheers,
M

Profile
 
 
Posted: 28 May 2007 12:15 PM   [ Ignore ]   [ # 42 ]  
Summer Student
Total Posts:  10
Joined  03-30-2007

Another question that I hope is relevant here as well: is there a way to explicitly specify the entry_id value when importing?

Profile
 
 
Posted: 20 June 2007 08:19 AM   [ Ignore ]   [ # 43 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  354
Joined  06-13-2002

Also a question:

Is there a possibility to import entries, and do that everyday and overwrite the entries that are allready in.
For me it’s handy to import everyday our catalog from our CRM to the website and update the entries that are edited and add the new ones

 Signature 

Visit the first Dutch EE Community

Expression-Engine.nl

Profile
 
 
Posted: 10 July 2007 12:59 AM   [ Ignore ]   [ # 44 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  420
Joined  10-10-2004

I noticed that I can add categories based on

{exp:csvgrab url="http://URL.csv"                                                  
                          
weblog="3"         
                          
title="1"
                          
delimiter=","
                          
encloser="QUOTE"
                          
category_field="9"
                          
category_group="1"
                          
use="2|3|4|5|6|7|8|9|10"
                          
fields="last|first|jobtitle|webaddress|emailaddress|office|doffice|zip|dist"   }

But after adding the entries they are not actually attached to the categories that were added.

I could have sworn that this worked the first time I tested this but not since…

It doesn’t make sense to add category functionality in adding them if they can’t also automatically be selected due the large number of categories I have and number of entries.

Profile
 
 
Posted: 06 August 2007 07:17 PM   [ Ignore ]   [ # 45 ]  
Grad Student
Rank
Total Posts:  39
Joined  02-26-2007

question removed - problem avoided via another method….

Profile
 
 
Posted: 07 August 2007 11:37 AM   [ Ignore ]   [ # 46 ]  
Research Assistant
RankRankRank
Total Posts:  845
Joined  08-05-2005
Dom.S - 18 April 2007 05:02 AM

One change I have had to make which may be useful to others, is that the duplicate title checking was a problem for me as I’m importing a huge list of businesses, some of which do have the same name. As a result the standard behaviour of the plugin was ignoring 6 out of the 7 businesses named ‘7 Eleven’ for instance.

To disable this just change the following on around line 148:

if ($query->num_rows == 0) {

To:

if ($query->num_rows == 0 or $query->num_rows > 0) {

This was very helpful to me, thanks so much for posting it.

Profile
 
 
Posted: 07 August 2007 02:31 PM   [ Ignore ]   [ # 47 ]  
Research Assistant
RankRankRank
Total Posts:  845
Joined  08-05-2005

Gah - actually, I’m having a heck of a time!  No matter what, I get 4 entries (I have 867).  Here’s my file.  I’ve tried both a url and a server path.

{exp:csvgrab url="/pathtomyfile/storelist_Jul07.csv"
                          
weblog="9"
                          
title="1"
                          
skip="2"
                          
delimiter=","
                          
encloser=""
                          
use="2|3|5"
                          
fields="store_street_address|store_city|store_zip" }

I need to put them in categories also, but pulled that out of the code to simplify and troubleshoot.  This is the output:

Checking: rora
Found: rora
Checking: S BOOKS & MUS
Found: S BOOKS & MUS
Checking: Hwy
Found: Hwy
Checking: S
Found: S

New entries: 4

I’ve made the above mentioned edit to the plugin, undone it and re-done it and I get the same results.  Thanks for any help!

Profile
 
 
Posted: 07 August 2007 05:23 PM   [ Ignore ]   [ # 48 ]  
Grad Student
Rank
Total Posts:  39
Joined  02-26-2007

Can I use CSV grab to import a DATE and have it update the standard EE date value?

I tried this:

{exp:csvgrab url=“URL”
weblog=“4”
title=“9”
delimiter=“TAB”
encloser=”“
use=“1|2|5|6”
fields=“var1|date|var2|var3” }

And in the db I’m importing, the date format is:

2007-08-07

When I tried the above code, it just set all of my dates to dec 31, 1969….

Profile
 
 
Posted: 20 August 2007 02:32 PM   [ Ignore ]   [ # 49 ]  
Summer Student
Avatar
Total Posts:  9
Joined  02-23-2006

Hello there,

first of all: I must say CSVGrab is a great tool and I’m very happy I found it. I’ve got it working in my app and it imported hundreds and thausands of entries for me.

But there are two tiny problems I’m wondering about if you or anyone in here could help me out with this:

1.) I import data with special characters, for example “München” -
  In my backend I use UTF-8 for character encoding. If I browse through my
  backend these characters are displayed like this: “M?nchen” - and this gets me
  confused because I’m not sure if the data was not imported correctly or if the data was just
  not displayed correctly due to character spezification. If I switch to ISO-8859-1
  in my backend installation, all characters are displayed correctly. That’s fine
  but then I’ll get other problems. Anyway….

    question Which encoding does SCVGrab use for the import of the data? Can you specify that
  in any way? Can I change that - for expamle - to UTF-8 ??

2.) CSVGrab provides you from the import of dublicate data because it checks first, if
  there exists an entry with the same title. This is great but not for me.

  I have a property consultant data base running on my installation. Consultants
  can be located in different towns, that means, that the names of the consultants
  (= title) will remain the same, but the category (= town) will differ.

  question What do I have to do to filter only dublicate content, if the title AND the
  category are the same
???

Thanks for any help you can provide.

If you want to take a look on the page I’m talking about go to:

http://www.weko-immobilien.com

It is a multilingual page with content in german, english and frensh. You can switch to a different language using the language navigation on top right of the page.

Thank you again and good night.  blank stare

 Signature 

WEB DESIGN ETC.

Professional Web Design from Salzburg, Austria.
Development, Design, CMS and Weblog Installation, Maintaining and Support.

Profile
 
 
Posted: 06 September 2007 11:39 PM   [ Ignore ]   [ # 50 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  420
Joined  10-10-2004

Can I use CSV grab to import a DATE and have it update the standard EE date value?

I’m in a similar boat. I would like to be able to update entry date via some type of import with the csv file. Not sure if that is possible?

Profile
 
 
Posted: 07 September 2007 08:03 AM   [ Ignore ]   [ # 51 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  208
Joined  07-23-2005

And while we’re requesting new features, I’d like to be able to establish relationships.

If relationships were a simple matter of putting and entry_id into a field, it would be a no-brainer. But since EE manages relationships in a separate table, CSVGrab would need to be able to take an entry_id from a specified CSV field and use that to create a proper relationship in the relationships table.

P

 Signature 
Profile
 
 
Posted: 11 September 2007 11:03 PM   [ Ignore ]   [ # 52 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  303
Joined  09-30-2003

Before i try this out—- if I import a csv file with 300 rows of data and 10 columns(headings) into my Products weblog will i end up with 300 entries that i can edit via the CP? That is will I be able to go and update a particular entry or Publish a new entry via the CP?  And will the ten columns headings populate my 10 custom fields which have the same name ... (Custom Field is called   Busi_name and my CSV column heading is Busi_name)

Hope this is what happens but want to confirm. wink

Profile
 
 
Posted: 12 September 2007 07:39 AM   [ Ignore ]   [ # 53 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  208
Joined  07-23-2005

Yes, but it’s not an automatic match-up.

You have to use the plug-in’s parameters to tell the plug-in what to do with the data.

For example, the “use=” parameter tells the plug-in which columns from the CSV should be used to populate your custom fields. The “fields=” parameter tells the plug-in which custom fields to put the data into. The “title=” parameter tells the plug-in which column should be used as the {title} of the entry.

There are a host of parameters that all work together to accomplish the desired result. Most of them are covered in the documentation for the plug-in. The plug-in docs can be accessed from the Plug-in Manager page after the plug-in is installed.

I found that the first attempt required a little trial and error, but what you will end up with is 300 new entries in the weblog of your choice which can be edited just like any other weblog entries.

Hope this helps.

 Signature 
Profile
 
 
Posted: 12 September 2007 08:30 AM   [ Ignore ]   [ # 54 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  303
Joined  09-30-2003

how does one run it??  I placed only the following into an empty tempalte caled IMPORT:

{exp:csvgrab url="http://www.mydomain.com/products.csv"
                          
weblog="12"
                          
title="1"
                          
skip="1"
                          
delimiter="TAB"
                          
encloser=""
                          
use="2|5|4|12|3"
                          
fields="prod_description|prod_price|prod_url|prod_imageurl|prod_keywords" }


But notthing happens….
My debugging page says i am missing a closing tag? If i add {exp:csvgrab} it doesn’t complain about a missing tag, but still nothing happens.

(0.102338) Tag: {exp:csvgrab url="http://www.mydomain.com/files/Sample.csv"                                                   Â                          weblog="12"          Â                          title="1" skip="2'                           delimiter="TAB"                           encloser="QUOTE"                           use="2|3|4|5|6|7|8|9|10|12|13|14|15"                           fields="first_name|last_name|address|city||member_number"  }
(0.103503) No Closing Tag

Profile
 
 
   
3 of 14
3
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64914 Total Logged-in Users: 22
Total Topics: 81869 Total Anonymous Users: 23
Total Replies: 440132 Total Guests: 159
Total Posts: 522001    
Members ( View Memberlist )
Newest Members:  smilepolitelyrvmcleodbjmohrAqua193Bios Elementmjpoteetguimogranwelshmrcfthenetmonkey