Giter Club home page Giter Club logo

author-tools's People

Contributors

cabo avatar chrysn avatar kesara avatar ngpixel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

author-tools's Issues

Missing fonts

API docker instance must install required fonts for xml2rfc.

Unnecessary year check

"Error converting first draft to text: Expected to have the current year when month is missing, but found '2021'"
This is a problem. I need to compare a version from last year with a new version, so of course last year's version has last year's date. For purposes of comparison, the date rule should not be enforced at all. I might need to compare a 2020 version with a 2021 version in 2022!

Allow extracting ABNF from xml

Right now we only appear to support extracting ANBF from text documents.

From @alicerusso:

For extracting, would be nice if it allowed XML as input, and then extracted the sourcecode type="abnf" (i.e., rfclint --extract="abnf" -n).

Consider URL inputs

This might come with some risks, but it might be good to allow users to specify a URL for a document. This is a feature that I routinely use with rfcdiff, using input URLs on GitHub pages or in GitHub repositories with raw.githubusercontent.com.

Include wget

idnits script relies on wget but wget is missing in the current docker instance.
Install wget.

Should /version require an API key?

rjsparks@unformal tmp % curl -X 'GET' \
  'https://author-tools.ietf.org/api/version' \
  -H 'accept: application/json'
{"error":"API key is missing"}

I suspect this endpoint should be open.

API keys in querystrings?

The docs currently say:

apikeystring | API Key (can be submitted as query string)

Is that really true?

Show line number on errors

Error output of tools like xml2rfx includes a line number.
At the moment Author Tools doesn't show the line number.

Example:
Author Tools:

xml2rfc error: Inconsistent table width: Found different row lengths in this table

xml2rfc:

draft-example-original.xml(428): Error: Inconsistent table width: Found different row lengths in this table

428 is the line number.

Inconvenience with Diff with latest

Diff with latest is very handy for an author working solo. However, it's quite a nuisance when working with co-authors, because it doesn't provide a self-contained HTML file like rfcdiff does. I often want to generate the diffs as a single file I can send to my co-authors.

Could we have a mode for Diff with latest that generates a stand-alone file? (Exactly as iddiff does.)

Without this I have no choice but to generate txt files myself and run rfcdiff or iddiff separately.

Display a warning when xml2rfc v2 XML is submitted.

When I convert a rather old XML file to XML, it does what I expect: converts v2 to v3. However, it doesn't tell me that's what it's doing. If we want to encourage people to switch to v3, it should probably announce that it has done the conversion and say "please use the new format from now on".

TypeError: Failed to fetch when you update the source file

It is common to find errors in the source when using the tool, which requires one to go fix them and update the source file. But after the file is updated and you click on any of the buttons, it throws the error - TypeError: Failed to fetch!

Even choosing the file again or a refresh doesn't fix it!

I need to open the https://author-tools.ietf.org/ in a new tab to make it work!

Browser: Chrome

The configuration of xml2rfc for author-tools should be documented

Description

It would be nice to have a page that documents the settings and defaults for the xml2rfc interface (e.g., is --id-is-work-in-progress set? Is --add-xinclude set? etc.).

On the https://author-tools.ietf.org/about.html page, maybe a column called "Settings" could be added that has links to pages that explain the configurations (scope creep: documenting the configurations of the other tools listed on that page).

Code of Conduct

Improvements to /api/version

Expand /api/version API endpoint by adding version details of additional dependencies / tools like Weasyprint, GoAT etc.

File type detection rules

The language on the main page, like "Plain text as .txt", might be read to imply that filename extensions are critical. Would a ".text" file be ignored even if it was submitted as "text/plain"?

It might be enough to say "Plain text (.txt)" or "Markdown (.md, .mkd, or .markdown), in either kramdown-rfc2629 or mmark format".

Ideally, the tool would detect the file type according to some clear, documented rules. I would suggest that Content-Type take precedence over filename, with the filename only being used when the content-type rule is inconclusive. That's two small lookup tables. I would not do content-type sniffing, as that seems unlikely to be necessary.

