Auto reading of CSV Files

Using a CSV file as a resource to populate a table. Straightforward enough. Place in
resources/xxxx.csv

However, if I want to change the CSV file contents and re-populate the table without forcing a reload into resources, how do I do it? Can I place the file somewhere else where I can edit it such that it will be read every time the table page is opened?

David

The Grid Iron stack can use Google Sheets to populate a table. Changes are reflected instantly. It works very well. I think there are a few others that do a similar job.

thanks will check it out

Not sure I really understand after all. This is my first go with RW. If I place a file in my Resources in RW, where is the file so I can edit it?

Rather then using RW resources, I’m suggesting the option of storing your data externally in a Google spreadsheet. This can be updated from anywhere via Google Docs, without the need of access to RapidWeaver.

Any changes will be reflected immediately in your website table.

This suggests then, that RW cannot do what i want (generically).

Is this the case?

It just seems easier to maintain everything in one location.

When RW stores something in resource/file-name.csv, is this just a local reference inside the .rw file and not a physical location. Is this correct.

David

Try the aptly named CSV To Table stack:
https://rwextras.com/

Alongside the ability to attach your CSV or TSV file as a resource in RapidWeaver, you can upload the file to a location on your web server (via FTP or a file upload / manager stack) and link to it via a relative path. Each time the CSV file changes on the web server, the changes are immediately reflected on your live website (just refresh the page). There is a free demo version to try.

But I am trying to develop the web site before publishing. My RW file is on my desk top. Do I have to publish locally every time to test it out?

Sorry if I am not explaining it very well.

Yes. Or you use a FTP application for uploading the CSV.

Resources are mostly intended as “nice to add” files which you do not intend to frequently change. Files like a few images, a small video or PDF downloads. RapidWeaver will embed then as part of the project file (so you can link to them), but may not necessarily keep reliable track of changes you make to them on your computer. Resources can be good to quickly test things offline on a temporary basis.

For a table derived from a CSV file, one assumes the data is going to be changing quite often. In which case, it would be recommended you seek to ‘warehouse’ the files and store them on the web server itself. It is possible to remotely edit files on the server or periodically replace them with newer copies - using FTP or a free file manager stack like FileMan. A stack like CSV To Table is able to read these remote files after your site is published.

Think I have got this now but how can I test it locally before publishing?

I find this simpler method works for me.

I just have my .csv files for tables in Resources and keep the originals on my laptop (which is backed up).
I update the .csv files on my laptop, mostly weekly, and do a replace resource in RapidWeaver for each changed file before any other updates to the site contents and then a publish to get the latest content onto the hosting server.

You have to update the .csv files somewhere and this method makes previewing easy as all the updates are done on my laptop and the publish is only done once I am happy with the updated site.

I realise this is not very elegant but for a small web site with not many changing tables it works well for me.

Thanks Julian. This is the method I have been using while in development mode. Just thought it strange that there wasn’t a more efficient method.

I will look at the other suggestions when I get round to publishing.

David

Hi Julian

Think I have sussed out a method. I do store all the csv files in /resources along with the .numbers version. That way I can maintain integrity and edit the .numbers file before exporting the csv.

I then use MAMP to view the pages.

David

The reading of csv files requires php…at lease as far as I know…but after the table is up and working…you can edit the csv file and no republish is required…I do it everyday!!

I use this stack: http://weaveraddons.com/stacks/csv-grid/

Do not buy anything from WeaverAddons. They have been MIA for years and will provide zero support.

I do have another option: https://joeworkman.net/rapidweaver/stacks/power-grid-csv

Thanks Joe (Martin)
Your advice is much appreciated.

Thanks Joe (W)

Had a look at weaveraddons and like you say , the site is not functional.

I was going to buy power-grid anyway because I like your videos and support.

David

I agree with Joe
And I do have his power-grid