Coder Social home page Coder Social logo

makepdfbook's People

Contributors

moratnz avatar

Stargazers

 avatar

Watchers

 avatar

makepdfbook's Issues

Move common.js content into MakePdfBook

There's big wacks of javascript that MakePdfBook uses that's being manually copied into MediaWiki:Common.js in installs we're using MakePdfBook in.

That's dumb, It should be included as a resource in MakePdfBook.

External links in pdf output are broken

Links in the pdf are rendering as relative links (as they should within the wiki), which breaks in a pdf.

For links that are internal to the pdf, it'd be great to work out how to get them to render as actual internal pdf links. For links that are actually external to the pdf, they should be prefixed with the wiki host name.

Sidebar should link to category:Handbook page, if it exists

And the handbook page shouldn't be included in the chapter set that's sent to things like the pdf generator.

options include giving the handbook page a magic sort key, e.g., 'handbook', or 'contents', or move the stuff that's currently held on the handbook page into the category page.

Add response type for returning Handbook categories

As part of the work to automate the navigation sidebar in use in the wikis using this extension, it would be useful to be able to hand the font end a json object describing the handbooks in the wiki and their contents.

An example of the desired data structure:
[
{
namespace: "Armored_Combat",
label: "Armored Combat",
webVersion: "/index.php/Armored_Combat:Handbook",
pdfVersion: "/index.php/Special:MakePdfBook?category=Armored_Combat_Handbook",
chapters: [
[
"Introduction",
"/index.php/Armored_Combat:Introduction"
],
[
"Change Log",
"/index.php/Armored_Combat:Change_Log"
],
[
"1. Combat Authorization Requirements",
"/index.php/Armored_Combat:Combat_Authorization_Requirements"
],
[
"2. Rules of the Lists",
"/index.php/Armored_Combat:Rules_Of_The_Lists"
],
[
"3. Conventions of Combat",
"/index.php/Armored_Combat:Conventions_Of_Combat"
],
[
"4. The Use of Weapons and Shields",
"/index.php/Armored_Combat:Use_Of_Weapons_And_Shields"
],
[
"5. Acknowledgement of Blows",
"/index.php/Armored_Combat:Acknowledgement_Of_Blows"
],
[
"6. Armour Requirements",
"/index.php/Armored_Combat:Armor_Requirements"
],
[
"7. Weapon Standards",
"/index.php/Armored_Combat:Weapons_Standards"
],
[
"8. Siege Combat",
"/index.php/Armored_Combat:Siege_Combat"
],
[
"9. Authorization of Marshals",
"/index.php/Armored_Combat:Procedures_For_The_Authorization_Of_Marshals"
],
[
"10. Marshaling Wars",
"/index.php/Armored_Combat:Procedures_For_Marshaling_Wars"
],
[
"11. Marshaling Requirements",
"/index.php/Armored_Combat:Marshaling_Requirements"
],
[
"12. Combat Injury Procedures",
"/index.php/Armored_Combat:Combat_Injury_Procedures"
],
[
"13. Marshaling on the Field",
"/index.php/Armored_Combat:Guidelines_For_Marshaling_On_The_Field"
],
[
"14. Combat Authorization Procedures",
"/index.php/Armored_Combat:Combat_Authorization_Procedures"
],
[
"15. Equipment Inspection Guidelines",
"/index.php/Armored_Combat:Equipment_Inspection_Guidelines"
],
[
"16. Experimental Weapons and Materials",
"/index.php/Armored_Combat:Experimental_Weapons_And_Materials_Procedures"
],
[
"17. Marshal Responsibilities, Chain of Command, and Reporting",
"/index.php/Armored_Combat:Marshal_Responsibilities_Chain_Of_Command_And_Reporting"
],
[
"18. Grievances and Sanctions",
"/index.php/Armored_Combat:Procedures_For_Grievances_And_Sanctions"
],
[
"Glossary",
"/index.php/Armored_Combat:Glossary"
]
]
}
]

Book->fetchChapters() and Book->fetchTitlepage() are sometimes returning the wrong content

In testing I've observed:

  • fetching all content with BookSet->fetchChapters and BookSet->fetchTitlepages results in the right chapters in the right place.
  • fetching single book's content with Book->fetchChapters & Book->fetchTitlepages results in the same content being put into multiple books.

The difference between these is that the latter has an additional WHERE statement in its DB call; that's about it.

For the moment I'm sidestepping this issue by doing all content loading with BookSet->fetch..., but it'd be nice to sort this so content can be loaded in a more targeted fashion.

Add option to render command to generate an archive version

Feature addition:

Add option to render command to create an archive copy of the current pdf

The archive should be named something like <category_name>-<tag>.pdf where tag is either a date or version number.

It should be stored into the appropriate place in the file tree, and registered appropriately in the DB.

Parameters:

generateArchive=tag: here the specified tag gets put into the archive file.

Stretch goal:
Add dynamic pages to show all the historical versions of the handbooks.

Remove inline styling of pdf icons

We're currently applying inline styles to the pdf icons to avoid the delightfully named FOUT (flash of unsettled text).

This is somewhat filthy.

The correct solution is probably to include an appropriately licensed SVG in the extension images.

Add 'noindex' meta tag to all pages in draft wiki.

To avoid draft content from being indexed by google, we should implement 'noindex' meta tags on all draft pages.

This should be a very short hook that can be attached anywhere we have access to the Output object with $out->addMeta()

The result meta tag we're after is:
<meta name="robots" content="noindex, nofollow" />.

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.