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?
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.
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.
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.
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.
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.
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.
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!!