Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-ghp-import for
openSUSE:Factory checked in at 2022-09-29 18:14:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ghp-import (Old)
and /work/SRC/openSUSE:Factory/.python-ghp-import.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ghp-import"
Thu Sep 29 18:14:35 2022 rev:2 rq:1006934 version:2.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ghp-import/python-ghp-import.changes
2021-08-26 23:14:42.700256990 +0200
+++
/work/SRC/openSUSE:Factory/.python-ghp-import.new.2275/python-ghp-import.changes
2022-09-29 18:15:21.751490725 +0200
@@ -1,0 +2,13 @@
+Wed Sep 28 21:18:08 UTC 2022 - Yogalakshmi Arunachalam <[email protected]>
+
+- Update to version 2.1.0
+ * Remove outdated "I" and "me" from the text
+ * Use `rfc2822` date format (#109)
+ * Respect `--prefix` when using `--no-jekyll` (#107)
+ * Remove unused constant
+ * Switch from optparse to argparse (#103)
+
+- Update to version 2.0.2
+ * Build and release wheels (#102)
+
+-------------------------------------------------------------------
Old:
----
ghp-import-2.0.1.tar.gz
New:
----
ghp-import-2.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ghp-import.spec ++++++
--- /var/tmp/diff_new_pack.rbX3BS/_old 2022-09-29 18:15:22.291491783 +0200
+++ /var/tmp/diff_new_pack.rbX3BS/_new 2022-09-29 18:15:22.295491791 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-ghp-import
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-ghp-import
-Version: 2.0.1
+Version: 2.1.0
Release: 0
Summary: Utility to import docs into a gh-pages branch
License: Apache-2.0
++++++ ghp-import-2.0.1.tar.gz -> ghp-import-2.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ghp-import-2.0.1/PKG-INFO
new/ghp-import-2.1.0/PKG-INFO
--- old/ghp-import-2.0.1/PKG-INFO 2021-05-24 03:56:59.670386000 +0200
+++ new/ghp-import-2.1.0/PKG-INFO 2022-05-02 17:47:13.693899600 +0200
@@ -1,137 +1,11 @@
Metadata-Version: 2.1
Name: ghp-import
-Version: 2.0.1
+Version: 2.1.0
Summary: Copy your docs directly to the gh-pages branch.
Home-page: https://github.com/c-w/ghp-import
Author: Paul Joseph Davis
Author-email: [email protected]
License: Apache Software License
-Description: GitHub Pages Import
- ===================
-
- [](https://github.com/davisp/ghp-import/actions?query=workflow%3Aci)
-
[](https://circleci.com/gh/c-w/ghp-import/tree/master)
-
[](https://travis-ci.org/c-w/ghp-import)
-
-
[](https://opensource.org/licenses/Apache-2.0)
-
[](https://pypi.org/project/ghp-import/)
-
- As part of [gunicorn][gunicorn], [Benoit Chesneau][benoit] and I have
been
- starting to look at how to host documentation. There's the obvious
method of
- using [GitHub's post-receive hook][github-post] to trigger doc builds
and rsync
- to a webserver, but we ended up wanting to try out github's hosting to
make the
- whole interface a bit more robust.
-
- [GitHub Pages][gh-pages] is a pretty awesome service that GitHub
provides for
- hosting project documentation. The only thing is that it requires a
- `gh-pages` branch that is the site's document root. This means that
keeping
- documentation sources in the branch with code is a bit difficult. And
it really
- turns into a head scratcher for things like [Sphinx][sphinx] that want
to
- access documentation sources and code sources at the same time.
-
- Then I stumbled across an interesting looking package called
- [github-tools][github-tools] that looked almost like what I wanted. It
was a tad
- complicated and more involved than I wanted but it gave me an idea.
Why not
- just write a script that can copy a directory to the `gh-pages` branch
of the
- repository. This saves me from even having to think about the branch
and
- everything becomes magical.
-
- This is what `ghp-import` was written for.
-
- [gunicorn]: http://www.gunicorn.com/ "Gunicorn"
- [benoit]: http://github.com/benoitc "Beno??t Chesneau"
- [github-post]: https://help.github.com/articles/post-receive-hooks
"GitHub Post-Receive Hook"
- [gh-pages]: http://pages.github.com/ "GitHub Pages"
- [sphinx]: http://sphinx.pocoo.org/ "Sphinx Documentation"
- [github-tools]: http://dinoboff.github.com/github-tools/ "github-tools"
-
-
- Big Fat Warning
- ---------------
-
- This will **DESTROY** your `gh-pages` branch. If you love it, you'll
want to
- take backups before playing with this. This script assumes that
`gh-pages` is
- 100% derivative. You should never edit files in your `gh-pages` branch
by hand
- if you're using this script because you will lose your work.
-
- When used with a prefix, only files below the set prefix will be
destroyed, limiting the
- above warning to just that directory and everything below it.
-
- Usage
- -----
-
- ```
- Usage: ghp-import [OPTIONS] DIRECTORY
-
- Options:
- -n, --no-jekyll Include a .nojekyll file in the branch.
- -c CNAME, --cname=CNAME
- Write a CNAME file with the given CNAME.
- -m MESG, --message=MESG
- The commit message to use on the target branch.
- -p, --push Push the branch to origin/{branch} after
committing.
- -x PREFIX, --prefix=PREFIX
- The prefix to add to each file that gets
pushed to the
- remote. Only files below this prefix will be
cleared
- out. [none]
- -f, --force Force the push to the repository.
- -o, --no-history Force new commit without parent history.
- -r REMOTE, --remote=REMOTE
- The name of the remote to push to. [origin]
- -b BRANCH, --branch=BRANCH
- Name of the branch to write to. [gh-pages]
- -s, --shell Use the shell when invoking Git. [False]
- -l, --follow-links Follow symlinks when adding files. [False]
- -h, --help show this help message and exit
- ```
-
- Its pretty simple. Inside your repository just run `ghp-import
$DOCS_DIR`
- where `$DOCS_DIR` is the path to the **built** documentation. This
will write a
- commit to your `gh-pages` branch with the current documents in it.
-
- If you specify `-p` it will also attempt to push the `gh-pages` branch
to
- GitHub. By default it'll just run `git push origin gh-pages`. You can
specify
- a different remote using the `-r` flag.
-
- The `-o` option will discard any previous history and ensure that only
a
- single commit is always pushed to the `gh-pages` branch. This is
useful to
- avoid bloating the repository size and is **highly recommended**.
-
- You can specify a different branch with `-b`. This is useful for user
and
- organization page, which are served from the `master` branch.
-
- Some Windows users report needing to pass Git commands through the
shell which can be accomplished by passing `-s`.
-
- The `-l` option will cause the import to follow symlinks for users
that have odd configurations that include symlinking outside of their
documentation directory.
-
- Python Usage
- ------------
-
- You can also call ghp_import directly from your Python code as a
library. The
- library has one public function `ghp_import.ghp_import`, which accepts
the
- following arguments:
-
- * `srcdir`: The path to the **built** documentation (required).
- * `remote`: The name of the remote to push to. Default: `origin`.
- * `branch`: Name of the branch to write to. Default: `gh-pages`.
- * `mesg`: The commit message to use on the target branch. Default:
`Update documentation`.
- * `push`: Push the branch to {remote}/{branch} after committing.
Default: `False`.
- * `prefix`: The prefix to add to each file that gets pushed to the
remote. Default: `None`.
- * `force`: Force the push to the repository. Default: `False`.
- * `no_history`: Force new commit without parent history. Default:
`False`.
- * `use_shell`: Default: Use the shell when invoking Git. `False`.
- * `followlinks`: Follow symlinks when adding files. Default: `False`.
- * `cname`: Write a CNAME file with the given CNAME. Default: `None`.
- * `nojekyll`: Include a .nojekyll file in the branch. Default: `False`.
-
- With Python's current working directory (cwd) inside your repository,
do the
- following:
-
- ```python
- from ghp_import import ghp_import
- ghp_import('docs', push=True, cname='example.com')
- ```
-
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: Apache Software License
@@ -143,3 +17,133 @@
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
Provides-Extra: dev
+License-File: LICENSE
+
+GitHub Pages Import
+===================
+
+[](https://github.com/davisp/ghp-import/actions?query=workflow%3Aci)
+[](https://circleci.com/gh/c-w/ghp-import/tree/master)
+[](https://travis-ci.org/c-w/ghp-import)
+
+[](https://opensource.org/licenses/Apache-2.0)
+[](https://pypi.org/project/ghp-import/)
+
+As part of [gunicorn][gunicorn], [Benoit Chesneau][benoit] and [Paul
Davis][davisp]
+were looking at how to host documentation. There's the obvious method of
+using [GitHub's post-receive hook][github-post] to trigger doc builds and rsync
+to a webserver, but we ended up wanting to try out github's hosting to make the
+whole interface a bit more robust.
+
+[GitHub Pages][gh-pages] is a pretty awesome service that GitHub provides for
+hosting project documentation. The only thing is that it requires a
+`gh-pages` branch that is the site's document root. This means that keeping
+documentation sources in the branch with code is a bit difficult. And it really
+turns into a head scratcher for things like [Sphinx][sphinx] that want to
+access documentation sources and code sources at the same time.
+
+Then we stumbled across an interesting looking package called
+[github-tools][github-tools] that looked almost like what we wanted. It was a
tad
+complicated and more involved than we wanted but it gave us an idea. Why not
+just write a script that can copy a directory to the `gh-pages` branch of the
+repository. This saves us from even having to think about the branch and
+everything becomes magical.
+
+This is what `ghp-import` was written for.
+
+[gunicorn]: http://www.gunicorn.com/ "Gunicorn"
+[benoit]: http://github.com/benoitc "Beno??t Chesneau"
+[davisp]: http://github.com/davisp "Paul J. Davis"
+[github-post]: https://help.github.com/articles/post-receive-hooks "GitHub
Post-Receive Hook"
+[gh-pages]: http://pages.github.com/ "GitHub Pages"
+[sphinx]: http://sphinx.pocoo.org/ "Sphinx Documentation"
+[github-tools]: http://dinoboff.github.com/github-tools/ "github-tools"
+
+
+Big Fat Warning
+---------------
+
+This will **DESTROY** your `gh-pages` branch. If you love it, you'll want to
+take backups before playing with this. This script assumes that `gh-pages` is
+100% derivative. You should never edit files in your `gh-pages` branch by hand
+if you're using this script because you will lose your work.
+
+When used with a prefix, only files below the set prefix will be destroyed,
limiting the
+above warning to just that directory and everything below it.
+
+Usage
+-----
+
+```
+Usage: ghp-import [OPTIONS] DIRECTORY
+
+Options:
+ -n, --no-jekyll Include a .nojekyll file in the branch.
+ -c CNAME, --cname=CNAME
+ Write a CNAME file with the given CNAME.
+ -m MESG, --message=MESG
+ The commit message to use on the target branch.
+ -p, --push Push the branch to origin/{branch} after committing.
+ -x PREFIX, --prefix=PREFIX
+ The prefix to add to each file that gets pushed to the
+ remote. Only files below this prefix will be cleared
+ out. [none]
+ -f, --force Force the push to the repository.
+ -o, --no-history Force new commit without parent history.
+ -r REMOTE, --remote=REMOTE
+ The name of the remote to push to. [origin]
+ -b BRANCH, --branch=BRANCH
+ Name of the branch to write to. [gh-pages]
+ -s, --shell Use the shell when invoking Git. [False]
+ -l, --follow-links Follow symlinks when adding files. [False]
+ -h, --help show this help message and exit
+```
+
+Its pretty simple. Inside your repository just run `ghp-import $DOCS_DIR`
+where `$DOCS_DIR` is the path to the **built** documentation. This will write a
+commit to your `gh-pages` branch with the current documents in it.
+
+If you specify `-p` it will also attempt to push the `gh-pages` branch to
+GitHub. By default it'll just run `git push origin gh-pages`. You can specify
+a different remote using the `-r` flag.
+
+The `-o` option will discard any previous history and ensure that only a
+single commit is always pushed to the `gh-pages` branch. This is useful to
+avoid bloating the repository size and is **highly recommended**.
+
+You can specify a different branch with `-b`. This is useful for user and
+organization page, which are served from the `master` branch.
+
+Some Windows users report needing to pass Git commands through the shell which
can be accomplished by passing `-s`.
+
+The `-l` option will cause the import to follow symlinks for users that have
odd configurations that include symlinking outside of their documentation
directory.
+
+Python Usage
+------------
+
+You can also call ghp_import directly from your Python code as a library. The
+library has one public function `ghp_import.ghp_import`, which accepts the
+following arguments:
+
+* `srcdir`: The path to the **built** documentation (required).
+* `remote`: The name of the remote to push to. Default: `origin`.
+* `branch`: Name of the branch to write to. Default: `gh-pages`.
+* `mesg`: The commit message to use on the target branch. Default: `Update
documentation`.
+* `push`: Push the branch to {remote}/{branch} after committing. Default:
`False`.
+* `prefix`: The prefix to add to each file that gets pushed to the remote.
Default: `None`.
+* `force`: Force the push to the repository. Default: `False`.
+* `no_history`: Force new commit without parent history. Default: `False`.
+* `use_shell`: Default: Use the shell when invoking Git. `False`.
+* `followlinks`: Follow symlinks when adding files. Default: `False`.
+* `cname`: Write a CNAME file with the given CNAME. Default: `None`.
+* `nojekyll`: Include a .nojekyll file in the branch. Default: `False`.
+
+With Python's current working directory (cwd) inside your repository, do the
+following:
+
+```python
+from ghp_import import ghp_import
+ghp_import('docs', push=True, cname='example.com')
+```
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ghp-import-2.0.1/README.md
new/ghp-import-2.1.0/README.md
--- old/ghp-import-2.0.1/README.md 2021-05-24 03:56:49.000000000 +0200
+++ new/ghp-import-2.1.0/README.md 2022-05-02 17:47:03.000000000 +0200
@@ -8,8 +8,8 @@
[](https://opensource.org/licenses/Apache-2.0)
[](https://pypi.org/project/ghp-import/)
-As part of [gunicorn][gunicorn], [Benoit Chesneau][benoit] and I have been
-starting to look at how to host documentation. There's the obvious method of
+As part of [gunicorn][gunicorn], [Benoit Chesneau][benoit] and [Paul
Davis][davisp]
+were looking at how to host documentation. There's the obvious method of
using [GitHub's post-receive hook][github-post] to trigger doc builds and rsync
to a webserver, but we ended up wanting to try out github's hosting to make the
whole interface a bit more robust.
@@ -21,17 +21,18 @@
turns into a head scratcher for things like [Sphinx][sphinx] that want to
access documentation sources and code sources at the same time.
-Then I stumbled across an interesting looking package called
-[github-tools][github-tools] that looked almost like what I wanted. It was a
tad
-complicated and more involved than I wanted but it gave me an idea. Why not
+Then we stumbled across an interesting looking package called
+[github-tools][github-tools] that looked almost like what we wanted. It was a
tad
+complicated and more involved than we wanted but it gave us an idea. Why not
just write a script that can copy a directory to the `gh-pages` branch of the
-repository. This saves me from even having to think about the branch and
+repository. This saves us from even having to think about the branch and
everything becomes magical.
This is what `ghp-import` was written for.
[gunicorn]: http://www.gunicorn.com/ "Gunicorn"
[benoit]: http://github.com/benoitc "Beno??t Chesneau"
+[davisp]: http://github.com/davisp "Paul J. Davis"
[github-post]: https://help.github.com/articles/post-receive-hooks "GitHub
Post-Receive Hook"
[gh-pages]: http://pages.github.com/ "GitHub Pages"
[sphinx]: http://sphinx.pocoo.org/ "Sphinx Documentation"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ghp-import-2.0.1/ghp_import.egg-info/PKG-INFO
new/ghp-import-2.1.0/ghp_import.egg-info/PKG-INFO
--- old/ghp-import-2.0.1/ghp_import.egg-info/PKG-INFO 2021-05-24
03:56:59.000000000 +0200
+++ new/ghp-import-2.1.0/ghp_import.egg-info/PKG-INFO 2022-05-02
17:47:13.000000000 +0200
@@ -1,137 +1,11 @@
Metadata-Version: 2.1
Name: ghp-import
-Version: 2.0.1
+Version: 2.1.0
Summary: Copy your docs directly to the gh-pages branch.
Home-page: https://github.com/c-w/ghp-import
Author: Paul Joseph Davis
Author-email: [email protected]
License: Apache Software License
-Description: GitHub Pages Import
- ===================
-
- [](https://github.com/davisp/ghp-import/actions?query=workflow%3Aci)
-
[](https://circleci.com/gh/c-w/ghp-import/tree/master)
-
[](https://travis-ci.org/c-w/ghp-import)
-
-
[](https://opensource.org/licenses/Apache-2.0)
-
[](https://pypi.org/project/ghp-import/)
-
- As part of [gunicorn][gunicorn], [Benoit Chesneau][benoit] and I have
been
- starting to look at how to host documentation. There's the obvious
method of
- using [GitHub's post-receive hook][github-post] to trigger doc builds
and rsync
- to a webserver, but we ended up wanting to try out github's hosting to
make the
- whole interface a bit more robust.
-
- [GitHub Pages][gh-pages] is a pretty awesome service that GitHub
provides for
- hosting project documentation. The only thing is that it requires a
- `gh-pages` branch that is the site's document root. This means that
keeping
- documentation sources in the branch with code is a bit difficult. And
it really
- turns into a head scratcher for things like [Sphinx][sphinx] that want
to
- access documentation sources and code sources at the same time.
-
- Then I stumbled across an interesting looking package called
- [github-tools][github-tools] that looked almost like what I wanted. It
was a tad
- complicated and more involved than I wanted but it gave me an idea.
Why not
- just write a script that can copy a directory to the `gh-pages` branch
of the
- repository. This saves me from even having to think about the branch
and
- everything becomes magical.
-
- This is what `ghp-import` was written for.
-
- [gunicorn]: http://www.gunicorn.com/ "Gunicorn"
- [benoit]: http://github.com/benoitc "Beno??t Chesneau"
- [github-post]: https://help.github.com/articles/post-receive-hooks
"GitHub Post-Receive Hook"
- [gh-pages]: http://pages.github.com/ "GitHub Pages"
- [sphinx]: http://sphinx.pocoo.org/ "Sphinx Documentation"
- [github-tools]: http://dinoboff.github.com/github-tools/ "github-tools"
-
-
- Big Fat Warning
- ---------------
-
- This will **DESTROY** your `gh-pages` branch. If you love it, you'll
want to
- take backups before playing with this. This script assumes that
`gh-pages` is
- 100% derivative. You should never edit files in your `gh-pages` branch
by hand
- if you're using this script because you will lose your work.
-
- When used with a prefix, only files below the set prefix will be
destroyed, limiting the
- above warning to just that directory and everything below it.
-
- Usage
- -----
-
- ```
- Usage: ghp-import [OPTIONS] DIRECTORY
-
- Options:
- -n, --no-jekyll Include a .nojekyll file in the branch.
- -c CNAME, --cname=CNAME
- Write a CNAME file with the given CNAME.
- -m MESG, --message=MESG
- The commit message to use on the target branch.
- -p, --push Push the branch to origin/{branch} after
committing.
- -x PREFIX, --prefix=PREFIX
- The prefix to add to each file that gets
pushed to the
- remote. Only files below this prefix will be
cleared
- out. [none]
- -f, --force Force the push to the repository.
- -o, --no-history Force new commit without parent history.
- -r REMOTE, --remote=REMOTE
- The name of the remote to push to. [origin]
- -b BRANCH, --branch=BRANCH
- Name of the branch to write to. [gh-pages]
- -s, --shell Use the shell when invoking Git. [False]
- -l, --follow-links Follow symlinks when adding files. [False]
- -h, --help show this help message and exit
- ```
-
- Its pretty simple. Inside your repository just run `ghp-import
$DOCS_DIR`
- where `$DOCS_DIR` is the path to the **built** documentation. This
will write a
- commit to your `gh-pages` branch with the current documents in it.
-
- If you specify `-p` it will also attempt to push the `gh-pages` branch
to
- GitHub. By default it'll just run `git push origin gh-pages`. You can
specify
- a different remote using the `-r` flag.
-
- The `-o` option will discard any previous history and ensure that only
a
- single commit is always pushed to the `gh-pages` branch. This is
useful to
- avoid bloating the repository size and is **highly recommended**.
-
- You can specify a different branch with `-b`. This is useful for user
and
- organization page, which are served from the `master` branch.
-
- Some Windows users report needing to pass Git commands through the
shell which can be accomplished by passing `-s`.
-
- The `-l` option will cause the import to follow symlinks for users
that have odd configurations that include symlinking outside of their
documentation directory.
-
- Python Usage
- ------------
-
- You can also call ghp_import directly from your Python code as a
library. The
- library has one public function `ghp_import.ghp_import`, which accepts
the
- following arguments:
-
- * `srcdir`: The path to the **built** documentation (required).
- * `remote`: The name of the remote to push to. Default: `origin`.
- * `branch`: Name of the branch to write to. Default: `gh-pages`.
- * `mesg`: The commit message to use on the target branch. Default:
`Update documentation`.
- * `push`: Push the branch to {remote}/{branch} after committing.
Default: `False`.
- * `prefix`: The prefix to add to each file that gets pushed to the
remote. Default: `None`.
- * `force`: Force the push to the repository. Default: `False`.
- * `no_history`: Force new commit without parent history. Default:
`False`.
- * `use_shell`: Default: Use the shell when invoking Git. `False`.
- * `followlinks`: Follow symlinks when adding files. Default: `False`.
- * `cname`: Write a CNAME file with the given CNAME. Default: `None`.
- * `nojekyll`: Include a .nojekyll file in the branch. Default: `False`.
-
- With Python's current working directory (cwd) inside your repository,
do the
- following:
-
- ```python
- from ghp_import import ghp_import
- ghp_import('docs', push=True, cname='example.com')
- ```
-
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: Apache Software License
@@ -143,3 +17,133 @@
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
Provides-Extra: dev
+License-File: LICENSE
+
+GitHub Pages Import
+===================
+
+[](https://github.com/davisp/ghp-import/actions?query=workflow%3Aci)
+[](https://circleci.com/gh/c-w/ghp-import/tree/master)
+[](https://travis-ci.org/c-w/ghp-import)
+
+[](https://opensource.org/licenses/Apache-2.0)
+[](https://pypi.org/project/ghp-import/)
+
+As part of [gunicorn][gunicorn], [Benoit Chesneau][benoit] and [Paul
Davis][davisp]
+were looking at how to host documentation. There's the obvious method of
+using [GitHub's post-receive hook][github-post] to trigger doc builds and rsync
+to a webserver, but we ended up wanting to try out github's hosting to make the
+whole interface a bit more robust.
+
+[GitHub Pages][gh-pages] is a pretty awesome service that GitHub provides for
+hosting project documentation. The only thing is that it requires a
+`gh-pages` branch that is the site's document root. This means that keeping
+documentation sources in the branch with code is a bit difficult. And it really
+turns into a head scratcher for things like [Sphinx][sphinx] that want to
+access documentation sources and code sources at the same time.
+
+Then we stumbled across an interesting looking package called
+[github-tools][github-tools] that looked almost like what we wanted. It was a
tad
+complicated and more involved than we wanted but it gave us an idea. Why not
+just write a script that can copy a directory to the `gh-pages` branch of the
+repository. This saves us from even having to think about the branch and
+everything becomes magical.
+
+This is what `ghp-import` was written for.
+
+[gunicorn]: http://www.gunicorn.com/ "Gunicorn"
+[benoit]: http://github.com/benoitc "Beno??t Chesneau"
+[davisp]: http://github.com/davisp "Paul J. Davis"
+[github-post]: https://help.github.com/articles/post-receive-hooks "GitHub
Post-Receive Hook"
+[gh-pages]: http://pages.github.com/ "GitHub Pages"
+[sphinx]: http://sphinx.pocoo.org/ "Sphinx Documentation"
+[github-tools]: http://dinoboff.github.com/github-tools/ "github-tools"
+
+
+Big Fat Warning
+---------------
+
+This will **DESTROY** your `gh-pages` branch. If you love it, you'll want to
+take backups before playing with this. This script assumes that `gh-pages` is
+100% derivative. You should never edit files in your `gh-pages` branch by hand
+if you're using this script because you will lose your work.
+
+When used with a prefix, only files below the set prefix will be destroyed,
limiting the
+above warning to just that directory and everything below it.
+
+Usage
+-----
+
+```
+Usage: ghp-import [OPTIONS] DIRECTORY
+
+Options:
+ -n, --no-jekyll Include a .nojekyll file in the branch.
+ -c CNAME, --cname=CNAME
+ Write a CNAME file with the given CNAME.
+ -m MESG, --message=MESG
+ The commit message to use on the target branch.
+ -p, --push Push the branch to origin/{branch} after committing.
+ -x PREFIX, --prefix=PREFIX
+ The prefix to add to each file that gets pushed to the
+ remote. Only files below this prefix will be cleared
+ out. [none]
+ -f, --force Force the push to the repository.
+ -o, --no-history Force new commit without parent history.
+ -r REMOTE, --remote=REMOTE
+ The name of the remote to push to. [origin]
+ -b BRANCH, --branch=BRANCH
+ Name of the branch to write to. [gh-pages]
+ -s, --shell Use the shell when invoking Git. [False]
+ -l, --follow-links Follow symlinks when adding files. [False]
+ -h, --help show this help message and exit
+```
+
+Its pretty simple. Inside your repository just run `ghp-import $DOCS_DIR`
+where `$DOCS_DIR` is the path to the **built** documentation. This will write a
+commit to your `gh-pages` branch with the current documents in it.
+
+If you specify `-p` it will also attempt to push the `gh-pages` branch to
+GitHub. By default it'll just run `git push origin gh-pages`. You can specify
+a different remote using the `-r` flag.
+
+The `-o` option will discard any previous history and ensure that only a
+single commit is always pushed to the `gh-pages` branch. This is useful to
+avoid bloating the repository size and is **highly recommended**.
+
+You can specify a different branch with `-b`. This is useful for user and
+organization page, which are served from the `master` branch.
+
+Some Windows users report needing to pass Git commands through the shell which
can be accomplished by passing `-s`.
+
+The `-l` option will cause the import to follow symlinks for users that have
odd configurations that include symlinking outside of their documentation
directory.
+
+Python Usage
+------------
+
+You can also call ghp_import directly from your Python code as a library. The
+library has one public function `ghp_import.ghp_import`, which accepts the
+following arguments:
+
+* `srcdir`: The path to the **built** documentation (required).
+* `remote`: The name of the remote to push to. Default: `origin`.
+* `branch`: Name of the branch to write to. Default: `gh-pages`.
+* `mesg`: The commit message to use on the target branch. Default: `Update
documentation`.
+* `push`: Push the branch to {remote}/{branch} after committing. Default:
`False`.
+* `prefix`: The prefix to add to each file that gets pushed to the remote.
Default: `None`.
+* `force`: Force the push to the repository. Default: `False`.
+* `no_history`: Force new commit without parent history. Default: `False`.
+* `use_shell`: Default: Use the shell when invoking Git. `False`.
+* `followlinks`: Follow symlinks when adding files. Default: `False`.
+* `cname`: Write a CNAME file with the given CNAME. Default: `None`.
+* `nojekyll`: Include a .nojekyll file in the branch. Default: `False`.
+
+With Python's current working directory (cwd) inside your repository, do the
+following:
+
+```python
+from ghp_import import ghp_import
+ghp_import('docs', push=True, cname='example.com')
+```
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ghp-import-2.0.1/ghp_import.egg-info/requires.txt
new/ghp-import-2.1.0/ghp_import.egg-info/requires.txt
--- old/ghp-import-2.0.1/ghp_import.egg-info/requires.txt 2021-05-24
03:56:59.000000000 +0200
+++ new/ghp-import-2.1.0/ghp_import.egg-info/requires.txt 2022-05-02
17:47:13.000000000 +0200
@@ -4,3 +4,4 @@
twine
markdown
flake8
+wheel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ghp-import-2.0.1/ghp_import.py
new/ghp-import-2.1.0/ghp_import.py
--- old/ghp-import-2.0.1/ghp_import.py 2021-05-24 03:56:49.000000000 +0200
+++ new/ghp-import-2.1.0/ghp_import.py 2022-05-02 17:47:03.000000000 +0200
@@ -1,7 +1,6 @@
#! /usr/bin/env python
import errno
-import optparse as op
import os
import subprocess as sp
import sys
@@ -15,8 +14,7 @@
from pipes import quote
__all__ = ['ghp_import']
-__version__ = "2.0.1"
-__usage__ = "%prog [OPTIONS] DIRECTORY"
+__version__ = "2.1.0"
class GhpError(Exception):
@@ -156,8 +154,12 @@
write(pipe, enc('\n'))
-def add_nojekyll(pipe):
- write(pipe, enc('M 100644 inline .nojekyll\n'))
+def add_nojekyll(pipe, prefix=None):
+ if prefix:
+ fpath = os.path.join(prefix, '.nojekyll')
+ else:
+ fpath = '.nojekyll'
+ write(pipe, enc('M 100644 inline %s\n' % fpath))
write(pipe, enc('data 0\n'))
write(pipe, enc('\n'))
@@ -174,7 +176,7 @@
def run_import(git, srcdir, **opts):
srcdir = dec(srcdir)
- pipe = git.open('fast-import', '--date-format=raw', '--quiet',
+ pipe = git.open('fast-import', '--date-format=rfc2822', '--quiet',
stdin=sp.PIPE, stdout=None, stderr=None)
start_commit(pipe, git, opts['branch'], opts['mesg'], opts['prefix'])
for path, _, fnames in os.walk(srcdir, followlinks=opts['followlinks']):
@@ -185,7 +187,7 @@
gpath = os.path.join(opts['prefix'], gpath)
add_file(pipe, fpath, gpath)
if opts['nojekyll']:
- add_nojekyll(pipe)
+ add_nojekyll(pipe, opts['prefix'])
if opts['cname'] is not None:
add_cname(pipe, opts['cname'])
write(pipe, enc('\n'))
@@ -196,48 +198,68 @@
def options():
return [
- op.make_option(
- '-n', '--no-jekyll', dest='nojekyll', default=False,
+ (('-n', '--no-jekyll'), dict(
+ dest='nojekyll',
+ default=False,
action="store_true",
- help='Include a .nojekyll file in the branch.'),
- op.make_option(
- '-c', '--cname', dest='cname', default=None,
- help='Write a CNAME file with the given CNAME.'),
- op.make_option(
- '-m', '--message', dest='mesg',
+ help='Include a .nojekyll file in the branch.',
+ )),
+ (('-c', '--cname'), dict(
+ dest='cname',
+ default=None,
+ help='Write a CNAME file with the given CNAME.',
+ )),
+ (('-m', '--message'), dict(
+ dest='mesg',
default='Update documentation',
- help='The commit message to use on the target branch.'),
- op.make_option(
- '-p', '--push', dest='push', default=False,
+ help='The commit message to use on the target branch.',
+ )),
+ (('-p', '--push'), dict(
+ dest='push',
+ default=False,
action='store_true',
- help='Push the branch to origin/{branch} after committing.'),
- op.make_option(
- '-x', '--prefix', dest='prefix', default=None,
+ help='Push the branch to origin/{branch} after committing.',
+ )),
+ (('-x', '--prefix'), dict(
+ dest='prefix',
+ default=None,
help='The prefix to add to each file that gets pushed to the '
'remote. Only files below this prefix will be cleared '
- 'out. [%default]'),
- op.make_option(
- '-f', '--force', dest='force',
- default=False, action='store_true',
- help='Force the push to the repository.'),
- op.make_option(
- '-o', '--no-history', dest='no_history',
+ 'out. [%(default)s]',
+ )),
+ (('-f', '--force'), dict(
+ dest='force',
default=False, action='store_true',
- help='Force new commit without parent history.'),
- op.make_option(
- '-r', '--remote', dest='remote', default='origin',
- help='The name of the remote to push to. [%default]'),
- op.make_option(
- '-b', '--branch', dest='branch', default='gh-pages',
- help='Name of the branch to write to. [%default]'),
- op.make_option(
- '-s', '--shell', dest='use_shell', default=False,
+ help='Force the push to the repository.',
+ )),
+ (('-o', '--no-history'), dict(
+ dest='no_history',
+ default=False,
action='store_true',
- help='Use the shell when invoking Git. [%default]'),
- op.make_option(
- '-l', '--follow-links', dest='followlinks',
- default=False, action='store_true',
- help='Follow symlinks when adding files. [%default]')
+ help='Force new commit without parent history.',
+ )),
+ (('-r', '--remote'), dict(
+ dest='remote',
+ default='origin',
+ help='The name of the remote to push to. [%(default)s]',
+ )),
+ (('-b', '--branch'), dict(
+ dest='branch',
+ default='gh-pages',
+ help='Name of the branch to write to. [%(default)s]',
+ )),
+ (('-s', '--shell'), dict(
+ dest='use_shell',
+ default=False,
+ action='store_true',
+ help='Use the shell when invoking Git. [%(default)s]',
+ )),
+ (('-l', '--follow-links'), dict(
+ dest='followlinks',
+ default=False,
+ action='store_true',
+ help='Follow symlinks when adding files. [%(default)s]',
+ ))
]
@@ -245,7 +267,7 @@
if not os.path.isdir(srcdir):
raise GhpError("Not a directory: %s" % srcdir)
- opts = {opt.dest: opt.default for opt in options()}
+ opts = {kwargs["dest"]: kwargs["default"] for _, kwargs in options()}
opts.update(kwargs)
git = Git(use_shell=opts['use_shell'])
@@ -264,18 +286,18 @@
def main():
- parser = op.OptionParser(usage=__usage__, option_list=options(),
- version=__version__)
- opts, args = parser.parse_args()
+ from argparse import ArgumentParser
- if len(args) == 0:
- parser.error("No import directory specified.")
+ parser = ArgumentParser()
+ parser.add_argument("--version", action="version", version=__version__)
+ parser.add_argument("directory")
+ for args, kwargs in options():
+ parser.add_argument(*args, **kwargs)
- if len(args) > 1:
- parser.error("Unknown arguments specified: %s" % ', '.join(args[1:]))
+ args = parser.parse_args().__dict__
try:
- ghp_import(args[0], **opts.__dict__)
+ ghp_import(args.pop("directory"), **args)
except GhpError as e:
parser.error(e.message)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ghp-import-2.0.1/setup.py
new/ghp-import-2.1.0/setup.py
--- old/ghp-import-2.0.1/setup.py 2021-05-24 03:56:49.000000000 +0200
+++ new/ghp-import-2.1.0/setup.py 2022-05-02 17:47:03.000000000 +0200
@@ -42,6 +42,7 @@
"twine",
"markdown",
"flake8",
+ "wheel",
],
},