stpaultim / project_feed

GNU General Public License v2.0
0 stars 0 forks source link

Use Feeds module #2

Closed ghost closed 2 years ago

ghost commented 2 years ago

If you were to use the Feeds module to do the importing and saving of nodes, that'd save coding those parts yourself. Then you automatically get the 'ability to update nodes' feature for free.

Your module can get the data from GitHub, then save it to a CSV file on the server. Then simply setup Feeds to import CSV data from that file into nodes. Voila!

stpaultim commented 2 years ago

@BWPanda - Thanks for this suggestion.

I know that Jen is using the feeds module to pull in data from Github for the feature survey on the forum site and considered that as an option.

I decided to try programming it myself first as a learning exercise. But, I agree that sounds like a better solution.

stpaultim commented 2 years ago

@BWPanda - Are you aware of a Backdrop specific function to create a CSV file or will I be using something like this?

https://www.php.net/manual/en/function.fputcsv.php

ghost commented 2 years ago

Nothing Backdrop-specific I know of. I'd have just used something like that PHP function you found.

stpaultim commented 2 years ago

I have a PR that writes the Github data to a csv file on the server, but so far it does not yet read the data using feeds. That will be coming soon.

stpaultim commented 2 years ago

I've got feeds working. I'd like to make improvements on how it work. But, it works for now.

stpaultim commented 2 years ago

Reopening until I merge this PR. Hopefully tonight.