Ver código fonte

removing some resource paths and adding placeholder text

joel
Simon Bowie 2 anos atrás
pai
commit
6ac96bd874
15 arquivos alterados com 98 adições e 342 exclusões
  1. +0
    -16
      web/app/__init__.py
  2. +0
    -62
      web/app/create.py
  3. +5
    -0
      web/app/main.py
  4. +0
    -57
      web/app/reference.py
  5. +8
    -0
      web/app/resources.py
  6. +0
    -57
      web/app/sensitivity.py
  7. +8
    -0
      web/app/static/styles/custom.css
  8. +39
    -0
      web/app/templates/about.html
  9. +2
    -22
      web/app/templates/base.html
  10. +13
    -0
      web/app/templates/edit.html
  11. +18
    -7
      web/app/templates/index.html
  12. +1
    -7
      web/app/templates/resources.html
  13. +4
    -0
      web/app/tool.py
  14. +0
    -57
      web/app/typology.py
  15. +0
    -57
      web/app/workflow.py

+ 0
- 16
web/app/__init__.py Ver arquivo

@@ -59,18 +59,6 @@ def create_app():
from .practice import practice as practice_blueprint
app.register_blueprint(practice_blueprint)

# blueprint for sensitivity parts of app
from .sensitivity import sensitivity as sensitivity_blueprint
app.register_blueprint(sensitivity_blueprint)

# blueprint for typology parts of app
from .typology import typology as typology_blueprint
app.register_blueprint(typology_blueprint)

# blueprint for workflow parts of app
from .workflow import workflow as workflow_blueprint
app.register_blueprint(workflow_blueprint)

# blueprint for publisher parts of app
from .publisher import publisher as publisher_blueprint
app.register_blueprint(publisher_blueprint)
@@ -79,10 +67,6 @@ def create_app():
from .book import book as book_blueprint
app.register_blueprint(book_blueprint)

# blueprint for reference parts of app
from .reference import reference as reference_blueprint
app.register_blueprint(reference_blueprint)

# blueprint for create parts of app
from .create import create as create_blueprint
app.register_blueprint(create_blueprint)

+ 0
- 62
web/app/create.py Ver arquivo

@@ -76,48 +76,6 @@ def create_resource():
db.session.add(new_practice)
db.session.commit()

elif request.form.get('resource_type') == 'sensitivity':
type = 'sensitivity'
name = request.form.get('sensitivity_name')
description = request.form.get('description')

if not name:
flash('Name is required!')
else:
sensitivity = Sensitivity.query.filter_by(name=name).first() # if this returns a sensitivity, then the name already exists in database

if sensitivity: # if a sensitivity is found, we want to redirect back to create page
flash('Sensitivity with same name already exists')
return redirect(url_for('create.create_resource'))

# create a new sensitivity with the form data
new_sensitivity = Resource(type=type, name=name, description=description)

# add the new sensitivity to the database
db.session.add(new_sensitivity)
db.session.commit()

elif request.form.get('resource_type') == 'typology':
type = 'typology'
name = request.form.get('typology_name')
description = request.form.get('description')

if not name:
flash('Name is required!')
else:
typology = Typology.query.filter_by(name=name).first() # if this returns a typology, then the name already exists in database

if typology: # if a typology is found, we want to redirect back to create page
flash('Typology with same name already exists')
return redirect(url_for('create.create_resource'))

# create a new typology with the form data
new_typology = Resource(type=type, name=name, description=description)

# add the new typology to the database
db.session.add(new_typology)
db.session.commit()

elif request.form.get('resource_type') == 'publisher':
type = 'publisher'
name = request.form.get('publisher_name')
@@ -161,25 +119,5 @@ def create_resource():
db.session.add(new_book)
db.session.commit()

elif request.form.get('resource_type') == 'reference':
type = 'reference'
zoteroUrl = request.form.get('zoteroUrl')

if not zoteroUrl:
flash('Zotero URL is required!')
else:
reference = Reference.query.filter_by(zoteroUrl=zoteroUrl).first() # if this returns a reference, then the name already exists in database

if reference: # if a reference is found, we want to redirect back to create page
flash('Reference with same URL already exists')
return redirect(url_for('create.create_resource'))

# create a new reference with the form data
new_reference = Resource(type=type, zoteroUrl=zoteroUrl)

# add the new reference to the database
db.session.add(new_reference)
db.session.commit()

resource_dropdown = Resource.query
return render_template('create.html', resource_dropdown=resource_dropdown)

+ 5
- 0
web/app/main.py Ver arquivo

@@ -30,3 +30,8 @@ def profile():
@main.route('/test')
def test():
return render_template('test.html')

# route for about page
@main.route('/about')
def about():
return render_template('about.html')

+ 0
- 57
web/app/reference.py Ver arquivo

@@ -1,57 +0,0 @@
# @name: reference.py
# @creation_date: 2022-04-05
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <ad7588@coventry.ac.uk>
# @purpose: reference route for reference-related functions and pages
# @acknowledgements:
# https://www.digitalocean.com/community/tutorials/how-to-make-a-web-application-using-flask-in-python-3

from flask import Blueprint, render_template, request, flash, redirect, url_for
from flask_login import login_required, current_user
from .models import Resource
from .resources import *
from werkzeug.exceptions import abort
from . import db

reference = Blueprint('reference', __name__)

# route for displaying all references in database
@reference.route('/references')
def get_references():
references = Resource.query.filter_by(type='reference')
return render_template('resources.html', resources=references, type='reference')

# route for displaying a single reference based on the ID in the database
@reference.route('/references/<int:reference_id>')
def show_reference(reference_id):
reference = get_resource(reference_id)
links = get_linked_resources(reference_id)
return render_template('resource.html', resource=reference, links=links)

# route for editing a single reference based on the ID in the database
@reference.route('/references/<int:reference_id>/edit', methods=('GET', 'POST'))
@login_required
def edit_reference(reference_id):
reference = get_resource(reference_id)

if request.method == 'POST':
name = request.form['name']
description = request.form['description']

if not name:
flash('Name is required!')
else:
reference = Resource.query.get(reference_id)
reference.name = name
reference.description = description
db.session.commit()
return redirect(url_for('reference.get_references'))

return render_template('edit.html', resource=reference)

# route for function to delete a single reference from the edit page
@reference.route('/references/<int:reference_id>/delete', methods=('POST',))
@login_required
def delete_reference(reference_id):
delete_resource(reference_id)
return redirect(url_for('reference.get_references'))

+ 8
- 0
web/app/resources.py Ver arquivo

@@ -59,3 +59,11 @@ def delete_resource(resource_id):
db.session.delete(deletion)
db.session.commit()
flash('Successfully deleted!')

# function to delete a single relationship
#def delete_relationship(first_resource_id, second_resource_id):
#relationship_id = Relationship.query.filter_by(first_resource_id=first_resource_id).first()
#return relationship_id['id']
#deletion = Relationship.query.get(relationship_id)
#db.session.delete(deletion)
#db.session.commit()

+ 0
- 57
web/app/sensitivity.py Ver arquivo

@@ -1,57 +0,0 @@
# @name: sensitivity.py
# @creation_date: 2022-02-08
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <ad7588@coventry.ac.uk>
# @purpose: sensitivity route for sensitivity-related functions and pages
# @acknowledgements:
# https://www.digitalocean.com/community/tutorials/how-to-make-a-web-application-using-flask-in-python-3

from flask import Blueprint, render_template, request, flash, redirect, url_for
from flask_login import login_required, current_user
from .models import Resource
from .resources import *
from werkzeug.exceptions import abort
from . import db

sensitivity = Blueprint('sensitivity', __name__)

# route for displaying all sensitivities in database
@sensitivity.route('/sensitivities')
def get_sensitivities():
sensitivities = Resource.query.filter_by(type='sensitivity')
return render_template('resources.html', resources=sensitivities, type='sensitivity')

