xiagu / jekyll-rp_logs Goto Github PK
View Code? Open in Web Editor NEWJeykll plugin to turn raw IRC logs into pretty pages.
Home Page: https://andrew.rs/projects/jekyll-rp_logs/
License: MIT License
Jeykll plugin to turn raw IRC logs into pretty pages.
Home Page: https://andrew.rs/projects/jekyll-rp_logs/
License: MIT License
The ability to make one tag become another tag to help homogenize tags that may be all the same thing, put different ways.
Currently the default config file suggests that it can, and mentions steps needed for an earlier version when the plugin code was still accessible and not bundled in a gem.
Right now it just crashes without a helpful message.
Ideas:
config line:
char:TihansPlant: ["char:Tihan's Plant", plant]
*** Bad character ''' in tag 'Tihan's Plant'
/var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:105:in block in name_to_dir': Bad character ''' in tag 'Tihan's Plant' (Exception) from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:97:in
each_char'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:97:in name_to_dir' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:43:in
initialize'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:29:in new' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:29:in
block in []'
from /var/www/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/set.rb:283:in each_key' from /var/www/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/set.rb:283:in
each'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:29:in map' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:29:in
[]'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_page.rb:85:in update_tags' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_log_converter.rb:194:in
convert_rp'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_log_converter.rb:109:in block in convert_all_pages' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_log_converter.rb:106:in
each'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_log_converter.rb:106:in convert_all_pages' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_log_converter.rb:52:in
generate'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/site.rb:280:in block in generate' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/site.rb:279:in
each'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/site.rb:279:in generate' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/site.rb:50:in
process'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/command.rb:28:in process_site' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:56:in
build'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:34:in process' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:18:in
block (2 levels) in init_with_program'
from /var/www/.rvm/gems/ruby-2.2.1/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in call' from /var/www/.rvm/gems/ruby-2.2.1/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in
block in execute'
from /var/www/.rvm/gems/ruby-2.2.1/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in each' from /var/www/.rvm/gems/ruby-2.2.1/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in
execute'
from /var/www/.rvm/gems/ruby-2.2.1/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in go' from /var/www/.rvm/gems/ruby-2.2.1/gems/mercenary-0.3.5/lib/mercenary.rb:19:in
program'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/bin/jekyll:20:in <top (required)>' from /var/www/.rvm/gems/ruby-2.2.1/bin/jekyll:23:in
load'
from /var/www/.rvm/gems/ruby-2.2.1/bin/jekyll:23:in <main>' from /var/www/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in
eval'
from /var/www/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `
These need to be tested before the next version of the gem is released.
Similarly to #7, but the reverse. Sometimes posts should be merged into one, but aren't close enough together temporally. Should be much rarer of an issue now that the time is checked from the most recent of a set of merged posts, but could still happen.
01:02:00 * Alice does a long action, that
01:02:10 * Alice splits into two posts, but somehow
A flag to indicate that a post should be merged would work. Ideas for names:
The ability to put a description on a tag page about the tag in question.
Enable us to edit aliases and implications outside the config file so that changes dont require relaunching jekyll.
Sometimes users may make posts (within the merge time threshold) like this:
01:02:00 * Alice does one action.
01:02:02 * Alice does another separate action.
Some way of indicating that a post should not be merged is needed, such as a flag. Ideas for names:
I'd be nice to get a count of posts, words, Average character count per RPer, Time spent, and number of RP sessions.
Due to whatever weird encoding is done, a symbol like © or ™ that is in a log file encoded with ANSI will result in the error below.
Error reading file /_rps/test.md: invalid byte sequence in UTF-8
Liquid Exception: invalid byte sequence in UTF-8 in _rps/test.md
jekyll 2.5.3 | Error: invalid byte sequence in UTF-8
Only happens if the symbol is in a emote or text line.
Switching to UTF-8 encoding fixes this issue, but it is still odd enough to be worth noting.
This has been tested in the latest build and in an old build before jekyll-rp_logs moved to a gem.
It'd be neat if, at least for canon or Arc stuff you could do a manual ordering of RPs if things happen out of order. Perhaps A flag that allows for manual sorting via decimal values.
/(?<timestamp>regexp)/
and similar, instead of the match group variables $1
, $2
etc.
It would be neat if we could generate character connectivity graphs based on characters in RPS, al la:
https://derpibooru.org/1007507
At least for canon/noncanon, but it'd be even neater if you could configure a list of tags to generate a graph for.
It'd be neat if the raw logs could be included in the site and then linked to on each of the RP pages somewhere.
Right now you can link to a post's timestamp with:
http://example.com/rps/rp_title/#YYYY-MM-DD_hh:mm:ss
I suggest having a URL parameter (query string?) to allowing highlighting of a particular post such as:
http://example.com/rps/rp_title/?highlight=YYYY-MM-DD_hh:mm:ss
or even support a range of posts to highlight:
http://example.com/rps/rp_title/?start=YYYY-MM-DD_hh:mm:ss&end=YYYY-MM-DD_hh:mm:ss
Since it's redundant and they all do it the same way.
...for now. May run into issues with eventually implementing stateful parsers (for say, Skype)
This is difficult to detect -- even if we know a client splits in the middle of words, sometimes it might hit a space between words instead, and then it's important to not merge them. Some clients may leave a space on the end of a post when they don't split a word, but that space could easily be stripped off accidentally.
This would have eased debugging a situation where the gem wasn't properly required, resulting in Jekyll happily building and not doing anything at all.
Perhaps some conversion progress indication while we're at it.
It would be helpful to have a summary field that would appear at the top of a RP page, and/or appear as alt text/title text for the link to the RP from the main page.
Can be used as a 'tldr' for long story related RPs.
Also, the code for the menu should probably be separated from the OOC toggling code.
Such as [], for instance. Or (( or other things.
Perhaps extracting to a user configurable list would be ideal.
Since the contents are just logs anyway, tags shouldn't be needed in the actual body.
This would mess up anyone who uses {{ }}
to denote OOC, not to mention breaking when people do stuff like this:
2014-02-27 19:50:00 %SomeJerk (({{{[[(snipped])}]))}} (Mismatched parenticies just for you
Would be nice to have the tags shown below the title of RP pages.
It would be nice to have a javascript tag searching function, so that multiple tags can be searched.
Seems like an easy default, but some logs might be different -- like if you change server timezones at some point.
If there are logs with different timezones in the file, well... that might be beyond help.
For example: Irssi
Stripping out the inserted characters would be ideal. An option to list nicks who have this splitting behavior would be useful.
Depending on variation between clients, configuring the string that's used to denote split posts could be helpful as well.
Beyond just having samples that build to show that the gem is working, we can also create test cases to eventually build a test suite.
Things like logs that are missing tags, an arc name, a format, whose lines don't match any format, a format that doesn't exist, all of those sorts of things. As well as verifying that the flags all work.
Add feature that can auto add tags based on content of logs.
Example, if any of the list [tree, flower, cactus] are in the file, add the tag 'nature'
cd
and run bundle && rake rp_logs:new && jekyll serve
or something along those linesInstead of generating the output (oodles and oodles of <p>
tags) with Ruby, we could pass the list of LogLine
s into the page and use a Liquid template to generate the output.
This would let it be more user-configurable, and also use Liquid for what it's meant to do.
Explain what these are, and how to use them:
_custom-vars.scss
_custom-rules.scss
Any message consisting of entirely whitespace will break the converter.
See line here:
A warning should be printed (with file and line number) when something like this is encountered:
Currently the Arc Index contains both RPs grouped into arcs, and non arc RPs intermingled.
This leads to a confusing page which is hard to read and easily gets cluttered.
Either, non arc RPs shouldn't be included at all, or they should be put in another section labels 'Non Arc RPs' under the main Arc Index.
So people can find out what made the cool site they're looking at!
Right now we're relying on the Markdown parser and the browser to ignore them, which works... most of the time. But not all the time, if there's a single word faux-tag <tag>
or similar. (Thus why all the nicks have a space for their mode character if they don't have an actual mode character.)
They should be replaced with <
and >
. There's probably already existing HTML escape functions to use.
Instead it should just disable pulling out characters from the participating nicks.
Imagined functionality: Have a mapping of tag => [implied tags]
in the config file. These are checked when a log's tags are being parsed, and any implied tags are added (recursively, if necessary) until no implications are found.
Would also require some way of opting-out of tag implications on a per-log basis.
Some various constants could do with being configurable in _config.yml
:
MAX_SECONDS_BETWEEN_POSTS
OOC_START_DELIMITERS
This may even tie in to #15, allowing RpLogGenerator::RP_KEY
to be specifying in the config file (or taken from its collection name)
Sometimes people make posts like this:
/me The quick brown fox jumps over the lazy dog. Alice watches it intently.
/me "No way," they said.
These should be fairly easy to detect, assuming that capital letters and quotes starting a post are highly unlikely otherwise.
A bit more difficult:
<Alice> The quick brown fox jumps over the lazy dog. Alice watches it intently.
<Alice> "No way," they said.
This might be... impossible? We do already have an option for strict OOC, where only things in ()s are counted as OOC.
It would be nice if the user had the ability to inject scripts into the build sequence without having to modify any files in the project.
config was:
char:TihansPlant: ["char:Tihan☃s Plant", plant]
*** Bad character '☃' in tag 'Tihan☃s Plant'
/var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:105:in block in name_to_dir': Bad character '☃' in tag 'Tihan☃s Plant' (Exception) from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:97:in
each_char'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:97:in name_to_dir' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:43:in
initialize'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:29:in new' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:29:in
block in []'
from /var/www/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/set.rb:283:in each_key' from /var/www/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/set.rb:283:in
each'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:29:in map' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_tags.rb:29:in
[]'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_page.rb:85:in update_tags' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_log_converter.rb:194:in
convert_rp'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_log_converter.rb:109:in block in convert_all_pages' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_log_converter.rb:106:in
each'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_log_converter.rb:106:in convert_all_pages' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-rp_logs-0.3.0/lib/jekyll/rp_logs/rp_log_converter.rb:52:in
generate'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/site.rb:280:in block in generate' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/site.rb:279:in
each'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/site.rb:279:in generate' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/site.rb:50:in
process'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/command.rb:28:in process_site' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:56:in
build'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:34:in process' from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:18:in
block (2 levels) in init_with_program'
from /var/www/.rvm/gems/ruby-2.2.1/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in call' from /var/www/.rvm/gems/ruby-2.2.1/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in
block in execute'
from /var/www/.rvm/gems/ruby-2.2.1/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in each' from /var/www/.rvm/gems/ruby-2.2.1/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in
execute'
from /var/www/.rvm/gems/ruby-2.2.1/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in go' from /var/www/.rvm/gems/ruby-2.2.1/gems/mercenary-0.3.5/lib/mercenary.rb:19:in
program'
from /var/www/.rvm/gems/ruby-2.2.1/gems/jekyll-2.5.3/bin/jekyll:20:in <top (required)>' from /var/www/.rvm/gems/ruby-2.2.1/bin/jekyll:23:in
load'
from /var/www/.rvm/gems/ruby-2.2.1/bin/jekyll:23:in <main>' from /var/www/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in
eval'
from /var/www/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `
A page with all tags sorted by instances
Right now you can't actually just look at a chronological list of RPs. There's the canon/noncanon view which splits them by canon-ness (perhaps also an outdated classification) and the arc view, which groups by arc.
Related to #21.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.