Giter Club home page Giter Club logo

picky's Introduction

picky

A self-hosted text file webreader made with Perl, Bootstrap 3 and Plack

image

I keep some stories in .txt format in a directory. I wanted a simple way to be able to pick a random one and start reading. This is the result.

Features:

  • Simple reading and nice display of text files (no markup or html processing done)
  • Ability to search based on filename (no content search)
  • Can edit files in-situ
  • Can delete files (Note: There's no confirmation and it will need write permission over the files)
  • Allows you to vote up and down a file by 10 points out of a 100, or give a particularly great file a "Top score" of 100
  • Allows you to pick "great" files, those whose score is over 90
  • It will auto-add new files to the database.
  • Score is saved in a mysql/mariadb database.
  • Fast. Tested on dirs with many hundreds of files, should be good for many tens of thousands. Only rescans periodically so doesn't rescan each time.
  • Runs as a systemd service on a configurable port. systemd unit file supplied

Installation:

Requires linux or similar. Bootstrap is loaded via cdn, so no installation of that is required.

  1. Install Plack, using either your distro's package manager or cpanm. Specifically these modules:
Plack::Request
Plack::Builder

Picky also uses DBI and File::Slurp but these are both in Perl Core and should be available for any recent version of Perl. 2. Copy picky.psgi file somewhere suitable, such as /var/www/html 3. Edit picky.service so it points to that file and install where your distro puts Systemd service files. Eg, in Debian and Centos, this is /etc/systemd/system/ 4. Enable and start the service:

systemctl daemon-reload
systemctl start picky
systemctl enable picky
  1. Create a database in mysql with the contents of the picky.sql file and a user that can read it (Username and password are saved in picky.psgi)
  2. All going well, point your webbrowser at that machine, port 5001 (or whatever you specified in picky.service)

picky's People

Contributors

digdilem avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.