# route for displaying a single sensitivity based on the ID in the database
@sensitivity.route('/sensitivities/<int:sensitivity_id>')
def show_sensitivity(sensitivity_id):
sensitivity = get_resource(sensitivity_id)
links = get_linked_resources(sensitivity_id)
return render_template('resource.html', resource=sensitivity, links=links)

# route for editing a single sensitivity based on the ID in the database
@sensitivity.route('/sensitivities/<int:sensitivity_id>/edit', methods=('GET', 'POST'))
@login_required
def edit_sensitivity(sensitivity_id):
sensitivity = get_resource(sensitivity_id)

if request.method == 'POST':
name = request.form['name']
description = request.form['description']

if not name:
flash('Name is required!')
else:
sensitivity = Resource.query.get(sensitivity_id)
sensitivity.name = name
sensitivity.description = description
db.session.commit()
return redirect(url_for('sensitivity.get_sensitivities'))

return render_template('edit.html', sensitivity=sensitivity)

# route for function to delete a single sensitivity from the edit page
@sensitivity.route('/sensitivities/<int:sensitivity_id>/delete', methods=('POST',))
@login_required
def delete_sensitivity(sensitivity_id):
delete_resource(sensitivity_id)
return redirect(url_for('sensitivity.get_sensitivities'))

+ 8
- 0
web/app/static/styles/custom.css Ver arquivo

@@ -44,6 +44,14 @@ p {
font-family: Lato, sans-serif
}

ul {
font-weight: 400;
color: #000000;
font-size: 15px;
line-height: 1.8;
font-family: Lato, sans-serif;
}

h1,
h2,
h3,

+ 39
- 0
web/app/templates/about.html Ver arquivo

@@ -0,0 +1,39 @@
{% extends "base.html" %}

