-
Notifications
You must be signed in to change notification settings - Fork 0
Home
KISSmo Perl Pastebin is a simple pastebin service implemented in Perl using the Mojolicious framework. It allows users to create and share plain text snippets or code snippets easily. The service stores the pasted content in an SQLite database and provides various features such as expiration of pastes, viewing and downloading pastes, and raw access to the content.
To run KISSmo Perl Pastebin, the following dependencies are required:
- Perl (5.10.1 or higher)
- Mojolicious framework
- DBI module
- File::Slurp module
- SQLite database
Make sure you have Perl installed on your system and install the required modules using the CPAN or CPANM package manager.
- Clone the KISSmo Perl Pastebin repository from GitHub:
$ git clone https://github.com/hedho/KISSmoPerl.git
- Change to the project directory:
$ cd KISSmoPerl
- Install the required Perl modules:
$ cpan Mojolicious DBI File::Slurp
- Create an SQLite database file named
pastes.db
:
$ touch pastes.db
$ mkdir pastes
The configuration for KISSmo Perl Pastebin is handled through the Perl script itself. You can modify the script directly to customize the behavior and appearance of the pastebin service. Some of the configurable options include:
- Database settings: You can modify the database connection parameters (
dbname
,username
,password
) in the line$dbh->connect("dbi:SQLite:dbname=pastes.db","","", { RaiseError => 1, AutoCommit => 1 });
to match your environment.
To start the KISSmo Perl Pastebin service, run the following command:
$ ./pastebin.pl daemon
The service will start running on the default port (3000) on your local machine. You can access the pastebin service by opening a web browser and visiting http://localhost:3000
.
-
Home Page: The home page provides a simple form where you can enter your content. The content can be any plain text or code snippet that you want to share. Enter the content in the provided textarea and click on the "Create paste" button.
-
View Paste: After creating a paste, you will be redirected to a page that displays the paste details. The content of the paste will be shown along with options to view the raw content or download the paste as a text file. The expiration time of the paste is also displayed.
-
Raw Content: Clicking on the "RAW" button will display the raw content of the paste in plain text format.
-
Download: Clicking on the "Download" button will prompt you to download the paste as a text file. The file will be named with the paste ID followed by the
.txt
extension.
If you want to customize the appearance or behavior of the pastebin service, you can modify the templates located in the __DATA__
section of the Perl script. The templates are written in Embedded Perl (EP) format and use HTML for markup. You can modify the HTML, CSS, and JavaScript code to match your requirements.
To manage the pastes stored in the database, you can use any SQLite database management tool or interact directly with the pastes.db
file using the SQLite command-line tool.
KISSmo Perl Pastebin is a lightweight and easy-to-use pastebin service written in Perl. It provides a simple web interface for creating, sharing, and managing plain text.
KEEP IT SIMPLE STUPID !