Paths for publication stylesheet and index are relative #20

Open
opened 2021-03-25 21:17:59 +01:00 by Ghost · 0 comments

Following up on the last post of #18, I grabbed the etherpump-live repo. I don't think they're current; the stylesheet is very different from the one on the live website. The templates in this repo, though, are more current and contain the fancy index, so I used that.

One problem I ran into was when running these commands, copied from cron.sh:

~/etherpump$ etherpump pull --meta --html --text --magicwords --publish-opt-in --pub ./testpublication/p --css ./testpublication/stylesheet.css --fix-names --connection 5 --force
~/etherpump$ etherpump index input ./testpublication/p/*.meta.json --templatepath ./testpublication/templates/ --title "CHVRCHES Discography" --output ./testpublication/index.html

This produces files which reference, for instance, ~/etherpump/testpublication/testpublication/p/Graffiti.raw.html for the index (which 404s), and ~/etherpump/testpublication/p/testpublication/stylesheet.css for the individual pads (which also doesn't load until edited to the proper path).

While this is likely acceptable behaviour if the paths are relative to the location of the pads or the index on purpose rather than relative to where the command is being run, it should still be documented behaviour.

Running from ~/etherpump and not referencing relative paths works fine and produced this from test input. Editing this template should work fine for my planned use case, though documentation on the syntax would be welcome.

Some comments:

  • How do you select from different templates? Is it just making an entire new folder? Are there files other than index.html that can be used there?
  • Is it possible to omit one of the links from the listing for pads; that is, to say, remove the pad link if the instance isn't public, or remove the magicwords link?
  • There's an approach to publishing from within Etherpad which might be interesting. (Right now it only supports text output, though.) You could even implement a specific interface which adds more metadata if need be. (I'll be using magic words to imitate 'parts' and 'chapters'; my use case involves fiction publishing.) Even just having an Etherpad plugin with a button that triggers Etherpump on the host would be interesting; this tool might also offer an approach for that as well.
  • For use with tools like MyPads, implementing the ability to publish based on groups would be good. This would greatly simplify, say, integrating with applications which provide Etherpads to specific users or groups. You could call Etherpump programatically through the API, providing the requisite group ID and/or authorization to Etherpad, which then pumps the content to Etherpump and can be placed programatically as well.
Following up on the last post of #18, I grabbed the `etherpump-live` repo. I don't think they're current; the stylesheet is very different from the one on [the live website](https://etherpump.vvvvvvaria.org/). The templates in *this* repo, though, are more current and contain the fancy index, so I used that. One problem I ran into was when running these commands, copied from `cron.sh`: ``` ~/etherpump$ etherpump pull --meta --html --text --magicwords --publish-opt-in --pub ./testpublication/p --css ./testpublication/stylesheet.css --fix-names --connection 5 --force ~/etherpump$ etherpump index input ./testpublication/p/*.meta.json --templatepath ./testpublication/templates/ --title "CHVRCHES Discography" --output ./testpublication/index.html ``` This produces files which reference, for instance, `~/etherpump/testpublication/testpublication/p/Graffiti.raw.html` for the index (which 404s), and `~/etherpump/testpublication/p/testpublication/stylesheet.css` for the individual pads (which also doesn't load until edited to the proper path). While this is likely acceptable behaviour if the paths are relative to the location of the pads or the index *on purpose* rather than relative to where the command is being run, it should still be documented behaviour. Running from `~/etherpump` and not referencing relative paths works fine and produced [this](https://etherpad.lilith.empress.ml/test/etherpump/) from test input. Editing this template should work fine for my planned use case, though documentation on the syntax would be welcome. Some comments: - How do you select from different templates? Is it just making an entire new folder? Are there files other than index.html that can be used there? - Is it possible to omit one of the links from the listing for pads; that is, to say, remove the `pad` link if the instance isn't public, or remove the `magicwords` link? - There's [an approach to publishing from within Etherpad](https://github.com/ether/ep_git_commit_saved_revision) which might be interesting. (Right now it only supports text output, though.) You could even implement a specific interface which adds more metadata if need be. (I'll be using magic words to imitate 'parts' and 'chapters'; my use case involves fiction publishing.) Even just having an Etherpad plugin with a button that triggers Etherpump on the host would be interesting; this tool might also offer an approach for that as well. - For use with tools like [MyPads](https://framagit.org/framasoft/Etherpad/ep_mypads), implementing the ability to publish based on groups would be good. This would greatly simplify, say, integrating with applications which provide Etherpads to specific users or groups. You could call Etherpump programatically through the API, providing the requisite group ID and/or authorization to Etherpad, which then pumps the content to Etherpump and can be placed programatically as well.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: varia/etherpump#20
No description provided.