[ILUGC] How to edit a file in a remote git repo automatically?

  • From: Shrinivasan T <tshrinivasan@xxxxxxxxx>
  • To: ilugc@xxxxxxxxxxxxx
  • Date: Wed, 23 May 2018 01:25:52 +0530

Hello all,

For FreeTamilEbooks.com we use a xml file with list of all books info.
We use the file for android, ios apps and download reports.

For each book we release, we have to add the book details in this file.
https://github.com/kishorek/Free-Tamil-Ebooks/blob/master/booksdb.xml

I am working on automating the entire publishing process.
I am done with ebook making and all wordpress automation with
wordpress-xmlrpc-api and selenium.

here is the repo - https://github.com/tshrinivasan/make_ebooks

Now, want to update the booksdb.xml file automatically.

Need help on this.

Seems GitPython can be used.
Got this link as reference for modifying files.
http://gitpython.readthedocs.io/en/stable/tutorial.html#modifying-references

But, cant get an example of how to add some content to existing file and commit.

Please help on finding a code/solution for this.

Thanks.

-- 
Regards,
T.Shrinivasan


My Life with GNU/Linux : http://goinggnu.wordpress.com
Free E-Magazine on Free Open Source Software in Tamil : http://kaniyam.com

Get Free Tamil Ebooks for Android, iOS, Kindle, Computer :
http://FreeTamilEbooks.com
_____________________________________
ILUGC List: http://www.freelists.org/list/ilugc
ILUGC Web: http://ilugc.in/

Other related posts: