User:Slaporte/WikifyCiteTool
From Wikisource
The Wikify Cite Tool puts brackets (like [[this]]) around text that looks like a legal citation, turning the citation into a link to the cited source. Hopefully this tool will save some time and make legal sources more interconnected.
The tool is running at http://thjnk.com/tools/wikify.html, and the source is available below.
Contents |
Recent updates [edit]
- 7/8/2010 - Added some more citations; wikifies citation with "§§" (see known issue below)
- 6/9/2010 - Fixed a bug in short form citations; added older U.S. Reports citations that include the name of the reporter (e.g.,
33 U.S. (8 Pet.) 591). - 6/8/2010 - Recognizes some short form citations (e.g.,
464 U.S., at 434) and pipes the link to the full case citation (e.g.,[[464 U.S. 417|464 U.S., at 434]]).
Todo/known issues [edit]
- If there is a double section symbol ("§§"), it still wikifies the citation. Example:
[[Colo. Rev. Stat. §§ 13-21-102]]should result in[[Colo. Rev. Stat. § 13-21-102|Colo. Rev. Stat. §§ 13-21-102]]to preserve textual integrity and still minimize the number of redirects needed. Workaround: uncomment$txt = str_replace("§§","§",$txt);on line 133. I'm not worrying about this too much until there is consensus on how state statute compilations will be structured. - Does not fully/properly handle California, New York, and Texas statutes.
- Does not recognize or link any "Id." citations.
- Does not link full case name, only citation.
- Much state law is still untested.
- Does not recognize non-standard (or no longer standard) citation formats
Recognized citations [edit]
| Source | Format | Notes |
|---|---|---|
| Federal Judicial Opinions | ||
| U.S. Reports | # U.S. # | U.S. Supreme Court |
| U.S. Reports (Wallace) | # U.S. (# Wall.) # | U.S. Supreme Court (1863-1874) |
| U.S. Reports (Black) | # U.S. (# Black) # | U.S. Supreme Court (1861-1862) |
| U.S. Reports (Howard) | # U.S. (# How.) # | U.S. Supreme Court (1843-1860) |
| U.S. Reports (Peters) | # U.S. (# Pet.) # | U.S. Supreme Court (1828-1842) |
| U.S. Reports (Wheaton) | # U.S. (# Wheat.) # | U.S. Supreme Court (1816-1827) |
| U.S. Reports (Cranch) | # U.S. (# Cranch) # | U.S. Supreme Court (1801-1815) |
| U.S. Reports (Dallas) | # U.S. (# Dall.) # | U.S. Supreme Court (1790-1800) |
| Federal Reporter | # F. # | Federal Circuit Courts |
| Federal Reporter, Second | # F.2d # | Federal Circuit Courts |
| Federal Reporter, Third | # F.3d # | Federal Circuit Courts |
| Federal Supplement | # F. Supp. # | |
| Federal Supplement, Second | # F. Supp. # | |
| Bankruptcy Reporter | # B.R. # | |
| Federal Statutes | ||
| U.S. Code | # U.S.C. § # | |
| U.S. Code Annotated | # U.S.C.A. § # | |
| Code of Federal Regulations | # C.F.R. # | |
| Regional Reporters | ||
| Southern Reporter | # So. # | Alabama, Louisiana, Mississippi - Supreme Court |
| Southern Reporter, Second | # So. 2d # | Alabama, Louisiana, Mississippi - Supreme Court |
| Pacific Reporter | # P. # | Arizona, California, Colorado, Idaho, Kansas, Nevada, New Mexico, Oklahoma, Utah, Washington, Wyoming - Supreme Court |
| Pacific Reporter, Second | # P.2d # | Alaska, Arizona, California, Colorado, Hawaii, Idaho, Kansas, Navada, New Mexico, Oklahoma, Oregon, Utah, Washington, Wyoming - Supreme Court |
| Pacific Reporter, Third | # P.3d # | Alaska, Arizona, California, Colorado, Hawaii, Idaho, Kansas, Navada, New Mexico, Oklahoma, Oregon, Utah, Washington, Wyoming - Supreme Court |
| Southwestern Reporter | # S.W. # | Arkansas, Florida, Kentucky, Tennessee, Texas - Supreme Court |
| Southwestern Reporter, Second | # S.W.2d # | Arkansas, Florida, Kentucky, Tennessee, Texas - Supreme Court |
| Southwestern Reporter, Third | # S.W.3d # | Arkansas, Florida, Kentucky, Tennessee, Texas - Supreme Court |
| Atlantic Reporter | # A. # | Connecticut, Delaware, D.C., Maine, Maryland, New Hampshire, New Jersey, Pennsylvania, Rhode Island, Vermont - Supreme Court |
| Atlantic Reporter, Second | # A.2d # | Connecticut, Delaware, D.C., Maine, Maryland, New Hampshire, New Jersey, Pennsylvania, Rhode Island, Vermont - Supreme Court |
| Southeastern Reporter | # S.E. # | Georgia, North Carolina, South Carolina, Virginia, West Virginia - Supreme Court |
| Southeastern Reporter, Second | # S.E.2d # | Georgia, North Carolina, South Carolina, Virginia, West Virginia - Supreme Court |
| Northeastern Reporter | # N.E. # | Illinois, Indiana, Massachusetts, New York, Ohio - Supreme Court |
| Northeastern Reporter, Second | # N.E.2d # | Illinois, Indiana, Massachusetts, New York, Ohio - Supreme Court |
| Northwestern Reporter | # N.W. # | Iowa, Michigan, Minnesota, Nebraska, North Dakota, South Dakota, Wisconsin - Supreme Court |
| Northwestern Reporter, Second | # N.W.2d # | Iowa, Michigan, Minnesota, Nebraska, North Dakota, South Dakota, Wisconsin - Supreme Court |
| State Reporters | ||
| New Jersey Reports | # N.J. # | New Jersey Supreme Court |
| New Jersey Superior Court Reports | # N.J. Super. # | New Jersey Superior Court |
| State Statute Compilations | ||
| Code of Alabama | Ala. Code § # | |
| Alaska Statutes | Alaska Stat. § # | |
| Arizona Revised Statutes Annotated | Ariz. Rev. Stat. § # | |
| Arkansas Code Annotated | Ark Code Ann. § # | |
| West's Annotated California Civil Code | Cal. Civ. Code § # | |
| West's Annotated California Code of Civil Procedure | Cal. Civ. Proc. Code § # | |
| West's Annotated California Business and Professions Code | Cal. Bus. & Prof. Code § # | |
| West's Annotated California Penal Code | Cal. Penal Code § # | |
| West's Annotated California Insurance Code | Cal. Ins. Code § # | |
| West's Annotated California Revenue and Taxation Code | Cal. Rev. & Tax Code § # | |
| Note, california is incomplete | ||
| Colorado Revised Statutes | Colo. Rev. Stat. § # | |
| General Statutes of Connecticut | Conn. Gen. Stat. § # | |
| General Statutes of Connecticut | Del. Code Ann. tit. # § # | |
| D.C. Official Code | D.C. Code § # | |
| Florida Statutes | Fla. Stat. § # | |
| Official Code of Georgia Annotated | Ga. Code Ann. § # | |
| Hawaii Revised Statutes | Haw. Rev. Stat. § # | |
| Idaho Code Annotated | Idaho Code Ann. § # | |
| Illinois Compiled Statutes | Ill. Comp. Stat. #/# | Blue book |
| Illinois Compiled Statutes | Ill. Comp. Stat. ch. #, § #/# | As seen in wild |
| Indiana Code | Ind. Code § #/# | |
| Code of Iowa | Iowa Code #/# | |
| Kansas Statutes Annotated | # Kan. Stat. Ann. § #/# | blue book |
| Kansas Statutes Annotated | Kan. Stat. Ann. § #-# | as seen in wild |
| Kentucky Revised States Annotated | Ky. Rev. Stat. Ann. § #/# | |
| Louisiana Revised Statutes Annotated | La. Rev. Stat. Ann. § #/# | |
| Indiana Code | ? | |
| Main Revised Statutes Annotated | Me. Rev. Stat. Ann. tit. # § # | |
| General Laws of Massachusetts | Mass. Gen. Laws ch. # § # | |
| Michigan Compiled Laws | Mich. Comp. Laws § # | |
| Minnesota Revised Statutes Annotated | Minn. Stat. § # | |
| Mississippi Revised Statutes Annotated | Miss. Code Ann. § # | blue book |
| Mississippi Revised Statutes (Annotated?) | Mo. Rev. Stat. § # | as seen in the wild |
| Montana Revised Statutes Annotated | Mont. Code Ann. § # | |
| Nebraska Revised Statutes Annotated | Neb. Rev. Stat. § # | |
| Nevada Revised Statutes Annotated | Nev. Rev. Ann. § # | |
| New Hampshire Revised Statutes Annotated | N.H. Rev. Stat. Ann. § # | |
| New Jersey Statutes Annotated | N.J. Stat. Ann. § # | |
| New Jersey Statutes Annotated | N.J.S.A. # | |
| New Mexico Statutes Annotated | N.M. Stat. § # | |
| McKinney's Consoledateed Laws of New York Annotated | N.Y. Penal Law § # | NY Law is incomplete |
| General Statutes of North Carolina | N.C. Gen Stat. § # | |
| North Dakota Century Code | N.D. Cent. Code § # | |
| Page's Ohio Code Annotated | Ohio Rev. Code Ann. § # | |
| Oklahoma Revised Statutes Annotated | Okla. Stat. tit. # § # | blue book |
| Oklahoma Revised Statutes Annotated | Okla. Stat., Tit. #, § # | as seen in wild |
| Oregon Revised Statutes | Or. Rev. Stat. § # | |
| Pennsylvania Consolidated Statutes | # Pa. Cons. Stat. § # | |
| Rhode Island Revised Statutes Annotated | R.I. Gen. Laws § #-#-# | |
| Code of Laws of South Carolina | S.C. Code Ann. § #-#-# | |
| Rhode Island Revised Statutes Annotated | R.I. Gen. Laws § #-#-# | |
| South Dakota Codified Laws | S.D. Codified Laws § #-#-# | |
| Rhode Island Revised Statutes Annotated | R.I. Gen. Laws § #-#-# | |
| Tennessee Code Annotated | Tenn. Code Ann. § # | |
| Texas Penal Code Annotated | Tex. Penal Code Ann. § # | Texas laws are incomplete |
| Utah Code Annotated | Utah Code Ann. § #-#-# | |
| Vermont Code Annotated | Vt. Stat. Ann. tit. # § # | |
| Virginia Code Annotated | Va. Code Ann. § #-# | |
| Revised Code of Washington | Wash. Rev. Code § #-#-# | |
| West Virginia | W. Va. Code § #-#-# | |
| Wisconsin Statutes | Wis. Stat. § #.# | |
| Wyoming Code Annotated | (Wyo. Stat. Ann. § #-#-# | |
Source [edit]
- wikifycite.php
- wikify.html
- jquery.js