Compare commits
No commits in common. "60275a475ee5bf855dfd349f8aae3f0f4cc75df0" and "cb9e19d1a257d54a6419b6d26cf2001c761ba7bf" have entirely different histories.
60275a475e
...
cb9e19d1a2
7 changed files with 37 additions and 68 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -6,6 +6,3 @@ build/
|
||||||
dist
|
dist
|
||||||
index.html
|
index.html
|
||||||
pip-wheel-metadata/
|
pip-wheel-metadata/
|
||||||
*.pdf
|
|
||||||
*.css
|
|
||||||
*.pyz
|
|
||||||
|
|
|
||||||
41
CHANGELOG.md
41
CHANGELOG.md
|
|
@ -2,33 +2,28 @@
|
||||||
|
|
||||||
The changelog was only added at version 0.0.4.
|
The changelog was only added at version 0.0.4.
|
||||||
|
|
||||||
## 0.0.9
|
|
||||||
|
|
||||||
- Fix thumbnail generation (thanks @dickreckard!)
|
|
||||||
- Adjust formatting for usage output
|
|
||||||
|
|
||||||
## 0.0.8
|
## 0.0.8
|
||||||
|
|
||||||
- Allow to ignore hidden directories with `--no-hidden`
|
* Allow to ignore hidden directories with `--no-hidden`
|
||||||
- Files and directories are now sorted during distribusification.
|
* Files and directories are now sorted during distribusification.
|
||||||
- Allow to append `index.html` to the menu items with `--menu-with-index`
|
* Allow to append `index.html` to the menu items with `--menu-with-index`
|
||||||
|
|
||||||
## 0.0.7
|
## 0.0.7
|
||||||
|
|
||||||
Let's think a bit about safety and robustness:
|
Let's think a bit about safety and robustness:
|
||||||
|
|
||||||
- distribusi only overwrites (or removes) indexes that have been created by distribusi itself
|
* distribusi only overwrites (or removes) indexes that have been created by distribusi itself
|
||||||
- override the above behaviour with `--force`
|
* override the above behaviour with `--force`
|
||||||
- `--exclude` now allows you to exclude folder names from being listed, this behaviour is not influenced by `--force`
|
* `--exclude` now allows you to exclude folder names from being listed, this behaviour is not influenced by `--force`
|
||||||
|
|
||||||
And also some refactoring and niceties:
|
And also some refactoring and niceties:
|
||||||
|
|
||||||
- Distribusi only prints when called with `--verbose`
|
* Distribusi only prints when called with `--verbose`
|
||||||
- Restyled `--verbose` output
|
* Restyled `--verbose` output
|
||||||
- Generated indexes can be removed with `--remove-indexes`
|
* Generated indexes can be removed with `--remove-indexes`
|
||||||
- .html and .txt files are now expanded and included as snippets in the index file
|
* .html and .txt files are now expanded and included as snippets in the index file
|
||||||
- code rewrite for clarity
|
* code rewrite for clarity
|
||||||
- HTML output is more precisely styleable
|
* HTML output is more precisely styleable
|
||||||
|
|
||||||
## 0.0.6
|
## 0.0.6
|
||||||
|
|
||||||
|
|
@ -36,12 +31,12 @@ Woops, we missed that one.
|
||||||
|
|
||||||
## 0.0.5
|
## 0.0.5
|
||||||
|
|
||||||
- Use loose bounds for dependencies
|
* Use loose bounds for dependencies
|
||||||
- Don't call exiftools on every execution
|
* Don't call exiftools on every execution
|
||||||
- If `PILLOW` can't thumbnail an image it is included as a link instead
|
* If `PILLOW` can't thumbnail an image it is included as a link instead
|
||||||
|
|
||||||
## 0.0.4
|
## 0.0.4
|
||||||
|
|
||||||
- Add captions from EXIF metadata
|
* Add captions from EXIF metadata
|
||||||
- Custom stylesheet usage
|
* Custom stylesheet usage
|
||||||
- Ability to hide filenames
|
* Ability to hide filenames
|
||||||
|
|
|
||||||
|
|
@ -78,13 +78,6 @@ $ distribusi -d /var/www/archive/my_event -t -v
|
||||||
|
|
||||||
# ✌
|
# ✌
|
||||||
|
|
||||||
|
|
||||||
## History
|
|
||||||
|
|
||||||
Distribusi was first conceptualized as a tool which supported a contribution by Dennis de Bel, Danny van der Kleij and Roel Roscam Abbing to the [ruru house](http://ruruhuis.nl/) organized by [Reinaart Vanhoe](http://vanhoe.org/) and the [ruangrupa](http://ruru.ruangrupa.org/) collective during 2016 Sonsbeek Biennale in Arnhem. During the biennale time the ruru house was a lively meeting place with a programme of discussions, workshops, lectures, culinary activities, performances, pop-up markets and even karaoke evenings, where curators and Arnhemmers met.
|
|
||||||
|
|
||||||
The contribution consisted of setting up distribusi.ruruhuis.nl (distribusi is bahasa Indonesian for 'distribution') which was a website connected to a server in the space. Rather than a hidden administrative interface, the server was present and visible and an invitation was extended to visitors to use it to publish material online. This was done by inserting a USB-drive into any of the ports. The distribusi script would then turn the contents of that stick it into a website. Once the USB-drive was removed that website was no longer on-line. Over time distribusi.ruruhuis.nl hosted photos, books and movies. The website is now off-line but the tool that was used to make it is still used in Varia
|
|
||||||
|
|
||||||
## Change It
|
## Change It
|
||||||
|
|
||||||
You'll need to get a copy of the repository and then do an [editable] install:
|
You'll need to get a copy of the repository and then do an [editable] install:
|
||||||
|
|
|
||||||
12
build.sh
12
build.sh
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Ultra wild west single binary compiling
|
|
||||||
# https://github.com/linkedin/shiv
|
|
||||||
|
|
||||||
shiv --output-file=distribusi.pyz \
|
|
||||||
--site-packages=.venv/lib/python3.7/site-packages/ \
|
|
||||||
--entry-point=distribusi.cli.cli_entrypoint \
|
|
||||||
--python="/usr/bin/env python3" \
|
|
||||||
--compressed \
|
|
||||||
--compile-pyc \
|
|
||||||
.
|
|
||||||
|
|
@ -5,15 +5,13 @@ from distribusi.distribusi import distribusify
|
||||||
|
|
||||||
|
|
||||||
def build_argparser():
|
def build_argparser():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser("""
|
||||||
"""
|
distbusi is a content management system for the web that produces static
|
||||||
distribusi is a content management system for the web that produces static
|
index pages based on folders in the files system.
|
||||||
index pages based on folders in the files system. It is inspired by the
|
It is inspired by the automatic index functions featured in several popular web
|
||||||
automatic index functions featured in several popular web servers.
|
servers. distribusi works by traversing the file system and directory hierarchy
|
||||||
distribusi works by traversing the file system and directory hierarchy to
|
to automatically list all the files in the directory, detect the file types and
|
||||||
automatically list all the files in the directory, detect the file types
|
providing them with relevant html classes and tags for easy styling.""")
|
||||||
and providing them with relevant html classes and tags for easy styling.
|
|
||||||
""")
|
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-d', '--directory', help="Select which directory to distribute", default="."
|
'-d', '--directory', help="Select which directory to distribute", default="."
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,6 @@ def thumbnail(image, name, args):
|
||||||
size = (450, 450)
|
size = (450, 450)
|
||||||
im = Image.open(image)
|
im = Image.open(image)
|
||||||
im.thumbnail(size)
|
im.thumbnail(size)
|
||||||
|
|
||||||
if (im.mode == 'RGBA'):
|
|
||||||
bg = Image.new('RGBA', im.size, (255,255,255))
|
|
||||||
composite = Image.alpha_composite(bg, im)
|
|
||||||
im=composite.convert('RGB')
|
|
||||||
|
|
||||||
output = BytesIO()
|
output = BytesIO()
|
||||||
im.save(output, format='JPEG')
|
im.save(output, format='JPEG')
|
||||||
im_data = output.getvalue()
|
im_data = output.getvalue()
|
||||||
|
|
@ -186,9 +180,6 @@ def distribusify(args, directory): # noqa
|
||||||
html.append(div(args, type_, subtype, a, name))
|
html.append(div(args, type_, subtype, a, name))
|
||||||
|
|
||||||
if root != directory:
|
if root != directory:
|
||||||
if args.menu_with_index:
|
|
||||||
html.append('<a href="../index.html">../</a>')
|
|
||||||
else:
|
|
||||||
html.append('<a href="../">../</a>')
|
html.append('<a href="../">../</a>')
|
||||||
|
|
||||||
for name in dirs:
|
for name in dirs:
|
||||||
|
|
|
||||||
13
setup.py
13
setup.py
|
|
@ -7,7 +7,7 @@ with open('README.md', 'r') as handle:
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='distribusi',
|
name='distribusi',
|
||||||
version='0.0.9',
|
version='0.0.5',
|
||||||
url='https://git.vvvvvvaria.org/varia/distribusi',
|
url='https://git.vvvvvvaria.org/varia/distribusi',
|
||||||
license='GPLv3',
|
license='GPLv3',
|
||||||
author='Varia',
|
author='Varia',
|
||||||
|
|
@ -23,6 +23,13 @@ setup(
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
platforms='any',
|
platforms='any',
|
||||||
install_requires=dependencies,
|
install_requires=dependencies,
|
||||||
entry_points={'console_scripts': ['distribusi = distribusi.cli:cli_entrypoint']},
|
entry_points={
|
||||||
classifiers=['Programming Language :: Python :: 3', 'Environment :: Console'],
|
'console_scripts': [
|
||||||
|
'distribusi = distribusi.cli:cli_entrypoint',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
classifiers=[
|
||||||
|
'Programming Language :: Python :: 3',
|
||||||
|
'Environment :: Console',
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue