You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 11, 2025. It is now read-only.
There is a great deal of interest in storing laws in GitHub. Provide the functionality to export laws to GitHub, presumably via plain-text export to the file system. The glip project is a GPLd Git library for PHP—that could provide the glue for synching.
Specifically I'm thinking that the steps are:
Iterate through the structure table, creating directories named for the structure's number.
Iterate through the laws
Iterate through the laws_text table to get each subsection
Write each law and its text to files named for the section number, including the correct extension.
If the text to be put on GitHub is plain text, then it's necessary to iterate through the laws_text table, presumably via a new Laws method. On the other hand, if it's HTML, then the contents of laws.text can be used as-is, and the laws_text table can be ignored. Finally, if it's Markdown, either the laws.text content can be converted to Markdown, or perhaps a program like Markdownify can simply convert the HTML to Markdown. In a quick poll of subject-matter experts on Twitter, Markdown was the most popular format, with the caveat that it would be the wrong choice if anything was lost in the conversion. @emasters suggests using AsciiDoc, which is a supported file format within GitHub.
There is a great deal of interest in storing laws in GitHub. Provide the functionality to export laws to GitHub, presumably via plain-text export to the file system. The glip project is a GPLd Git library for PHP—that could provide the glue for synching.
Specifically I'm thinking that the steps are:
If the text to be put on GitHub is plain text, then it's necessary to iterate through the
laws_texttable, presumably via a newLawsmethod. On the other hand, if it's HTML, then the contents oflaws.textcan be used as-is, and the laws_text table can be ignored. Finally, if it's Markdown, either thelaws.textcontent can be converted to Markdown, or perhaps a program like Markdownify can simply convert the HTML to Markdown. In a quick poll of subject-matter experts on Twitter, Markdown was the most popular format, with the caveat that it would be the wrong choice if anything was lost in the conversion. @emasters suggests using AsciiDoc, which is a supported file format within GitHub.