[英]Convert CVS/SVN to a Programming Snippets Site
I use cvs to maintain all my python snippets, notes, c, c++ code. 我使用cvs维护我的所有python代码段,注释,c,c ++代码。 As the hosting provider provides a public web- server also, I was thinking that I should convert the cvs automatically to a programming snippets website.
由于托管服务提供商还提供了公共Web服务器,因此我认为我应该将cvs自动转换为编程摘要网站。
I tried with rest2web , it is requires that I write /restweb headers and files to be .txt files and it will interfere with the programming language syntax. 我尝试过rest2web ,它要求我将/ restweb标头和文件编写为.txt文件,这会干扰编程语言的语法。
An approach I have thought is: 1) run source-hightlight and create .html pages for all the scripts. 我认为一种方法是:1)运行source-hightlight并为所有脚本创建.html页面。 2) now write a script to index those script .htmls and create webpage.
2)现在编写一个脚本来索引这些脚本.htmls并创建网页。 3) Create the website of those pages.
3)创建这些页面的网站。
before proceeding, I thought I shall discuss here, if the members have any suggestion. 在继续之前,我想如果成员有任何建议,我将在这里进行讨论。 What do do, when you want to maintain your snippets and notes in cvs and also auto generate it into a good website.
当您想在cvs中维护代码片段和注释并自动将其生成到良好的网站时,该怎么办。 I like rest2web for converting notes to html.
我喜欢rest2web将注释转换为html。
enscript or pygmentize (part of pygments) can be used to convert code to HTML. enscript或pygmentize(部分pygments)可用于将代码转换为HTML。 You can use a custom header or footer to link to the actual code for download.
您可以使用自定义的页眉或页脚链接到实际代码以进行下载。
I finally settled for rest2web . 我终于解决了rest2web 。 I had to do the following.
我必须执行以下操作。
I have the completed website here, It is called uthcode . 我在这里有完整的网站,称为uthcode 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.