Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mysql-formula
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
salt
mysql-formula
Commits
f0b852ad
Commit
f0b852ad
authored
10 years ago
by
Nitin Madhok
Browse files
Options
Downloads
Plain Diff
Merge pull request #57 from h4ck3rm1k3/master
Rewrote expression
parents
22b53e4e
f0800c32
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
scripts/parse_supported_params.py
+11
-3
11 additions, 3 deletions
scripts/parse_supported_params.py
with
13 additions
and
3 deletions
.gitignore
0 → 100644
+
2
−
0
View file @
f0b852ad
*.pyc
*~
This diff is collapsed.
Click to expand it.
scripts/parse_supported_params.py
+
11
−
3
View file @
f0b852ad
#!/usr/bin/python3
#!/usr/bin/python3
# coding: utf-8
# coding: utf-8
import
argparse
import
argparse
import
re
import
re
import
sys
import
sys
import
urllib.request
import
urllib.request
from
html_table_parser
import
HTMLTableParser
from
html_table_parser
import
HTMLTableParser
# Regex for parsing options on MySQL documentation pages
# Regex for parsing options on MySQL documentation pages
# Options are (normally) specified as command-line options
# Options are (normally) specified as command-line options
# as anchor tags on the page. Certain documentation pages only
# as anchor tags on the page. Certain documentation pages only
...
@@ -141,11 +144,16 @@ def print_yaml_options(sections, parser, file=sys.stdout):
...
@@ -141,11 +144,16 @@ def print_yaml_options(sections, parser, file=sys.stdout):
A YAML library could be used, but we avoid extra dependencies by
A YAML library could be used, but we avoid extra dependencies by
just using string formatting.
just using string formatting.
"""
"""
for
section
,
url
,
yaml
in
sections
:
for
section
,
url
,
yaml
in
sections
:
options
=
parser
(
url
,
section
)
options
=
parser
(
url
,
section
)
print
(
yaml
%
{
'
section
'
:
section
,
options_string
=
'
\n
-
'
.
join
(
options
)
'
options
'
:
'
\n
-
'
.
join
(
options
),
string
=
yaml
%
{
'
url
'
:
url
},
end
=
''
,
file
=
file
)
'
section
'
:
section
,
'
options
'
:
options_string
,
'
url
'
:
url
}
print
(
string
,
file
=
file
,
end
=
""
)
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment