Luke Ross

Colorado

4 releases git clone https://lukeross.name/projects/colorado.git/

Web-based git repository viewer.

Commit a3ada9ef39ee9a96bced99631dbe59d7d252ae53

Set license, readme etc.

Committed 13 Aug 2017 by Luke Ross

README.md

@@ -0,0 +1,28 @@
+Colorado
+========
+
+A git repository viewer, built using Flask and SQLAlchemy.
+
+This software is intended for personal use and the idiosyncratic code style and
+requirements reflect this.  It has only received limited testing and shouldn't
+be considered production ready. I've decided to release it in case other people
+find it useful.
+
+Copyright and license
+---------------------
+
+Colorado viewer for git repositories
+(c) 2017 Luke Ross <luke@lukeross.name>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.


setup.py

@@ -28,5 +28,17 @@ setup(
 	scripts=[
 		"colorado_quickstart.py"
 	],
-	license="proprietary"
+	license="AGPL-3.0+",
+	classifiers=[
+		"Development Status :: 4 - Beta",
+		"Environment :: Web Environment",
+		"Framework :: Flask",
+		"Intended Audience :: Developers",
+		"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
+		"Natural Language :: English",
+		"Operating System :: POSIX",
+		"Programming Language :: Python :: 3",
+		"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
+		"Topic :: Software Development :: Version Control :: Git"
+	]
 )


src/colorado/repo.py

@@ -1,6 +1,6 @@
 import unicodedata as ud
 from git import Repo as GitRepo
-from sqlalchemy import Boolean, Column, Integer, String, Unicode
+from sqlalchemy import Boolean, Column, String, Unicode
 
 from .db import Base
 
@@ -18,9 +18,8 @@ class Repo(Base):
 	A git repo
 	"""
 	__tablename__ = "repo"
-	id = Column(Integer, primary_key=True)
+	slug = Column(Unicode, primary_key=True, default=_make_slug)
 	name = Column(Unicode)
-	slug = Column(Unicode, unique=True, default=_make_slug)
 	path = Column(Unicode, unique=True)
 	private = Column(Boolean, default=False)
 	description = Column(Unicode)


src/colorado/views.py

@@ -1,6 +1,6 @@
 import arrow
 import chardet
-from flask import abort, Blueprint, current_app, make_response, send_file, url_for
+from flask import abort, Blueprint, make_response, send_file, url_for
 from io import BytesIO
 from itertools import chain
 from lxmlmeld import parse_xml