forked from varia/distribusi
Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4964790762 | ||
|
9ef68194db | ||
|
1418feeaa8 | ||
|
06cf1f5bdd | ||
63becedaf5 | |||
6b627f0f96 | |||
7a2f8a5142 | |||
|
6dd9fb7b40 | ||
|
46e68fc966 | ||
545577978a | |||
60275a475e | |||
e730cfec55 | |||
f766f67cee |
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ index.html
|
|||||||
pip-wheel-metadata/
|
pip-wheel-metadata/
|
||||||
*.pdf
|
*.pdf
|
||||||
*.css
|
*.css
|
||||||
|
*.pyz
|
||||||
|
45
CHANGELOG.md
45
CHANGELOG.md
@ -2,28 +2,37 @@
|
|||||||
|
|
||||||
The changelog was only added at version 0.0.4.
|
The changelog was only added at version 0.0.4.
|
||||||
|
|
||||||
|
## 0.0.10
|
||||||
|
|
||||||
|
- Fix `-nf` functionality ([#5](https://git.vvvvvvaria.org/varia/distribusi/pulls/5)) (thanks @losttra8n!)
|
||||||
|
|
||||||
|
## 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
|
||||||
|
|
||||||
@ -31,12 +40,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
|
||||||
|
23
README.md
23
README.md
@ -81,10 +81,28 @@ $ distribusi -d /var/www/archive/my_event -t -v
|
|||||||
|
|
||||||
## History
|
## 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.
|
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
|
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
|
||||||
|
|
||||||
|
## Uses
|
||||||
|
|
||||||
|
### 디스트리붓시
|
||||||
|
[Dianaband](http://www.dianaband.info/) used distribusi for https://fragments1444.ink/.
|
||||||
|
|
||||||
|
> "Individuals collecting fragments each have their own folder. When they put a story, picture, audio, or video file inside a folder, each fragment is assigned a serial number, and gets accumulated in the fragments of hospitality website.The fragments connect us. We hope that we can choose the “nature and attitude” of the medium that mediates our connection."
|
||||||
|
[https://fragments1444.ink/about.html](source)
|
||||||
|
|
||||||
|
### Distribusi verse
|
||||||
|
|
||||||
|
> An attempt to make distribusi into a web interface that can be operated remotely without any knowlegde of CLI. Trying to somehow combine the ideas of distribusi with the ideas of a [tildeverse](https://tildeverse.org/) or [Tilde club](https://tilde.club), but also be neither of these ideas. This project is made for Autonomous Practices at the WDKA in Rotterdam.
|
||||||
|
|
||||||
|
See [`crunk/distribusi-verse`](https://git.vvvvvvaria.org/crunk/distribusi-verse) for more.
|
||||||
|
|
||||||
|
### `distribusi-go`
|
||||||
|
|
||||||
|
Inspired a re-implementation in Go, see [`decentral1se/distribusi-go`](https://git.vvvvvvaria.org/decentral1se/distribusi-go) for more.
|
||||||
|
|
||||||
## 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:
|
||||||
@ -106,6 +124,7 @@ You'll need a [PyPi](https://pypi.org/) account and to be added as a maintainer.
|
|||||||
Please ask around @ Varia for who has PyPi access.
|
Please ask around @ Varia for who has PyPi access.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ pip install twine
|
$ # ... change the version number in setup.py ... #
|
||||||
|
$ pip install twine wheel
|
||||||
$ make publish
|
$ make publish
|
||||||
```
|
```
|
||||||
|
12
build.sh
Executable file
12
build.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/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,13 +5,15 @@ from distribusi.distribusi import distribusify
|
|||||||
|
|
||||||
|
|
||||||
def build_argparser():
|
def build_argparser():
|
||||||
parser = argparse.ArgumentParser("""
|
parser = argparse.ArgumentParser(
|
||||||
|
"""
|
||||||
distribusi 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="."
|
||||||
|
@ -166,6 +166,7 @@ def distribusify(args, directory): # noqa
|
|||||||
a = thumbnail(full_path, name, args)
|
a = thumbnail(full_path, name, args)
|
||||||
if args.no_filenames:
|
if args.no_filenames:
|
||||||
caption = ""
|
caption = ""
|
||||||
|
a = FILE_TYPES[type_].format(name, caption)
|
||||||
if args.captions:
|
if args.captions:
|
||||||
caption = caption(full_path)
|
caption = caption(full_path)
|
||||||
a = FILE_TYPES[type_].format(name, caption)
|
a = FILE_TYPES[type_].format(name, caption)
|
||||||
|
2
setup.py
2
setup.py
@ -7,7 +7,7 @@ with open('README.md', 'r') as handle:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='distribusi',
|
name='distribusi',
|
||||||
version='0.0.8',
|
version='0.0.10',
|
||||||
url='https://git.vvvvvvaria.org/varia/distribusi',
|
url='https://git.vvvvvvaria.org/varia/distribusi',
|
||||||
license='GPLv3',
|
license='GPLv3',
|
||||||
author='Varia',
|
author='Varia',
|
||||||
|
Loading…
Reference in New Issue
Block a user