(The only reason I say that file extension is needed is that Windows still doesn't associate the correct media type with .md files.)

Explicitly acknowledge that ABNF has no errors.

From @alicerusso about the ABNF validation service

Please display "No errors during parsing." or similar when that is the case.

The stopgap page (thank you for that) and the old page displayed "No errors during parsing." at the top.

Author-tools output when parsing is successful is display of the input, listing each UNDEFINED.

It's not clear that BAP found no errors in this case - a clear indication that everything is OK should be added.

Use docname to determine document name

Author Tools uses the filename to determine the document name when only a single document is given for iddiff comparison.
Whenever an XML file is available Author Tools should use the docname attribute under rfc element to determine the document name.

This document name is fed into datatracker API to figure out the latest draft in that series.

Can the "open in web browser" be an option before submitting?

I really preferred the tools version that would show the output in the browser without any other clicks. If you are debugging, your cycle is fix the text, submit, look at the result, repeat. That should be two clicks (submit and back). It could be one click with proper windows.

Unnecessary diffs shown in iddiff tool

The new iddiff tool shows spurious diffs - apparently in cases where page breaks occur in different places in the two documents.

Here is an example using the new tool:
https://author-tools.ietf.org/diff?doc_1=rfc8920&url_2=https://www.ietf.org/archive/id/draft-ppsenak-lsr-rfc8920bis-00.txt

Here is an example using the old rfcdiff tool on the same two files:
https://tools.ietf.org//rfcdiff?url1=rfc8920&url2=https://www.ietf.org/archive/id/draft-ppsenak-lsr-rfc8920bis-00.txt

Unpaginated text not just as an option but as default

Both the RFC-Editor and the datatracker webpages use unpaginated as the plain text format nowadays. Author-tools should just do the same. As unpaginated is the new IETF standard format for plain text, it is a bit strange that author-tools does not even support it.

(But please keep paginated text as an option. I would like a text+pdf option as well)

Author Tools doesn't capture certain xml2rfc v3 reference errors

Describe the issue

Author Tools doesn't capture xml2rfc v3 reference errors where .xml extension is missing.

Example reference:

<reference anchor="RFC9110" target="https://www.rfc-editor.org/info/rfc9110">

xml2rfc output:

$ xml2rfc drafts/draft-ietf-httpbis-http2bis.xml
Error: Failure fetching URL https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9000 (HTTPSConnectionPool(host='xml2rfc.tools.ietf.org', port=443): Max retries exceeded with url: /public/rfc/bibxml/reference.RFC.9000 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)'))))
Error: Failure fetching URL https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9000 (HTTPSConnectionPool(host='xml2rfc.tools.ietf.org', port=443): Max retries exceeded with url: /public/rfc/bibxml/reference.RFC.9000 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)'))))
Warning: The v3 formatters require full explicit URLs of external resources.  Did you forget to add '.xml' (or some other extension)?
Error: Unable to resolve external request: "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9000"
Error: XInclude processing failed: could not load https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9000, and no fallback was found, line 3032
Unable to complete processing drafts/draft-ietf-httpbis-http2bis.xml

Author Tools doesn't capture the above error.

Code of Conduct

Add support for mmark

Add support for mmark.
Mmark markdown file can be identified by the first line read, that starts with:

%%%

iddiff: Allow users to provide just the second parameter for iddiff

In rfcdiff, users can construct a URL like https://www.ietf.org/rfcdiff?url2=draft-ietf-stir-certificates-18
This results in the provided draft being on the right-hand side.

Author Tools iddiff alternative is using id_1 or url_1 (for URL).
The provided document will end up on the right-hand side.

Author Tools iddiff should support specifying just id_2 or url_2.
And the provided document should be on the right-hand side on the diff results.

See #66 for parameter name changes.

Validation API

Implement ID validation API endpoint at /api/validate
This must accept the same input formats that /api/render/ accepts and output will be a JSON output with warnings, errors and idnits output

Improve ABNF extraction from text

From @alicerusso about the ABNF validation service:

For extracting from text, could the search for instances of "=" be changed to " = " (with space on each side) and " =/ "? sample input: RFC 9253. seems to extract every line that contains "=" (yielding lots of non-ABNF lines).

We should sample IDs to see if they are careful with spaces around = and =/. If there are any that don't have the spaces, then perhaps we should look at making looking for such spaces a runtime-option.

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.