Skip to content

Commit 512d6d5

Browse files
committed
pyproject.toml & cruft
1 parent d4bbf4f commit 512d6d5

File tree

15 files changed

+301
-616
lines changed

15 files changed

+301
-616
lines changed

.github/workflows/python-ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: python-ci
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
- master
7+
push:
8+
branches:
9+
- main
10+
- master
11+
12+
jobs:
13+
python-ci:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- run: curl -LsS https://radia.run | bash -s python-ci

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
MANIFEST.in
2-
tox.ini
32
pytest.ini
4-
pykern_setup.yaml
3+
tox.ini
54
.python-version
65
.#*
76
\#*
7+
.idea/
8+
.vscode/
89

910
# Byte-compiled / optimized / DLL files
1011
__pycache__/
@@ -45,9 +46,12 @@ pip-delete-this-directory.txt
4546
htmlcov/
4647
.tox/
4748
.coverage
49+
.coverage.*
4850
.cache
4951
nosetests.xml
5052
coverage.xml
53+
*,cover
54+
.pytest_cache
5155

5256
# Translations
5357
*.mo

.readthedocs.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Read The Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
version: 2
4+
build:
5+
os: ubuntu-22.04
6+
tools:
7+
python: "3.9"
8+
jobs:
9+
pre_build:
10+
- curl https://radia.run | bash -s readthedocs
11+
sphinx:
12+
configuration: docs/conf.py

.travis.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

LICENSE

Lines changed: 202 additions & 399 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,13 @@
1-
### Photo Library Tools
1+
### rnpix
22

3-
For a demo, visit [rnpix.github.io](https://rnpix.github.io).
3+
Photo library tools
44

5-
The photo library is organized into "day" directories of the form
6-
`YYYY/MM-DD/*.{jpg,mov,...}`. In each day directory, `index.txt`
7-
contains:
5+
Learn more at http://github.com/robnagler/rnpix.
86

9-
```text
10-
foo.jpg Some description for foo on one line
11-
bar.mov A movie of something
12-
```
13-
14-
The file may have comments with a `#` starting on the first character. (Historical version allows a `:` after the image name.)
15-
16-
The tools search `YY/MM-DD` directories to create `index.txt` and uses it to create a searchable, static HTML tree:
17-
18-
1. [identify](rnpix/pkcli/identify.py) appends to `index.txt` from the images in a day directory, prompting the user for each unidentified image.
19-
2. [generate](rnpix/pkcli/generate.py) reads `index.txt` to create `index.html` and thumbnail directories `50` (pixel) and `200`, which are referenced in `index.html`
20-
3. [indexer](rnpix/pkcli/indexer.py) reads `index.txt` to create `rnpix-index.js`, which is read by [rnindex](rnpix/package_data/static/rnindex.js) to find images by their description.
21-
4. [fix](rnpix/pkcli/fix.py) reads `index.txt` and images in directory, and verifies and fixes the format.
22-
23-
#### Acknowledgements
24-
25-
Thanks to the excellent [js-search](https://github.com/cebe/js-search) by [Carsten Brandt](http://cebe.cc/about). It was first transliterated from the PHP
26-
to Python, and then rewritten to match the picture indexing problem,
27-
which was significantly different from the general HTML problem `js-search`
28-
solves. I wouldn't have gotten the idea of how to implement a search
29-
engine in Javascript without Carsten's project.
30-
31-
The rest of the code is all mine and evolved over a couple of decades
32-
from a collection of simple Perl programs to be transformed this
33-
year to Python.
7+
Documentation: https://rnpix.readthedocs.io
348

359
#### License
3610

37-
License: http://www.apache.org/licenses/LICENSE-2.0.html
11+
License: https://www.apache.org/licenses/LICENSE-2.0.html
3812

39-
Copyright (c) 2016 Robert Nagler. All Rights Reserved.
13+
Copyright (c) 2024 Rob Nagler. All Rights Reserved.

docs/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ Welcome to rnpix
33

44
Photo library tools
55

6+
.. autosummary::
7+
:toctree: _autosummary
8+
:recursive:
9+
610
.. toctree::
711
:maxdepth: 2
812

pyproject.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[build-system]
2+
requires = ["chronver", "setuptools>=66"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
authors = [
7+
{ name = "Rob Nagler", email = "[email protected]" },
8+
]
9+
classifiers = [
10+
"Development Status :: 2 - Pre-Alpha",
11+
"Environment :: Console",
12+
"Intended Audience :: Developers",
13+
"License :: OSI Approved :: Apache Software License",
14+
"Natural Language :: English",
15+
"Programming Language :: Python",
16+
"Topic :: Utilities",
17+
]
18+
dependencies = [
19+
"exif",
20+
"pykern",
21+
]
22+
description = "Photo library tools"
23+
dynamic = ["version"]
24+
name = "rnpix"
25+
readme = "README.md"
26+
27+
[project.scripts]
28+
rnpix = "rnpix.rnpix_console:main"
29+
30+
[project.urls]
31+
Homepage = "http://github.com/robnagler/rnpix"
32+
33+
[tool.setuptools.package-data]
34+
rnpix = ["package_data/**"]
35+
36+
[tool.setuptools.packages.find]
37+
include = ["rnpix*"]

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

rnpix/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
#
1+
""":mod:`rnpix` package
2+
3+
:copyright: Copyright (c) 2024 Rob Nagler. All Rights Reserved.
4+
:license: https://www.apache.org/licenses/LICENSE-2.0.html
5+
"""
6+
import pkg_resources
7+
8+
try:
9+
# We only have a version once the package is installed.
10+
__version__ = pkg_resources.get_distribution("rnpix").version
11+
except pkg_resources.DistributionNotFound:
12+
pass

0 commit comments

Comments
 (0)