{% block content %}
<p>
Version 0.1 of the Experimental Publishing Compendium was edited by members of COPIM’s experimental publishing group formally known as Work Package Six. Since then a great many contributors⁠, from tool and technology makers to authors, designers and publishers have contributed, slowly transforming the Compendium from an edited volume to a collective resource.
</p>
<p>The Compendium is © 2022–{{ moment().format('YYYY') }} <a href="https://copim.ac.uk/">COPIM</a> and licensed under a <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License (CC BY 4.0)</a> to make it open for reuse and disappropriation.
</p>
<p>
... List all contributors....
</p>
<p>
The Compendium is designed to be periodically updated, growing with the practices it aims to catalogue and support. Keeping the Compendium updated takes labour, care and attention and like any processual book it will die at some point. Currently, the Compendium is hosted by the Centre for Postdigital Cultures, Coventry University and is version 0.1.
</p>
<h1>
Preface
</h1>
<p>
We — the editors of this compendium — do not wish to impose one version of experimental publishing, yet we recognise that a collection such as this is necessarily biased and thus political. In this preface to the first version, we are sharing how this particular version of the compendium came about, in the hope that this will open the compendium for amendments by those who maintain and use it.
</p>
<p>
The COPIM experimental publishing group, formerly known as work package six, worked for three-and-a-half-years on experimental publishing, in the context of the largely Anglo-American Community-led Open Publication Infrastructures for Monographs Project, COPIM. At a time when commercial consolidation threatened to monopolise the emerging scholarly Open Access publishing landscape, COPIM gathered publishers, libraries and infrastructure providers to develop community-owned infrastructure that can support small and large players. Open infrastructure, we proposed as an alternative to proprietary platforms that extract value and control access. Under the banner of scaling small, COPIM worked towards a diverse publishing landscape characterised by community ownership, collective production and governance, scholar-led publishing, and the sharing of resources and open infrastructures amongst diverse institutions. COPIM’s work packages were largely dedicated to serious infrastructure building, with the exception of the experimental publishing group, which grants the question how experimental publishing contributes to the ambition to establish infrastructures that allow diverse small initiatives to proliferate at scale?
</p>
<p>
The closely related metaphors of publishing landscape, ecology, ecosystems or bibliodiversity shaped COPIM’s work. Staying with these images of lively and abundant interdependence allows us to locate experimental publishing’s place in scholarly knowledge production. Speaking of publishing ecologies implies that scholarly publishing cannot be separated from the wider academic landscape. How scholarly work is published cannot be separated from how it is funded, conceptualised, written, valued, reviewed, rewarded, read and taught. In this metaphor, scholarly works, like all specimen, coevolve with the environment they inhabit.
</p>
<p>
Many things can be said about this environment: the contemporary academy. There isn’t one academy for starters. Opinions and politics differ, so do the stakes and subject position of the beholders.
</p>
<p>
We, invested in feminist techno-politics, yearn for more collective, inclusive, embodied, situated and caring modes of knowledge production. But the notion that changes in publishing affect the entire scholarly landscape applies just as neatly to those, for example, who pursue scholarly excellence through competition and streamlining. Our point here, is that scholarly publishing ecologies reflect and materialise the wider scholarly landscape. Scholarly books, in this ecological view, are not containers of knowledge but relational nodes that materialise what does and doesn’t count as valuable practices, sites, labour, and subjects of knowledge.
</p>
<p>
The flow of water is commonly used to model the flow of knowledge, taking us further into the question which forces shape the metaphorical scholarly landscape. Bureaucratic fantasies, enshrined in grant applications, project timetables and scholarly self-understanding and career paths imagine scholarly publishing at the end of an orderly pipeline of knowledge. The way that institutions such as libraries, universities, publishers, funders, and intellectual property regimes are organised tends to reinforce the notion of a manageable flow from funding, to research question, to investigation to publication to evaluation. The metaphor of channeled flow and the premises of contained stages provides structure. Channeling the flow of valuable knowledge, gives publishing a place and a form: the book, at the end of the pipe. But… you see it coming… where there are pipes there is , breakage, spillage and blockage. And… without overflow and contamination… there won’t be much to be piped. A sanitised scholarly landscape of industrial pipage is a nightmare, that evokes the very real nightmare streamlined industrial production has brought upon very real ecologies—leaving but scraplands for diversity which alone can ensure life. And... also… despite all efforts to establish well irrigated, drip-fed academies, the flow of scholarly knowledge is not easily channeled. Swamps, oceans, ice shields, underground currents, floods and drought prone rivers evoke alternative models of flow, that might inspire a diverse knowledge-scape that cannot be contained within the academy or otherwise.
</p>
<p>
Coming back to experimental publishing, new forms of publication might create new kinds of pipes or spill-over into more relational circulation. Either way, we posit that experimental publishing is one of the sites where the shape of scholarly landscapes, and their relationship to other ecologies of knowledge and power is negotiated and materialised in practice. How we do publish matters. Experimenting with scholarly books is to experiment with scholarly modes of knowledge production. This labour of love, like other experimental practice, takes place at the growing edges and in the cracks of established practices, where by steady corrosion, underground commotion or capital intense incubation forms of writing, making, sharing, reviewing, discovering, reading and cataloging books come into being that will change what counts as scholarly work.
</p>
{% endblock %}

+ 2
- 22
web/app/templates/base.html Ver arquivo

@@ -50,34 +50,14 @@
Practices
</a>
</li>
<li class="nav-item">
<a href="{{ url_for('sensitivity.get_sensitivities') }}" class="nav-link">
Sensitivities
</a>
</li>
<li class="nav-item">
<a href="{{ url_for('typology.get_typologies') }}" class="nav-link">
Typologies
</a>
</li>
<li class="nav-item">
<a href="{{ url_for('workflow.get_workflows') }}" class="nav-link">
Workflows
</a>
</li>
<li class="nav-item">
<a href="{{ url_for('publisher.get_publishers') }}" class="nav-link">
Publishers
</a>
</li>
<li class="nav-item">
<a href="{{ url_for('book.get_books') }}" class="nav-link">
Books
</a>
</li>
<li class="nav-item">
<a href="{{ url_for('reference.get_references') }}" class="nav-link">
References
<a href="{{ url_for('publisher.get_publishers') }}" class="nav-link">
Publishers
</a>
</li>
{% if current_user.is_authenticated %}

+ 13
- 0
web/app/templates/edit.html Ver arquivo

@@ -111,6 +111,19 @@
</div>
{% endif %}

{% if links %}
<div class="mb-3 mt-3">
<label for="linked_practice_id">Remove linked resources</label>
</div>
<div class="mb-3 mt-3">
<select name="remove_linked_resources" id="remove_linked_resources" aria-label="Remove linked resources" class="selectpicker" data-live-search="true" multiple>
{% for link in links %}
<option value="{{ link['id'] }}">{{ link['name'] }}</option>
{% endfor %}
</select>
</div>
{% endif %}

<div class="mb-3 mt-3">
<button type="submit" class="btn btn-primary">Submit</button>
</div>

+ 18
- 7
web/app/templates/index.html Ver arquivo

@@ -2,20 +2,31 @@

{% block content %}
<h1>
Short intro title
ExPub Compendium
</h1>
<p>
Books bind people and practices together, holding relations, opening the world. Experimental books push what the book container can hold... <a href="">more</a>
The Experimental Publishing Compendium is for authors, designers, publishers, institutions and technologist who challenge, push and redefine the shape, form and rationale of scholarly works. The compendium offers a catalogues of <a href="{{ url_for('tool.get_tools') }}">tools</a>, <a href="{{ url_for('practice.get_practices') }}">practices</a>, <a href="{{ url_for('publisher.get_publishers') }}">publishers</a>, and <a href="{{ url_for('book.get_books') }}">books</a> to inspire experimental scholarly works.
</p>
<h2>
How to use the compendium
</h2>
<p>
The compendium catalogues potential ingredients for the making of experimental publications.
</p>
<ul>
<li>Under <a href="{{ url_for('tool.get_tools') }}">Tools</a> you’ll find mostly software that supports experimental publication from collective writing to the annotation and remix of published texts.</li>
<li><a href="{{ url_for('practice.get_practices') }}">Practices</a> provide inspiration for experimental book making.</li>
<li><a href="{{ url_for('book.get_books') }}">Books</a> and <a href="{{ url_for('publisher.get_publishers') }}">publishers</a> provides examples of experimental books and those who publish them.</li>
</ul>
<p>
Each item is cross linked so that a practice will take you to relevant tools or examples and vice versa.
</p>
<h1>
Essay title
</h1>
<p>
The Experimental Publishing Compendium weaves some some ingredients for the making of experimental books into a non-linear how-to guide... <a href="">more</a>
The selection is tentative, reflecting the knowledge and biases of the contributors of current and previous versions. If you want to submit or edit anything in the catalogue please do so by doing XXthisXXX.
</p>
<hr>
<p>
Browse random ingredients, search or explore typology, books, tools, practices, sensitivities and publishers
Browse from this selection of random tools, search or explore books, tools, practices, and publishers.
</p>

<div class="row">

+ 1
- 7
web/app/templates/resources.html Ver arquivo

@@ -4,13 +4,7 @@
<div class="row">
<div class="col-12 text-center">
<h1>{% block title %}
{% if (type == 'sensitivity') %}
{{ type|capitalize|replace("ty", "ties") }}
{% elif (type == 'typology') %}
{{ type|capitalize|replace("gy", "gies") }}
{% else %}
{{ type|capitalize + 's' }}
{% endif %}
{{ type|capitalize + 's' }}
{% endblock %}
</h1>
</div>

+ 4
- 0
web/app/tool.py Ver arquivo

@@ -48,6 +48,7 @@ def edit_tool(tool_id):
outputFormats = request.form['outputFormats']
status = request.form['status']
linked_resources = request.form.getlist('linked_resources')
remove_linked_resources = request.form.getlist('remove_linked_resources')

if not name:
flash('Name is required!')
@@ -69,6 +70,9 @@ def edit_tool(tool_id):
link = Resource.query.get(linked_resource)
if link not in links:
add_linked_resource(tool_id, linked_resource)
#if remove_linked_resources:
# for remove_linked_resource in remove_linked_resources:
# delete_relationship(tool_id, remove_linked_resource)
return redirect(url_for('tool.get_tools'))

return render_template('edit.html', resource=tool, resource_dropdown=resource_dropdown, links=links)

+ 0
- 57
web/app/typology.py Ver arquivo

@@ -1,57 +0,0 @@
# @name: typology.py
# @creation_date: 2022-04-05
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <ad7588@coventry.ac.uk>
# @purpose: typology route for typology-related functions and pages
# @acknowledgements:
# https://www.digitalocean.com/community/tutorials/how-to-make-a-web-application-using-flask-in-python-3

from flask import Blueprint, render_template, request, flash, redirect, url_for
from flask_login import login_required, current_user
from .models import Resource
from .resources import *
from werkzeug.exceptions import abort
from . import db

typology = Blueprint('typology', __name__)

# route for displaying all typologies in database
@typology.route('/typologies')
def get_typologies():
typologies = Resource.query.filter_by(type='typology')
return render_template('resources.html', resources=typologies, type='typology')

# route for displaying a single typology based on the ID in the database
@typology.route('/typologies/<int:typology_id>')
def show_typology(typology_id):
typology = get_resource(typology_id)
links = get_linked_resources(typology_id)
return render_template('resource.html', resource=typology, links=links)

# route for editing a single typology based on the ID in the database
@typology.route('/typologies/<int:typology_id>/edit', methods=('GET', 'POST'))
@login_required
def edit_typology(typology_id):
typology = get_resource(typology_id)

if request.method == 'POST':
name = request.form['name']
description = request.form['description']

if not name:
flash('Name is required!')
else:
typology = Resource.query.get(typology_id)
typology.name = name
typology.description = description
db.session.commit()
return redirect(url_for('typology.get_typologies'))

return render_template('edit.html', resource=typology)

# route for function to delete a single typology from the edit page
@typology.route('/typologies/<int:typology_id>/delete', methods=('POST',))
@login_required
def delete_typology(typology_id):
delete_resource(typology_id)
return redirect(url_for('typology.get_typologies'))

+ 0
- 57
web/app/workflow.py Ver arquivo

@@ -1,57 +0,0 @@
# @name: workflow.py
# @creation_date: 2022-04-05
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <ad7588@coventry.ac.uk>
# @purpose: workflow route for workflow-related functions and pages
# @acknowledgements:
# https://www.digitalocean.com/community/tutorials/how-to-make-a-web-application-using-flask-in-python-3

from flask import Blueprint, render_template, request, flash, redirect, url_for
from flask_login import login_required, current_user
from .models import Resource
from .resources import *
from werkzeug.exceptions import abort
from . import db

workflow = Blueprint('workflow', __name__)

# route for displaying all workflows in database
@workflow.route('/workflows')
def get_workflows():
workflows = Resource.query.filter_by(type='workflow')
return render_template('resources.html', resources=workflows, type='workflow')

# route for displaying a single workflow based on the ID in the database
@workflow.route('/workflows/<int:workflow_id>')
def show_workflow(workflow_id):
workflow = get_resource(workflow_id)
links = get_linked_resources(workflow_id)
return render_template('resource.html', resource=workflow, links=links)

# route for editing a single workflow based on the ID in the database
@workflow.route('/workflows/<int:workflow_id>/edit', methods=('GET', 'POST'))
@login_required
def edit_workflow(workflow_id):
workflow = get_resource(workflow_id)

if request.method == 'POST':
name = request.form['name']
description = request.form['description']

if not name:
flash('Name is required!')
else:
workflow = Resource.query.get(workflow_id)
workflow.name = name
workflow.description = description
db.session.commit()
return redirect(url_for('workflow.get_workflows'))

return render_template('edit.html', resource=workflow)

# route for function to delete a single workflow from the edit page
@workflow.route('/workflows/<int:workflow_id>/delete', methods=('POST',))
@login_required
def delete_workflow(workflow_id):
delete_resource(workflow_id)
return redirect(url_for('workflow.get_workflows'))

Carregando…
Cancelar
Salvar