User:Pedro Sá Couto/TW/NewTitles: Difference between revisions

From XPUB & Lens-Based wiki
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
=WHY?=
=WHY?=


In the Tor version of the application I have created a route where I display all the covers of the titles already republished.
<div style='max-width: 70%;'>


The access through Tor protocol to Tactical Watermarks allows users to access the web application through a .onion top-level domain. The onion address establishes a higher level of protection to users of the platform. Releasing this version is also a generous act regarding all the intervinients that want to get involved with a higher standard of anonymity.
Tactical Watermarks will exist alongside its use.  


I do not archive the republished titles, but it is important to document what was already republished in the form of a cover. Not only I can keep a record to the work that was already produced, but I can also keep track of all the watermarks appended to the texts. These watermarks contain and documents the motivations behind users of the platform, their stories and personal remarks.
Not only I intend Tactical Watermarks to become a tool, in this route I wanted to create a stimulus where users can ask for titles they need. This feature increases the sociability within the web platform and also augments the sense of community and solidarity that exists in this online space. Requesting a new title is also an approach to populate Library Genesis with files that might be missing to other users of this shadow-library aswell.


=PREVIEW=
=PREVIEW=
Line 24: Line 24:


<source lang="python">
<source lang="python">
Route code goes here
db = dataset.connect('sqlite:///file.db?check_same_thread=False')
 
# create table
table = db['requested']
 
@app.route('/request_form', methods=['GET'])
def request_form():
    return render_template('public/request_form.html')
 
# from GET /bookrequest render request.html
@app.route('/uploadbook', methods=['GET'])
def bookrequest():
    books = table.find(order_by='-id')
    return render_template('public/upload_book.html', books=books)
 
# from POST /submit store data in the database and forward to the request
@app.route('/submit', methods=['POST'])
def submit():
    book = dict(title=request.form['title'], author=request.form['author'], publisher=request.form['publisher'], year=request.form['year'], extention=re$
    table.insert(book)
    return redirect(url_for('index'))
 
#Request a book
#REQUEST IN REPUBLISH
# from GET /bookrequest render request.html
@app.route('/republish', methods=['GET'])
def bookrepublish():
    books = table.find(order_by='-id')
    return render_template('public/republish.html', books=books)
</source>
</source>

Latest revision as of 02:54, 16 June 2020

STEPS

Asking for a new title is separated in 4 steps:

1. Checking if the file was already asked for
2. Filling the form with info from the title
3. Submiting the request
4. Displaying the request

WHY?

Tactical Watermarks will exist alongside its use.

Not only I intend Tactical Watermarks to become a tool, in this route I wanted to create a stimulus where users can ask for titles they need. This feature increases the sociability within the web platform and also augments the sense of community and solidarity that exists in this online space. Requesting a new title is also an approach to populate Library Genesis with files that might be missing to other users of this shadow-library aswell.

PREVIEW

Printscreen from https://hub.xpub.nl/uploadbook/ and https://hub.xpub.nl/republish/

Python View

db = dataset.connect('sqlite:///file.db?check_same_thread=False')

# create table
table = db['requested']

@app.route('/request_form', methods=['GET'])
def request_form():
    return render_template('public/request_form.html')

# from GET /bookrequest render request.html
@app.route('/uploadbook', methods=['GET'])
def bookrequest():
    books = table.find(order_by='-id')
    return render_template('public/upload_book.html', books=books)

# from POST /submit store data in the database and forward to the request
@app.route('/submit', methods=['POST'])
def submit():
    book = dict(title=request.form['title'], author=request.form['author'], publisher=request.form['publisher'], year=request.form['year'], extention=re$
    table.insert(book)
    return redirect(url_for('index'))

#Request a book
#REQUEST IN REPUBLISH
# from GET /bookrequest render request.html
@app.route('/republish', methods=['GET'])
def bookrepublish():
    books = table.find(order_by='-id')
    return render_template('public/republish.html', books=books)