[ 
https://issues.apache.org/jira/browse/CASSANDRA-17684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vineet Gali updated CASSANDRA-17684:
------------------------------------
    Test and Documentation Plan: I ensured the given patch was activated in the 
if statement through print statements. If the cql.html file was to open in the 
given browser, the patch ran properly.
                         Status: Patch Available  (was: In Progress)

This fix packages cql.html as a resource file and imports it in cqlshmain.py 
(if available).

> MacOS install should include cql.html local help file
> -----------------------------------------------------
>
>                 Key: CASSANDRA-17684
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17684
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL/Interpreter
>            Reporter: Brad Schoening
>            Assignee: Vineet Gali
>            Priority: Normal
>             Fix For: 5.x
>
>
> On MacOS, /usr/share is not writable – even by root. Instead, 
> /usr/local/share is the preferred location.
> The current share directory path is /usr/share/doc/cassandra/CQL.html.  This 
> would just add an alternative path.
> Using a list comprehension would simplify the current code.  E.g.,     
> {quote}import pathlib
> HTML_FALLBACK = 'https://cassandra.apache.org/doc/latest/cql/index.html'
> loc = ( Path('./doc/cql3/CQL.html'), 
> Path('/usr/share/doc/cassandra/CQL.html'), 
> Path('{color:#4c9aff}/usr/local/share{color}/doc/cassandra/CQL.html' ))
> item = next((x.as_uri() for x in loc if os.path.exists( x )), HTML_FALLBACK)
> {quote}
> Homebrew doesn't install the doc files, so this would likely need either
> a) added to homebrew in 
> [https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/cassandra.rb]
> or
> b) installed with pip's setup.cql and accessed with Python's 
> [importlib.resources|https://docs.python.org/3/library/importlib.resources.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to