Compare commits

...

13 Commits

Author SHA1 Message Date
decentral1se
4964790762
follow title in upstream README 2022-02-04 13:01:12 +01:00
decentral1se
9ef68194db
caps that 2022-02-04 13:00:52 +01:00
decentral1se
1418feeaa8
fix all my typos 2022-02-04 13:00:14 +01:00
decentral1se
06cf1f5bdd
more uses 2022-02-04 12:59:12 +01:00
63becedaf5
Ensure we have wheel installed 2021-07-13 10:11:28 +02:00
6b627f0f96
Bump to new version 2021-07-13 10:08:01 +02:00
7a2f8a5142
Add change log entry
See varia/distribusi#5.
2021-07-13 10:06:51 +02:00
decentral1se
6dd9fb7b40 Merge pull request 'a bug fix for --no-filenames option to work! (for images)' (#5) from losttra8n/distribusi:losttra8n-patch-1 into master
Reviewed-on: varia/distribusi#5
2021-07-13 10:06:00 +02:00
losttra8n
46e68fc966 a bug fix for --no-filenames option to work! (for images)
i was trying to '-nf' option, then image captions were not consistent! i.e. they were still there with '-nf' option. so investigated.
2021-07-07 12:56:55 +02:00
rra
545577978a Update 'README.md'
added section for uses in the wild
2021-05-04 15:14:59 +02:00
60275a475e
Add sketchy build script 2020-05-03 18:11:20 +02:00
e730cfec55
Boot out a 0.0.9 release 2020-04-22 21:45:36 +02:00
rra
f766f67cee Merge branch 'master' of dickreckard/distribusi into master 2019-10-30 10:42:40 +01:00
7 changed files with 71 additions and 27 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ index.html
pip-wheel-metadata/ pip-wheel-metadata/
*.pdf *.pdf
*.css *.css
*.pyz

View File

@ -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

View File

@ -85,6 +85,24 @@ Distribusi was first conceptualized as a tool which supported a contribution by
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
View 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 \
.

View File

@ -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="."

View File

@ -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)

View File

@ -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',