aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/examples
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-07-31 10:16:38 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-07-31 10:17:44 +0300
commit9181b3a021acc7585cb6f9f20da6accfce0015e0 (patch)
tree0fcb4d5a99be02ac7a934817491f50d0d32d757d /examples
parentadd some unit tests (diff)
downloadcgitize-9181b3a021acc7585cb6f9f20da6accfce0015e0.tar.gz
cgitize-9181b3a021acc7585cb6f9f20da6accfce0015e0.zip
merge my_repos.py to the config
The config is also in the TOML format now. It's a bit messy for the moment, but I'll fix it.
Diffstat (limited to 'examples')
-rw-r--r--examples/cgitize.conf34
-rw-r--r--examples/cgitize.toml46
-rw-r--r--examples/my_repos.py12
3 files changed, 46 insertions, 46 deletions
diff --git a/examples/cgitize.conf b/examples/cgitize.conf
deleted file mode 100644
index a85daee..0000000
--- a/examples/cgitize.conf
+++ /dev/null
@@ -1,34 +0,0 @@
-# All settings are optional.
-
-[DEFAULT]
-
-# /etc/cgitize/my_repos.py by default.
-my_repos = /path/to/my_repos.py
-
-# /var/tmp/cgitize/output by default.
-output = /path/to/output/
-
-# URL to clone from the output directory. {repo_id} is replaced by the
-# repository ID (in the NAME or SECTION/NAME format).
-clone_url = http://example.com:8080/git/{repo_id}
-
-# Clones via SSH by default.
-ssh = True
-
-owner = Your Name
-
-[GITHUB]
-
-username = your-username
-
-# If some of the repositories hosted on GitHub are private, you can use
-# "personal access tokens" to access them.
-access_token = XXX
-
-[BITBUCKET]
-
-username = your-username
-
-# If some of the repositories hosted on Bitbucket are private, you can use "app
-# passwords" to access them.
-app_password = XXX
diff --git a/examples/cgitize.toml b/examples/cgitize.toml
new file mode 100644
index 0000000..ed89878
--- /dev/null
+++ b/examples/cgitize.toml
@@ -0,0 +1,46 @@
+# All settings are optional.
+
+# /var/tmp/cgitize/output by default.
+output = "/tmp/cgitize"
+
+# URL to clone from the output directory. {name} is replaced by the repository
+# ID.
+clone_url = "https://yourhost.com/git/{name}"
+
+# Clones via SSH by default.
+ssh = true
+
+# Unless this is specified, cgit is going to derive the owner from the
+# repository's directory ownership.
+owner = "Your Name"
+
+[github]
+# If some of the repositories hosted on GitHub are private, you can use
+# "personal access tokens" to access them.
+#access_token = "XXX"
+
+# Some random repositories hosted on GitHub:
+[github.repositories.lens]
+id = "ekmett/lens"
+[github.repositories.pytomlpp]
+id = "bobfang1992/pytomlpp"
+
+[bitbucket]
+# If some of the repositories hosted on Bitbucket are private, you can use "app
+# passwords" to access them.
+#app_password = "XXX"
+
+# Some random repositories hosted on Bitbucket:
+[bitbucket.repositories.cef]
+id = "chromiumembedded/cef"
+[bitbucket.repositories.upc-runtime]
+id = "berkeleylab/upc-runtime"
+
+[repositories]
+
+# Some random repositories hosted on the web:
+[repositories.wintun]
+id = "wintun"
+clone_url = "https://git.zx2c4.com/wintun"
+owner = "Jason A. Donenfeld"
+desc = "Layer 3 TUN Driver for Windows"
diff --git a/examples/my_repos.py b/examples/my_repos.py
deleted file mode 100644
index 1e83334..0000000
--- a/examples/my_repos.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from cgitize.repo import Bitbucket, GitHub, Repo
-
-
-MY_REPOS = (
- GitHub('xyz'),
- GitHub('foo/bar', user='test', via_ssh=False),
-
- Bitbucket('xyz'),
- Bitbucket('foo/bar', desc='Foo (Bar)'),
-
- Repo('tmp/tmp', clone_url='https://example.com/tmp.git', owner='John Doe'),
-)