1 Replies - 336 Views - Last Post: 27 July 2015 - 05:45 AM

#1 sexycode  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 26-July 15

Synchronizing webpage and local pdf

Posted 26 July 2015 - 08:21 PM

I would like to solve the following problem. On my website, I have a list of my publications. I also have my list of publications on a latex file of my cv. The issue is that I update these manually, and it becomes tedious and error-prone to keep both in sync. I would like to write a program that will automate the process of syncing.

In my mind, I imagine having a single text file with the raw data of the publications. The program then should

- format this data so it fits the format of my cv and then has latex create a pdf using this data.
- format this data so its fits the format of my website and then adds it to the HTML code in the right way.

I can handle the string manipulation needed to format and I figured out how to instruct the program to add the strings to the tex file in the right place. What I lack is an understanding of how to add the strings to the html file in the right place, and how to automatically compile the latex file.

Is This A Good Question/Topic? 0
  • +

Replies To: Synchronizing webpage and local pdf

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 4370
  • View blog
  • Posts: 14,096
  • Joined: 05-May 12

Re: Synchronizing webpage and local pdf

Posted 27 July 2015 - 05:45 AM

If you didn't need a static HTML page, you could simply put some AJAX calls on your HTML page to call a web services, and your web service returns the contents of your test file. The success handler for your AJAX call will take care of formatting the resuls in the HTML page.

If you need a static page, you'll need something that can load your static HTML page as a DOM, and use the HTML DOM to insert the new information, and lastly resave the page as HTML once more. I'm not familiar enough with Linux to recommend and tools or libraries for HTML DOM loading and manipulation. In the Windows world, HTML DOM manipulation comes built into the OS (and was the core of M$FT's argument about IE being "integrated" into the OS back in the 90's).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1