Question: A simple trumped equivalent example
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 48
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Hello, thanks for write this library, it's small and easy to use.
Can you provide a trumpet example equivalent in order to modify a specific matched selector and write the output?
var trumpet = require('trumpet');
var tr = trumpet();
tr.pipe(process.stdout);
var ws = tr.select('tbody').createWriteStream();
ws.end('<tr><td>rawr</td></tr>');
var fs = require('fs');
fs.createReadStream(__dirname + '/html/table.html').pipe(tr);
Particularly, in my case, I want to rewrite some things from an original HTML, like convert image src into absolute URLs.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing how cornet handles a CSS selector and compare it with the trumpet example using tbody and html/table.html. Document an equivalent example that rewrites a matched image src and writes the transformed HTML to stdout; done means the example is clear enough to reproduce the requested transformation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100