Giter Site home page Giter Site logo

allejo / roconut Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 0.0 656 KB

A Symfony based pastebin website for BZFlag /savemsgs log files

Home Page: http://roconut.projects.allejo.io/

License: MIT License

PHP 84.36% HTML 13.13% CSS 1.46% Shell 0.44% JavaScript 0.61%
symfony-application bzflag

roconut's Introduction

Roconut

Build Status Scrutinizer Code Quality Code Coverage

A Symfony based pastebin website for BZFlag /savemsgs log files. By default, the exported message logs contain ANSI escape codes, which aren't straightforward to remove and if they are removed, then you're left with a colorless message log. Then you are left to upload the message log to another pastebin website. This project aims to fix all of those issues:

  • Upload all your message logs
  • Apply filters to remove unwanted console messages (e.g. flag grabs, team chat, server messages)
  • Display only certain private messages conversations
  • Have a shareable link for your message to give out to others
  • Save all your message logs in one location
  • Your existing BZFlag account is all that's needed; no need to remember a new password
  • No need for users to download, install, or compile any software; it's all handled on the website

Core Components

The Roconut project builds on top of two core components, which is what is used for handling and colorizing message logs. These components may be able to exist as standalone forks/projects in the future.

ANSI HTML Transformer

The AnsiHtmlTransformer component is a modified version of SensioLabs's project and all modifications are available under the MIT license. This component is tasked with parsing ANSI escape codes and converting them to HTML.

The transformer supports both escape codes for colors (30-38) and ANSI RGB values.

  • Color values parsed from escape codes are handled with a CSS class in the span elements: ansi_color_fg_<color name>
  • RGB values are converted into HEX values and displayed under the style attribute of span elements.

Message Log Transformer

The MessageLogTransformer component is a class which parses and manipulates the HTML received from AnsiHtmlTransformer. At its core, it is a very delicate class that attempts to standardize message log to a format that separate message filters can use to filter out respective messages. This class will likely not work by itself and depends heavily on the format that AnsiHtmlTransformer returns.

Message filters are separate based on their purpose and are located in the AppBundle\MessageLogFilter namespace and must extend the MessageLogFilterInterface.

  • The shouldRun() method will be given the AND'd filter flags and should check if the respective filter has been requested; e.g. $flags & MessageLogTransformer::HIDE_FLAG_ACTION
  • The filterLine() method is run whenever the filter is used. If this method returns true, then propagation to the rest of the filters will be stopped and $rawLine should set to an empty string (something you need to manually do). Returning false will allow you to manipulate $rawLine and allow other filters to process this line also.

Message filters are run in no particular order.

License

MIT

roconut's People

Contributors

allejo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

roconut's Issues

Allow deleting of pastes

  • Allow users to delete their own pastes
  • Allow super admins to delete pastes without having to do so manually in the database

Missing support from Log Transformer

Adding every option still leaves a few things in Roconut.
Like 'destroyed by the server' and 'looking at [name] (team)' and a few other things.
'locked on me' and 'looking at [name] with [super flag]'

Date is a bit off the screen

I'm not sure if this helps, but I'm using FireFox on Windows 10.

Screenshot taken at 50% according to FireFox.
1 error at 50 screensize
I'm able to see the dates, but they appear a bit off the main part of the screen.

Screenshot taken at 67% according to FireFox.
1 error at 67 screensize
I'm able to see the dates, but need to scroll a bit.

Screenshot taken at 90% according to FireFox.
1 error at 90 screensize
It's pretty visible and some movement is needed.

Screenshot taken at 100% according to FireFox.
1 error at 100 screensize
I didn't notice the dates were there, until I was about to suggest it as a feature.

-Zehra

Add support for timestamps

The /savemsgs option has the -t flag which will save timestamps from the console. Including the timestamps will break all of the regexs.

The sanest approach would be to strip the timestamps from the log and use that version for matching regular expressions; however, they won't be stripped from the actual log.

/cc @Zehra

Add support bulk uploading

Allow uploading text files in batches to create multiple pastes. The file names will be the default titles for said pastes.

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.