New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync laws to GitHub #161

Open
waldoj opened this Issue Oct 9, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@waldoj
Member

waldoj commented Oct 9, 2012

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.

@ghost ghost assigned krues8dr Mar 25, 2013

@waldoj

This comment has been minimized.

Show comment
Hide comment
@waldoj

waldoj Mar 25, 2013

Member

@krues8dr, I've assigned this to you because I think you might enjoy finishing this up at some point. It's going to be a wildly popular feature, and get a lot of attention. But it's entirely possible that I'll surrender to temptation and do this myself. :)

Member

waldoj commented Mar 25, 2013

@krues8dr, I've assigned this to you because I think you might enjoy finishing this up at some point. It's going to be a wildly popular feature, and get a lot of attention. But it's entirely possible that I'll surrender to temptation and do this myself. :)

waldoj added a commit that referenced this issue May 15, 2013

Export plain text versions of laws
Towards supporting #161, although also just a useful bulk download.

waldoj added a commit that referenced this issue May 28, 2013

Overhaul the code-export functionality
Improvements to #280, but also to further progress towards #161.

waldoj added a commit that referenced this issue Jun 19, 2013

Offload plain text rendering to Law.inc.php
We actually already offloaded it; now we're removing the extra text generation from law.php. Per #160 and #161.

waldoj added a commit that referenced this issue Jun 19, 2013

Offload plain text rendering to Law.inc.php
We actually already offloaded it; now we're removing the extra text
generation from law.php. Per #160 and #161.

waldoj added a commit that referenced this issue Jun 21, 2013

Offload plain text rendering to Law.inc.php
We actually already offloaded it; now we're removing the extra text generation from law.php. Per #160 and #161.
@krues8dr

This comment has been minimized.

Show comment
Hide comment
@krues8dr

krues8dr Nov 5, 2014

Member

Propose moving Milestone to Future. I'd love to see this, but I don't know that it's a priority.

Member

krues8dr commented Nov 5, 2014

Propose moving Milestone to Future. I'd love to see this, but I don't know that it's a priority.

@waldoj

This comment has been minimized.

Show comment
Hide comment
@waldoj

waldoj Nov 5, 2014

Member

I'm OK with moving it to a future release because it's actually quite possible to do this without any additional State Decoded functionality, thanks to the plain text files that are output. Somebody could easily check all of those files in, with each new release. That's not as slick as auto-synching via Git, but it ain't bad.

Member

waldoj commented Nov 5, 2014

I'm OK with moving it to a future release because it's actually quite possible to do this without any additional State Decoded functionality, thanks to the plain text files that are output. Somebody could easily check all of those files in, with each new release. That's not as slick as auto-synching via Git, but it ain't bad.

@waldoj waldoj modified the milestones: Future, 1.0 Nov 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment